Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Drill-through Hyperlink with Multi-Select Parameter
kpelzer29
Is there a way for me to create a drill-through hyperlink to link one report to another, where one of the report parameters in both the report and target report is a multi-select parameter? I keep getting the following error when I run the report: <br />
<br />
<em class='bbc'>org.eclipse.birt.report.engine.api.EngineException: The trigger data is invalid or its type is unknown.</em><br />
<br />
If I change the multi-select parameter to a single select parameter by unchecking the <strong class='bbc'>Allow Multiple Values</strong> checkbox, the report seems to work. So I am thinking the error has something to do with the parameter being a multi-select parameter.
Find more posts tagged with
Comments
mwilliams
When you pass the parameter through, pass it through as a comma separated string and use that in your drill through report to call the appropriate data.
kpelzer29
Hi mwilliams,<br />
<br />
I tried changing the value being passed from<br />
<br />
params["rep_param_1"].value<br />
<br />
to <br />
<br />
params["rep_param_1"].value.join("','")<br />
<br />
Is this what you had in mind? When I run the report, I no longer get the error. When I click on the report, a new window opens with the report title and footer for the target report, but the chart for the target report does not display. <br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73139" data-time="1297280258" data-date="09 February 2011 - 12:37 PM"><p>
When you pass the parameter through, pass it through as a comma separated string and use that in your drill through report to call the appropriate data.<br /></p></blockquote>
mwilliams
How are you using the comma separated string in the drill through report?
kpelzer29
In <strong class='bbc'>Step 1: Select a target report in the Hyperlink Options</strong> window, under <strong class='bbc'>Report Parameters</strong>, I have added the following parameter to the list (under the Parameters and Values columns):<br />
<br />
Parameters: rep_param_1<br />
Values: params["rep_param_1"].value.join("','")<br />
<br />
Should I add anything to the expression to generate the comma separated string? Please let me know if you need any additional information.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73142" data-time="1297283386" data-date="09 February 2011 - 01:29 PM"><p>
How are you using the comma separated string in the drill through report?<br /></p></blockquote>
mwilliams
In the report that you hyperlink to, you'll need to make sure that your query is set up to handle the comma separated string. You'll have to do this in the beforeOpen script of your dataSet. Also, since you're doing the "join" in the first report, if you have this done in the second report, you'll need to remove that probably.
If you are still having issues, let me know. I'll try to get you an example made that does this.
kpelzer29
I understand what you mean by making sure the query for the target report is set up to handle the comma separated string, but I am not sure what to put in the beforeOpen script of the data set and also how to remove the "join" in order to get the target report to work correctly. If you could create an example that does this, that would be great! Thank you!<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73146" data-time="1297286637" data-date="09 February 2011 - 02:23 PM"><p>
In the report that you hyperlink to, you'll need to make sure that your query is set up to handle the comma separated string. You'll have to do this in the beforeOpen script of your dataSet. Also, since you're doing the "join" in the first report, if you have this done in the second report, you'll need to remove that probably.<br />
<br />
If you are still having issues, let me know. I'll try to get you an example made that does this.<br /></p></blockquote>
mwilliams
You'd most likely have to modify your query in the beforeOpen method of your report to get it to handle more than one value. I don't think that a dataSet parameter, '?', accepts more than one value. That is what I mean for that. As for removing the join in the second report, I just meant if you were expecting a multi select parameter value to be passed through, you would most likely have had a "join" statement in your beforeOpen script in your second report that would need to be removed since you had already done it. I think I have an example already made that does something similar I can pass to you. If I can't find it, I'll make one. What is your BIRT version?
kpelzer29
I am using BIRT version 2.6.1. I currently use the values of the multi-select parameter in a data set filter. I could try removing the filter and add code to the beforeOpen script in the second report if that would work better. It would really help me if you could send an example so I have something to base my report off of that works. Thank you!<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73176" data-time="1297347324" data-date="10 February 2011 - 07:15 AM"><p>
You'd most likely have to modify your query in the beforeOpen method of your report to get it to handle more than one value. I don't think that a dataSet parameter, '?', accepts more than one value. That is what I mean for that. As for removing the join in the second report, I just meant if you were expecting a multi select parameter value to be passed through, you would most likely have had a "join" statement in your beforeOpen script in your second report that would need to be removed since you had already done it. I think I have an example already made that does something similar I can pass to you. If I can't find it, I'll make one. What is your BIRT version?<br /></p></blockquote>
mwilliams
Are you using a JDBC dataSet? If not, a filter is where it should be used. I'll post an example of something that should help.
kpelzer29
Yes, I am using a JDBC dataset (connection to SQL Server).<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73180" data-time="1297352786" data-date="10 February 2011 - 08:46 AM"><p>
Are you using a JDBC dataSet? If not, a filter is where it should be used. I'll post an example of something that should help.<br /></p></blockquote>
mwilliams
Take a look at this example from the devShare. It shows how to use script to modify your query to work with multi-select parameters.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/771-using-a-multivalue-parameter-in-a-in-clause/