Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Manipulate elements manually over script
icon5.gif  Manipulate elements manually over script [message #754472] Wed, 02 November 2011 16:19 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
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 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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 #754681 is a reply to message #754667] Thu, 03 November 2011 20:36 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
Hello Michael,

Thank you for your answer!
Yes you understood me correctly. Btw. your solution I thought of that, but I didn't really managed to try it because of 2 reasons:
1. I don't really know how.
2. I thought it would be easier to do it with script.

thx, p.
Re: Manipulate elements manually over script [message #754687 is a reply to message #754681] Thu, 03 November 2011 20:45 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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 #754706 is a reply to message #754687] Thu, 03 November 2011 22:21 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
My BIRT version is: 3.7.1 (could that be correct?)

I use a SOAP protocol to get Data though glassfish application services and from a database.
But yes I have the Data Sets already.

So I'm not sure what would be best, but you tell me Smile

thx, p.
Re: Manipulate elements manually over script [message #754853 is a reply to message #754472] Fri, 04 November 2011 15:54 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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
Re: Manipulate elements manually over script [message #754856 is a reply to message #754853] Fri, 04 November 2011 16:25 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
thank you i'll take a look and post back Smile
Re: Manipulate elements manually over script [message #755653 is a reply to message #754856] Wed, 09 November 2011 08:41 Go to previous message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
I've managed to take some time to analyse the report you gave me and it really helped.
Thank you very much!

P.S.: I'm sorry for my delayed response Smile

P.
Previous Topic:Viewer session expired issue
Next Topic:Can BIRT access the host name of the running TC Server?
Goto Forum:
  


Current Time: Fri Apr 19 20:26:23 GMT 2024

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

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

Back to the top