Skip to main content



      Home
Home » Archived » 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
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: Sat, 08 December 2012 20:54] by 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
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 08: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 13: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] Mon, 10 December 2012 22: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] Mon, 10 December 2012 22: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: Fri Mar 21 04:27:49 EDT 2025

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

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

Back to the top