Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
add group sections dynamically in report
spulapalli
hello,
I have created a report with the following query,
select region,country,state,totals from xyz. report has only one table with region grouping, totals are summing in report. report is being called from application which has parameter screen. users has facility that they can select multiple columns/values( region,country,state) and these values are passed to report. based on these values I need to group the table ex. if they select region and country, so report/table should have two group sections.
how can i add group sections dynamically based on input values to table/report?
do we have any documents to read about the java script to write in actuate birt reports? if yes, please let me know the link or documents.
Regards,
Suresh
Find more posts tagged with
Comments
mwilliams
You can create an expression for a group, so I would think you could create all the possible groups you'd need and have expressions that set the group field to "" if you don't need that group based on your parameter.
spulapalli
thank you for the reply.
this is a good idea, but there is no specific order, users can also select grouping order.
like group by 1,2,3 or group by 3,2,1 ....etc...
based on inputs I need to update the grouping fields. please provide me if you guys have any sample.
Regards,
Suresh
mwilliams
What is your BIRT version? I'll try to set you something up.
arjunmanju
Hi all,
Even this in my exact requirement ...can anyone help me how to achieve it???? and please send me if you have any example files
Thanks in Advance ,
Arjun
arjunmanju
<blockquote class='ipsBlockquote' data-author="'arjunmanju'" data-cid="81375" data-time="1312957679" data-date="09 August 2011 - 11:27 PM"><p>
Hi all,<br />
<br />
Even this in my exact requirement ...can anyone help me how to achieve it???? and please send me if you have any example files ,am using BIRT 3.7<br />
<br />
<br />
<br />
Thanks in Advance ,<br />
<br />
Arjun<br /></p></blockquote>
julioleiva
Hi all
I'm looking for something similar, I found an example on how to create a dynamic reports with columns chosen by a end user, however I need to add the grouping dynamically.
Any tip on this is really appreciated
johnw
Basically what you need to do is get the table using reportContext.getDesignHandle().findElement("tableName").
Then, you create a new GroupHandle object, set its properties (key, sort direction, etc), and then add that to the table handle. This has to be done in the onPrepare event for the table, or in the beforeFactory or initialize event for the report. I thought I had an example, but I can't find one. My recommendation is to build this using a Java event handler first, and if you really need to, translate that to Javascript and move it over.
julioleiva
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="83589" data-time="1317325078" data-date="29 September 2011 - 12:37 PM"><p>
Basically what you need to do is get the table using reportContext.getDesignHandle().findElement("tableName").<br />
<br />
Then, you create a new GroupHandle object, set its properties (key, sort direction, etc), and then add that to the table handle. This has to be done in the onPrepare event for the table, or in the beforeFactory or initialize event for the report. I thought I had an example, but I can't find one. My recommendation is to build this using a Java event handler first, and if you really need to, translate that to Javascript and move it over.<br /></p></blockquote>
<br />
Ok, thanks for your reply<br />
I will give it a try
julioleiva
Ok, thanks i was able to do that
But now how can I add a total for the column I add the group?
Thanks