Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Why don't display 0 in aggregate information
Why don't display 0 in aggregate information [message #989875] Sun, 09 December 2012 01:53 Go to next message
Eclipse UserFriend
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: Sun, 09 December 2012 01:54] by Moderator

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 17:07 Go to previous messageGo to next message
Eclipse UserFriend
Can you attach a report showing your issue, that uses the sample database, so I can see the setup and test on it? Thanks.
Re: Why don't display 0 in aggregate information [message #990010 is a reply to message #989898] Mon, 10 December 2012 13:15 Go to previous messageGo to next message
Eclipse UserFriend
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 18:12 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Why don't display 0 in aggregate information [message #990130 is a reply to message #990076] Tue, 11 December 2012 03:07 Go to previous messageGo to next message
Eclipse UserFriend
It works well.
Thank you.
Re: Why don't display 0 in aggregate information [message #990135 is a reply to message #990130] Tue, 11 December 2012 03:48 Go to previous message
Eclipse UserFriend
Glad I was able to help!
Previous Topic:Not receiving an error message on failure to create New Data Set
Next Topic:Postscript font changed
Goto Forum:
  


Current Time: Sat Feb 08 20:34:28 GMT 2025

Powered by FUDForum. Page generated in 0.03442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top