Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Displaying records Post Reply Post New Topic
Author Message
crystalgal
Groupie
Groupie
Avatar

Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Quote crystalgal Replybullet Topic: Displaying records
    Posted: 26 Sep 2012 at 6:32am
I am facing a problem and hoping to get some answers:
database has all values in one column, results,
i used
(case when result = bag then result else 'N/A' end) as A,
etc....

now shows each record in different column:
A           B        C           D        results
blank    book     blank     pencil       computer
paper    blank    pen        blank       bag

I want in the report:
when column result = bag show under A paper else N/A
right now what report shows:
when result = bag it shows pencil under A, just grabs the first available record
is there a way to rectify this?

TIA
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 26 Sep 2012 at 7:19am
this is a tough one.
What you need to do is to turn multiple rows into 1.
 
What I would to is use shared variables and for each 'final' row  I would fill in the correct variable, then in the group footer (which would be for the 'final' row) display the values.
 
something like:
shared stringvar a;
shared stringvar b;
shared stringvar c;
shared stringvar d;
shared stringvar e;
if ({table.field}="bag" then
 a:= {table.field}
else
 a: = "n/a";
 
repeat for other values.
 
in group footer you would have several formulas, 1 per variable that look like:
shared stringvar a;
a
 
suppress the detail section, and hopefully all works as desired.
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.