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)
Passing parameter into subreports
hq4ever
Hello,
My report structure is as following
dataSet1
dataSet2
List1 based on dataSet1
- List2 based on dataSet2
In the SQL of dataSet2 I have an "in" clause (multi select) so I need to take a parameter from the wrapping List1 dataSetRow[campId]. The substituation is done using javascript on the beforeOpen() of dataSet2.
How can I pass the informatino from List1 to the dataSet2 of List2 ?
I tried to do this using parameters but then the engine thinks I'm using a prepared statement and complains about missing column number....
I tried to search the web and all examples I found were with passing parameters, none with using "in" in the sub-report datasource.
Thank you for the help,
Maxim.
Find more posts tagged with
Comments
JasonW
Maixm,
You can always use a javascript variable. Take a look at the attached example. The outer table has two detail rows. The first contains a hidden data element that has an expression that sets a javascript variable without using the var keyword, making it global to the generation process. The second detail row has the second table thats beforeOpen script uses the variable defined in the outer table.
Jason
hq4ever
<blockquote class='ipsBlockquote' data-author="JasonW"><p>Maixm,<br />
<br />
You can always use a javascript variable. Take a look at the attached example. The outer table has two detail rows. The first contains a hidden data element that has an expression that sets a javascript variable without using the var keyword, making it global to the generation process. The second detail row has the second table thats beforeOpen script uses the variable defined in the outer table.<br />
<br />
Jason</p></blockquote>
<br />
Thank you for the example, very clear, very useful.<br />
Just 1 comment, If I understand correctly the second dataSet (rather then the second table) has the beforeOpen logic.<br />
<br />
Maxim.
JasonW
You are correct.
Jason