I have a legacy database in which data is stored in a way similar to:
id,a1,a2,a3,a4,a5...,a20,b1,b2,b3,b4,...,b20,c1,c2,c3,c4,...,c20
My task is to select top 3 values from the b columns and print corresponding a and c values. So, if the max values are in b5,b1,b17 then I need to print on the report something like this:
a5, b5, c5
a1, b1, c1
a17, b17, c17
I tried using pivot tables and cross tabs, yet with no luck (well, this may be the result of the fact, that I have only basic understanding of Crystal Reports).
May I ask for some tips or guidelines to how can I achieve this?
Thank you.
Unfortunately, Crystal Reports doesn’t have an Eval() function, which would certainly help.
Here’s a hack-ish approach:
Another approach is to create a UNION query in the report’s Command:
Reporting on this approach is trivial.