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)
Suppressing the data fields inside a group
Sankari
Hi All,
Please help me out in the following requirement.
To suppress the data fields(row wise)except some fields by comparing the current row with Previous row within a group.So GroupBy alone would not help in this situation.
Please find the sample..
GroupID/GroupName/DivisionID/FeeType/ClaimLOB
1234/abc/0001/MPSCL/A
1234/abc/0001/MPSCL/B
1234/abc/0001/MPSCL/C
1234/abc/0001/MPSCL/D
1235/****/0002/MSBI/E
1235/****/0002/MSBI/F
1235/****/0002/MSBI/G
Now it has to be displayed as below:
GroupID/GroupName/DivisionID/FeeType/ClaimLOB
1234/abc/0001/MPSCL/A,B,C,D
1235/****/0002/MSBI/E,F,G
No Need to suppress FeeType
We have created as computed column for supressing the data.
But the output is not fully correct.
It is displayed as below
1234/abc/0001/MPSCL/A
1234/abc/0001/MPSCL/B,C,D
1235/****/0002/MSBI/E,F,G
I have used the following script in ONCREATE of Detail row to concatenate the ClaimLOB values
ClaimLOB += (ClaimLOB != "" ? "," : "") + this.getRowData().getColumnValue("CLAIM_LINE_OF_BUS");
and i initialized the ClaimLOB="" in initalize script and in group header ONCREATE script.
For Suppressing the data fields I have used a computed column in the dataset.
CALC:
if (GroupID==null && GroupName==null && DivisionID==null && FeeType==null ){
GroupID=row["GROUP_ID"];
GroupName=row["GROUP_NAME"];
DivisionID=row["DIVISION_ID"];
FeeType=row["CALCULATION_METHOD"];
1;
}
else if (GroupID!=row["GROUP_ID"] || GroupName!=row["GROUP_NAME"] || DivisionID!=row["DIVISION_ID"] || FeeType!=row["CALCULATION_METHOD"])
{
GroupID=row["GROUP_ID"];
GroupName=row["GROUP_NAME"];
DivisionID=row["DIVISION_ID"];
FeeType=row["CALCULATION_METHOD"];1;
}
else
{
2;
}
So while displaying in the report I have grouped this report by GROUPID,DIVISIONID,FEETYPE and i have placed all the columns in FEETYPE group footer.If CALC==1 then all these columns will display.
Please reply me As early as possible.
Regards
Sankari
Find more posts tagged with
Comments
235383
Kindly help me on this........
mwilliams
Does the suppress duplicates option not help in your situation?
Sankari
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77799" data-time="1306875912" data-date="31 May 2011 - 02:05 PM"><p>
Does the suppress duplicates option not help in your situation?<br /></p></blockquote>
Hi mWilliams,<br />
<br />
Suppress duplicates option is to suppress the values in a row wise or Column wise.<br />
<br />
But my requirement is to hide the column value if it is appearing more than once and it may not be duplicate.<br />
<br />
I can achieve the above requirement but that same table has concatenated value with that value i am unable to achieve my target.<br />
<br />
Thanks<br />
Sankari
mwilliams
Do you think you could set up a sample report like what you're talking about using a CSV file of your data for the datasource? Thanks.
Sankari
Hi mwilliams,
Please find the sample design,Actual and expected output.
Please help me to achieve the expected output.
Thanks in Advance
Sankari
mwilliams
Take a look at the table I added. I didn't use your computed columns at all. Just used grouping, the drop feature and an aggregation to concatenate the last column's values. I changed the data file to all have the same groupID to get the output you specified. Let me know if you have questions.
Sankari
Hi williams,
Thanks for ur reply.
I did look at the report u have attached. But its alignment does not sync with my requirement.The each header displays its own record.
I have attached a sample report design .
If you run the report it will show the dataset values without any supression logic.
And sample display of the result is been attached as well.Please check and let me know how to implement this.
mwilliams
I'm confused with the statement that the report I attached doesn't do what you want. It does exactly what your original "expected output" showed. I'll take a look at the new file and see if you have anything different.
mwilliams
It seems that there are different criteria to what you do with each column. Some group based on another column and some just list the different values that are listed in a column. Can you explain more about how you come up with each column's values? It almost looks like you'll have to have embedded tables to do what it seems that you're wanting. If you can let me know the criteria for the columns, I'll help further.
Sankari
Hi Mwilliams,
Thanxs for your prompt reply.
Please find the screenshot for the sample data.
Please note that the values across cloumns are not related to each other.Just it has been given for example.
U please concern only on the values and help us getting the output.
U can also see some blank values under Coverage amt and excluded amt.
We are using a flag which is not used in the dataset . If the flag is '1' we see values on coverage amt and if the value is '0' we get values in excluded amt.
Same condition for start flag and end flag.
But in the final output has to exclude the balnk values and has to display the amt adjacent to each other.
mwilliams
This is pretty close to what you want. The 1-20 values are not in order because of the need to group by fee type to get the comma separated values. Hopefully this helps give you some idea of a way to suppress your values the way you want. Good luck.
Sankari
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78534" data-time="1308151615" data-date="15 June 2011 - 08:26 AM"><p>
This is pretty close to what you want. The 1-20 values are not in order because of the need to group by fee type to get the comma separated values. Hopefully this helps give you some idea of a way to suppress your values the way you want. Good luck.<br /></p></blockquote>
<br />
<br />
Williams,<br />
Thank you very much for ur posting. It is working fine and coming as expected.<br />
I still need to modify my query for couple of columns.<br />
In the attached example consider Fees and FeesType .<br />
Both the colum values has to be displyed as it appears in the dataset.I.E without using ther binding that we are using currently.<br />
<br />
SOme values in the above 2 columns can also be blank.Hence it has to be displayed along with the blank.
Sankari
Please help me to solve this issue.
Thanks in Advance
Sankari
Sankari
Please help me to solve this issue.
Thanks in Advance
Sankari
Sankari
Please help me to solve this issue.
Thanks in Advance
Sankari
mwilliams
I'm not sure I understand. You need to show all of the values in these two columns? In the example above. You suppressed the duplicates in the fees column to show a blank value. Maybe I'm misunderstanding you. Let me know.
Sankari
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="79412" data-time="1309448581" data-date="30 June 2011 - 08:43 AM"><p>
I'm not sure I understand. You need to show all of the values in these two columns? In the example above. You suppressed the duplicates in the fees column to show a blank value. Maybe I'm misunderstanding you. Let me know.<br /></p></blockquote>
<br />
Sorry for the late reply Williams..<br />
<br />
Ys u are right.<br />
<br />
We are almost getting the expected output.<br />
<br />
But still need some more accuaracy..<br />
<br />
I have attached you a file in excel format.<br />
<br />
First part holds the output of what we are getting now.<br />
<br />
Second is accurate expected output.(The text highlighted in yellow has to be supressed as well)<br />
<br />
We have implemented the same aggregate functions in the report for the supression of values.<br />
<br />
Please look into both the outputs and kindly help me on this...<br />
<br />
Thanks
mwilliams
Can you attach the excel file? It looks like it did not get attached.
Sankari
Hi williams,
Please find teh excel and pls clarify the same.
thanks in advance
mwilliams
Ok, I see now. One thing you could do would be to store the current row's values into variables or an array, then when you get to the next row, you'll have the last row's values to check whether to hide or not. After checking, you'd reset the variables or array to the current row to be ready for the next row's check. Hope this helps.
Sankari
Hi Micheal,
Can you please explain with some sample report?This is an critical requirement
Thanks
Sankari
Sankari
Hi Micheal,
Can you please explain with some sample report?
This is an critical requirement
Thanks
Sankari
mwilliams
Check out the initialize script of the report and the visibility expression for the country element. You'll see an example of what I'm talking about with your report. Normally you could just use the suppress duplicates option, but since you're using grouping in your report, you'll have to suppress duplicates yourself, like this.