Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic columns display in Crystal Report

Status
Not open for further replies.

SUACC

Technical User
Apr 23, 2014
3
US
I want to compare the rows from a table and display only changed columns group by MemberID in Crystal Report.
Below is the example

ID Type Comp Date Rep Number Change Date Col1 Col2 Col3
id123 PC 3/31/2014 12354 Paid OP AA
id123 PC 3/31/2014 12354 Paid OP AA
id123 PC 3/31/2014 12354 4/5/2014 Pending OP A1

id235 CL 3/31/2014 1250 Paid OP AA
id235 CL 3/31/2014 1250 4/5/2014 Pending OP A1
id235 LF 3/14/2014 1867
id235 LF 3/14/2014 1867 4/4/2014 Paid OP AAAA


Expected Result is to show only changed columns in the report

ID Type Comp Date Rep Number Change Date Col1 Col3
id123 PC 3/31/2014 12354 Paid AA
id123 PC 3/31/2014 12354 4/5/2014 Pending A1

id235 CL 3/31/2014 1250 Paid AA
id235 CL 3/31/2014 1250 4/5/2014 Pending A1
id235 LF 3/14/2014 1867 4/4/2014 Paid AAAA


Can this be done in Crystal Report ?

 
You could create a formula that concatenates all 10 columns and then insert a group using the newly created formula.
then place all fields in the GH or GF
 
I have tried to do this but unable to do so. Could you provide the code to get it done?
 
Open 'Field Explorer' (View | Field Explorer )
Right click the 'Formula Fields' option and select 'New'
Give the formula a Name. e.g. GroupingFormula
In the Formula Workshop double click each data field you have listed but add a concatenation operater (&) in between each field e.g. {Field1}&{Field2}&{Field3}&{Field4}

Once you have used all fields save the formula.

Then you need to add a group and select this formula to use for your grouping.( Insert | Group )

Lastly place each field you listed in the Group Footer as you would in the details section
 
Does crogers111 solution help? If not, I think you are going to need to explain in a bit more detail.

Your sample data is difficult to understand. Is this what it actually looks like:

[pre]
ID Type Comp Date Rep Number Change Date Col1 Col2 Col3

id123 PC 3/31/2014 12354 Paid OP AA
id123 PC 3/31/2014 12354 Paid OP AA
id123 PC 3/31/2014 12354 4/5/2014 Pending OP A1

id235 CL 3/31/2014 1250 Paid OP AA
id235 CL 3/31/2014 1250 4/5/2014 Pending OP A1
id235 LF 3/14/2014 1867
id235 LF 3/14/2014 1867 4/4/2014 Paid OP AAAA
[/pre]
If this is correct, you will need to explain the proposed solution. Based on my (admittedly limited) understanding, I would have thought the expected solution would be:

[pre]
ID Type Comp Date Rep Number Change Date Col1 Col2 Col3

id123 PC 3/31/2014 12354 Paid OP AA
id123 PC 3/31/2014 12354 4/5/2014 Pending OP A1

id235 CL 3/31/2014 1250 Paid OP AA
id235 CL 3/31/2014 1250 4/5/2014 Pending OP A1
id235 LF 3/14/2014 1867
id235 LF 3/14/2014 1867 4/4/2014 Paid OP AAAA
[/pre]
The difference is that I see that each row for ID235 is unique. Can you explain please how you arrived at your solution.

Cheers
Pete
 
Thanks for all the responses. Let me explain. Example- All records are processing automatically and all agents records get updated. Sometime few records may not update properly hence support team validate the records and update it manually using portal. There are several fields support team can update. They want to see only those records and columns which are updated. They dont want to see all the columns. If today, team update 3 columns then show only three columns, if update 5 columns then show only 5 columns. It should be dynanic and I know there 20 columns could be updated.

What could be the formula placed to read the records row by row display only changed columns in Crystal report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top