davka Posted March 5, 2010 Share Posted March 5, 2010 HiI have a report that list all my products. I also have specific production reports for some different product types. Are there any recommended way to make it possible to drill down from the main production report into different reports depending on the value of a field?My best solution is to set _report paramter in the link parameter of the hyperlink to something like this:($F{ProductType}==1 ? "/reports/ProductionReportTypeGeneric" : "/reports/ProductionReportTypeSpecific" )But going to 10+ number of product types that needs specific reports this will be hard to manage and I also would like to have the same behaviour on a couple of different links in various reports.Any suggestions on "best practice" for this? Link to comment Share on other sites More sharing options...
Gaby38 Posted March 5, 2010 Share Posted March 5, 2010 Hello,As for me, I prefer manipulate database tables than complex java expressions with ten or plus levels of choice.So I would create a table with a column "ProductType" and colums "Hyperlinkxxx" as many as various reports that will use this mechanism.In the main query I have just to do an "inner join" with this table on "ProductType" and I get directly the hyperlink to be used.After that, if there are changes, I don't modify anythinf in my reports : I have only to do the modifications in the "hyperlink table". Link to comment Share on other sites More sharing options...
swood Posted March 8, 2010 Share Posted March 8, 2010 You can capture the logic to generate the hyperlinks (including Gaby38's approach) in a scriptlet jar and use that to get the values in the _report parameter. ShermanJaspersoft Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now