Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Why don't display 0 in aggregate information
Why don't display 0 in aggregate information [message #989875] Sat, 08 December 2012 20:53 Go to next message
Hunter Lee is currently offline Hunter Lee
Messages: 10
Registered: December 2012
Junior Member
Hi,

The version is 4.2.1. I use it in a windows7 32bit OS.

In a sales report every week, I group date by region to display sales subtotals by region. In Aggregation Builder, i use the SUM function to compute the sum. If there is no records in a region, then, it will not display 0, but nothing(a blank table cell). So, in script, I select the 'onCreate', then entry script statement as below,
if(this.getValue()==null){
this.setDisplayValue("0");
}

It will display 0 in report designer, but display nothing(a blank table cell) in IE or Chrome when i deployed the report in a Tomcat.

I greatly appreciate all help.
Thanks.

[Updated on: Sat, 08 December 2012 20:54]

Report message to a moderator

Re: Why don't display 0 in aggregate information [message #989898 is a reply to message #989875] Sun, 09 December 2012 12:07 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1424
Registered: July 2009
Senior Member

Can you attach a report showing your issue, that uses the sample database, so I can see the setup and test on it? Thanks.

Michael
Actuate – The BIRT Company™

BIRT Developer Center
Check out the new, free BIRT Viewer Toolkit
Re: Why don't display 0 in aggregate information [message #990010 is a reply to message #989898] Mon, 10 December 2012 08:15 Go to previous messageGo to next message
Hunter Lee is currently offline Hunter Lee
Messages: 10
Registered: December 2012
Junior Member
Hi Michael,

I used the sample database to make a cross table report, as the sample of BIRT Report Developer Guide. When you click 'EXTENDED_PRICE_s...', and choose 'Script' in the editor, after that select the 'onCreate', then you will see script statements.

It displayed 0 by Preview in report designer. It displayed nothing(a blank table cell) in IE or Chrome when i deployed the report in a Tomcat, via the URL '.../MyApp/frameset?__report=/displaySample.rptdesign'.

Thanks!
Hunter.


Re: Why don't display 0 in aggregate information [message #990076 is a reply to message #990010] Mon, 10 December 2012 13:12 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1424
Registered: July 2009
Senior Member

Instead of using script, use the mapping option to set your condition. Click on your data element and go to the map section in the property editor. Make a condition for "value of this data item" equal to null -> 0. That should do it.

Michael
Actuate – The BIRT Company™

BIRT Developer Center
Check out the new, free BIRT Viewer Toolkit
Re: Why don't display 0 in aggregate information [message #990130 is a reply to message #990076] Mon, 10 December 2012 22:07 Go to previous messageGo to next message
Hunter Lee is currently offline Hunter Lee
Messages: 10
Registered: December 2012
Junior Member
It works well.
Thank you.
Re: Why don't display 0 in aggregate information [message #990135 is a reply to message #990130] Mon, 10 December 2012 22:48 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1424
Registered: July 2009
Senior Member

Glad I was able to help!

Michael
Actuate – The BIRT Company™

BIRT Developer Center
Check out the new, free BIRT Viewer Toolkit
Previous Topic:Not receiving an error message on failure to create New Data Set
Next Topic:Postscript font changed
Goto Forum:
  


Current Time: Thu Apr 17 11:46:53 EDT 2014

Powered by FUDForum. Page generated in 0.02874 seconds