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)
Grails and Birt
BlazK
<p>Hello, I have quite a big problem and do not have any more ideas how to deal with it.</p><p> </p><p>My situation is:</p><ul class='bbc'><li>I have two Data sets that are filled with scripts, one beforeOpen() makes a list of objects and then two fetch() methods fill their Data set with object parameters (all strings).</li><li>Then I make a dynamic parameter, it is built in regard to data in one of the data sets.</li><li>Then a user selects one of the options in that parameter.</li><li>Now the second Data set is filltered with that parameter.</li></ul><p> </p><p>So this works in birt alone. The problem is in integration with grails. I have a grails aplication that shows reports. It has an birt engine that calls java method that gets you parameters, so you can display them.</p><p> </p><p>This method does not get any data because parameter is dynamic and has not been defined yet. The problem is that you need to get what selections will be avalible before birt is run, this works for static parameters, but does not work for dynamic.</p><p> </p><p>So does anyone knows how to build Data set, create dynamic parameter and then get selection options outside birt in grails, then get selection and pass it back to birt. Or any other ideas on this subject.</p><p> </p><p>Thank you.</p>
Find more posts tagged with
Comments
kclark
<p>Do both data sets depend on a parameter value? I've not done any work in grails but if you can attach the rptdesign I can take a look and might be able to give you some ideas on how this could be solved. How are you passing the passing the parameters to the report? I think you should be able to use the BIRT jsp taglib to create a custom parameter page.</p>
BlazK
<p>Hello,</p><p> </p><p>this is a quick mock of my report in real one in beforeOpen i go to database and do some stuff on the data that it is not important here. Everything else is pretty much the same just smaller and simpler.</p><p> </p><p>Thanks for looking at this.</p>
kclark
<p>In your example it looks like a scripted data source, in your actual report is it scripted on some other kind of database you are connecting to? I think what you might end up having to do is create a class with a couple different methods to get this working in grails. It might end up being something like this</p><p> </p><ul class='bbc'><li>Method that executes the first two data sets and returns the results to your class</li><li>Display your parameter here based on the results in the first step. After a selection is made you'll need to run another query getting the selectable options for the next step.</li><li>Display the returned results from step 2, after the user makes this selection you'll need to execute another query to get the selectable results for the next step.</li><li>Fill this last parameter with the results from step 3</li><li>After the user has made there selections and triggered some event to run the report pass all the selected values to your report for render.</li></ul><p>There might be a better way to do this, I'll try and work on an example for you. I need to setup the grails environment on my system and get to know it, then I'll let you know what I've come up with
</p>
BlazK
<p>It is scripted data set, it connects to a database and then parses and manipulates data and puts it into datasets.</p>
idonaldson
<p>Was this ever resolved? I have sort of the same issue with Grails + BIRT and using a dynamic selection list from a dataset. I'm a little different in that my lists aren't connected, and I'm just trying to get one to work at this point.</p>