BIRT Exchange Forum: BIRT Exchange Forum -> Last Week in the Forums: Using the Concatenate Aggregate, Hiding a Column When There is No Data, and more...

Jump to content


 

No Latest Open Poll.

Last Week in the Forums: Using the Concatenate Aggregate, Hiding a Column When There is No Data, and more...

Posted by mwilliams  Icon, 20 December 2010 - 04:39 PM

This blog series takes a look back at the past week in the forums, recalling how active they were and highlights some of the questions asked that seem to frequent the forums or other interesting topics. The forums have been very busy over the past several weeks heading towards the end of the year, but it looks like they're starting to slow down as the holidays approach. This may be because of an issue with the response notification server going down and not notifying those who had a response to their thread last week. This is fixed now. As always, thanks to those members who are helping answer questions in the forums. It is a great help to the community!

The first topic that will be covered this week is about showing all values of field 2 that correspond to the same value in field 1. For example, in this thread, the poster had data like:

Model Year
Mod1 1990
Mod1 1991
Mod1 1992
Mod2 1991
Mod2 1992

and wanted it to look like:

Model Year
Mod1 1990-1992 --or--
Mod2 1991, 1992

The solution given for this was to use grouping on the "Model" field and then to create an aggregation in the group header with the "concatenate" aggregation function.

The second topic I'll cover this week is about hiding a particular column in a report table if it returns no data. The solution to this is to initialize a variable to 0 in your initialize script, increment it or change the value in the onFetch script, finally, add a "dummy" text box at the top of your report and bind it to your dataSet. This will cause the dataSet to run so that your script is run so that you know if there are any values in the column. You can now use the visibility for the column and check the value of your variable to know whether to hide the column or not.

The last topic for this week is one that gets asked on a pretty regular basis. It is using multiple master pages. The poster wanted to have an option for the user to have the report in landscape or portrait. The way to do this is to set up two different master pages, one of each type. Then in your first element's script, you can set your masterpage to the appropriate masterpage by grabbing the element's style and setting the masterpage property.

Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.


4 Comments On This Entry

Page 1 of 1

java032 Icon

20 December 2010 - 07:31 PM
<birt:parameterPage id="bpp" name="bpg" target="myiframe" width="800"
isCustom="true" reportDesign="report/OR/DD_FH_JH.rptdesign">
<birt:paramDef name="pCodeStart" id="pCodeStart" ></birt:paramDef>
<input type="submit" name="submit" value="ok"/>
</birt:parameterPage>

1. pattern="frameset" ,soap --- <Operator>GetPage</Operator>
first time, I submit, the parammeter pCodeStart's value ='a' is used by my birt
report.
second time , I change pCodeStart's value ='b' ,I submit, it doesn't work
with'b',it still used 'a' by my birt report.
2. pattern="run" ,soap --- <Operator>GetPageAll</Operator>
according above step , it also work normally.

I guess : these class may deal with the parameter differently.
org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler
org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler

may be you can trace the src ,but i can't .
help me ,thank you .

Reproducible: Always

java032 Icon

20 December 2010 - 07:32 PM
this is a problem .
I can't work out .
please help me , thanks.

java032 Icon

20 December 2010 - 07:39 PM
first time the url =...&pCodeStart=a
second time the url =...&pCodeStart=b

I am sure the value change from a to b in the url .

my english not good , please forgive me .
thanks

mwilliams Icon

22 December 2010 - 09:21 PM
Did you submit this question in the forums?
Page 1 of 1

« May 2013 »

S M T W T F S
1234
567891011
12131415161718
1920212223 24 25
262728293031

My Picture

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

Categories

Search My Blog

Twitter