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)
Need to display same data twice in the same table with some filtering
ngocvdoan
Hi,
I have a table that binds to one dataset. Inside the table, I inserted a group on EmpID.
Now on the first row, I want to display all the records where EmpID = 103 and do the aggregation sum on their salary and display the Total below it.
On the second row(same table), I want to display all the records where EmpID <>103 and do the aggregation sum on their salary and display right below it.
This is kind of a filtering but is there a way I can do this within one table one dataset? Or do I need to create a second dataset and then insert the second table inside the first table to accomplish what I need?
Please let me know I would appreciated.
Thanks.
Find more posts tagged with
Comments
Hans_vd
Hi,<br />
<br />
You could create a computed column in the data set like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (row["EmpID"]==103) {
return 0;
}
else {
return 1;
}</pre>
<br />
and then in the table create a grouping on the computed column.
ngocvdoan
Thanks Hans. Let me go and give it a shot and will let you know how it goes. Thanks. ND
ngocvdoan
Thank you very much I tried it and it is working great.
ngocvdoan
Hi,
I have another question. I would like to break the report into two groups (basically two reports) based on a specific value returned by the dataset. For example, if EmpID == 103, then break the report into two reports (the report will be exactly the same).
Is this possible? If so do you know how I can accomplish this? I'm doing this for my client.
Thanks,
ND
kclark
If EmpID == 103 will the report be broken into two reports or will it be to copies of the same report?
ngocvdoan
Hi K,
Can you please provide the solutions to both scenarios if applicable?
Thanks,
ND
ngocvdoan
<blockquote class='ipsBlockquote' data-author="'ngocvdoan'" data-cid="112760" data-time="1356552892" data-date="26 December 2012 - 01:14 PM"><p>
Hi K, <br />
<br />
Can you please provide the solutions to both scenarios if applicable?<br />
<br />
Thanks,<br />
ND<br /></p></blockquote>
ngocvdoan
Hi K,
So basically what I'm trying to do here is to break the report into two different Reports when EmpID =103. But for the first report where EmpID =103, I want to hide some data. Then for the second report where EmpID <>103, I would like to display some data and hide some other.
It will be a copies of same report but for each of them will display data differently.
Thanks,
ND
kclark
How are you deploying the reports? Showing and hiding the data based on the EmplID can be done by building an expression in the visibility tab similar to<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(params["ID"].value=="103") {
false
} else {
true
}
</pre>
<br />
If you also want to run the same report showing and hiding data on each one for EmplID == 103 you can run the report once and then redirect back to the same reports using parameters to tell the report what to show or hide. If you want to use the DEAPI in java you can run each report one after another as PDF/XLS/etc. Assuming you are using the web viewer I'll work on an example and post it on here for you.
ngocvdoan
Thank you for your help K. I will try what you just suggested and see how it goes. I'm also thinking using the Break function inside Group with some tweaking to accomplish this too.
Thank you and have a great holiday.
ND
kclark
No problem! I was also thinking depending on how you want to view the report if EmpID == 103 you could have a link at the bottom pointing to the second report passing along the parameters also.