Manipulate elements manually over script [message #754472] |
Wed, 02 November 2011 16:19 |
Missing name Missing name Messages: 6 Registered: November 2011 |
Junior Member |
|
|
Dear all, hello!
I currently started with Eclipse BIRT and I'm working on some (simple) reports.
I searched all day desperately on how I could manually get control over elements inside my report, because I need it for some exceptions:
Problem: I have some fields, which are only displayed if a variable is set. I did this with filters. e.g.: (Filter by... row["myvar"] ... Equal to ... "K")
My problem is that I would like to always have it displayed once, if I don't get any or other data from the data set.
Thought: Therefore my thought was to check in script if there is any data available, if not manually create the elements I need with some static/default values.
What I tried: I tried it with the "Show if blank" option in the Advance tab, but it didn't work, because is not beeing shown since there is no data to fill inside.
I hope I didn't express myself to complicated, but if here a short summary:
"I want to get elements from a certain table/element and manually create, position additional tables/elements by script."
Thank you in advance,
P.
|
|
|
Re: Manipulate elements manually over script [message #754667 is a reply to message #754472] |
Thu, 03 November 2011 19:47 |
|
Ok, so you have a grouped table, but when you filter your table, you lose some sections of it, because they return no data, but you'd like those sections to show empty even if there is no data? Is this correct? If so, you could create a table that only has the group field that you want to always display, then embed a detail table in it and filter its data based on the outer tables group value and your original filter. Let me know if I'm misunderstanding something!
Regards,
Michael
http://www.birt-exchange.org
Michael
Developer Evangelist, Silanis
|
|
|
|
Re: Manipulate elements manually over script [message #754687 is a reply to message #754681] |
Thu, 03 November 2011 20:45 |
|
What is your BIRT version? I'll make you a simple example. Are you using SQL? If so, the best way is to use dataSet parameter binding to limit the inner table. If not, filters will work just fine. Let me know.
Michael
Michael
Developer Evangelist, Silanis
|
|
|
|
Re: Manipulate elements manually over script [message #754853 is a reply to message #754472] |
Fri, 04 November 2011 15:54 |
|
Take a look at this report. It uses an outer table with all the customer values and has an embedded table that has the payment details for the year 2004. There is an aggregation in the inner table that counts the number of rows. If there are no rows, the table is hidden so the header is not displayed and a text box that says no payments made is displayed instead. Hope this helps. Let me know if you have questions.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03823 seconds