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)
How to make sub report when the relation column is multiple
hcy1986
The wwn1 column in the table t1 as follow:
wwn1
a11133w313f,
adfed1123ef
I want to make a sub table in the table t1 and the join column is wwn1.
the table parameter like this "in ('a11133w313f','adfed1123ef')"
Always,making sub report by the ? for join,how about in???
Any answers appreciate so much!
Find more posts tagged with
Comments
mwilliams
Let me see if I understand your example. You have a column named wwn1 in your table and the values underneath it are a11133w313f and adfed1123ef. Now you want to embed a table using another dataSet that has the values associated with the two values in the column? Is this correct? If not, can you explain a little more?
hcy1986
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78273" data-time="1307648324" data-date="09 June 2011 - 12:38 PM"><p>
Let me see if I understand your example. You have a column named wwn1 in your table and the values underneath it are a11133w313f and adfed1123ef. Now you want to embed a table using another dataSet that has the values associated with the two values in the column? Is this correct? If not, can you explain a little more?<br /></p></blockquote>
<br />
Yes,i want to mean is this.I only know join a sub table by the '=?' in the query?and how to do the multiple column?I used 'in ?' in the sub data set query,but is not useful.<br />
I'm sorry my english is not good...<br />
Thanks.
mwilliams
What's your BIRT version? I'll make an example of what I think you want to do with 2 dataSets that use the sample database.
hcy1986
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78641" data-time="1308253467" data-date="16 June 2011 - 12:44 PM"><p>
What's your BIRT version? I'll make an example of what I think you want to do with 2 dataSets that use the sample database.<br /></p></blockquote>
<br />
The version i used is 2.6.2,thanks,long for your sample
mwilliams
Here's one way to do it. I use a concatenate aggregation in the outer table and then use a filter to pick out the correct rows to display. Let me know if you have questions.
hcy1986
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78703" data-time="1308332530" data-date="17 June 2011 - 10:42 AM"><p>
Here's one way to do it. I use a concatenate aggregation in the outer table and then use a filter to pick out the correct rows to display. Let me know if you have questions.<br /></p></blockquote>
<br />
Thank you very much for your help.You do it using filter,i want to know is there a way to achieve it only in the query sql ?
mwilliams
The second example in the report below uses SQL and a variable to edit the query text for each subtable.
hcy1986
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78774" data-time="1308583393" data-date="20 June 2011 - 08:23 AM"><p>
The second example in the report below uses SQL and a variable to edit the query text for each subtable.<br /></p></blockquote>
^_^ so cute!Thank you very much,i finish the report by following your example and i have a question.<br />
on the beforeOpen event you write:<br />
this.queryText = this.queryText.replace ("****", ITParameter);<br />
i change it like this:<br />
this.queryText = this.queryText.replace ("****", row["Products"]);<br />
it make error,why?could you tell me the event execute sequence?
mwilliams
row["Products"] is a field that is computed from the outer table's dataSet to create a listing of all the Products in that group. You would have to assign this value to a variable from within the outer table's script to access it in the inner table's dataSet's script. Which is why I use the InnerTableParameter(ITParameter) variable to pass the value.
hcy1986
thank you very much,i understand at last...