Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: display row data Post Reply Post New Topic
Author Message
andicsc
Newbie
Newbie
Avatar

Joined: 03 Jul 2008
Location: Australia
Online Status: Offline
Posts: 12
Quote andicsc Replybullet Topic: display row data
    Posted: 05 Oct 2009 at 8:30pm
I have an address table like :
 
ID          name           Address1                City              State  
1234     john Smith    15 SUNSET BLVD   RICHMOND    CA
1234     john Smith    PO BOX 1000         SUNSET        CA
 
How can I print the report like this
                                                            Work      Work
ID       Address1     City          State    Address1 City       State
1234  15 SUNSET   RICHMOND    CA   PO Box     SUNSET  CA
 
ThanksSleepy
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 06 Oct 2009 at 6:12am
create a formula using shared variables.  something like:
shared stringvar add;
shared stringvar workAdd;
 
if {table.field}="work" then (
 workAdd := {table.fieldAdd}
)
else(
 add := {table.fieldAdd};
);
 
you would repeat for all variables.  this would go in the detail section.  You might want to reset the values to "" in the group header for, in case something is NULL in the database.
 
finally, in the group footer, you would call several formula (one for each field) to display your home/work addresses, something like:
shared stringvar add
 
HTH
IP IP Logged
andicsc
Newbie
Newbie
Avatar

Joined: 03 Jul 2008
Location: Australia
Online Status: Offline
Posts: 12
Quote andicsc Replybullet Posted: 07 Oct 2009 at 10:52pm
thanks Lockwelle
 
I'm pretty new to crystal report, can you please tell me how to reset the group, is it in group header ?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Oct 2009 at 6:04am

usually it is in a group header, and it is pretty easy,

shared stringvar workAdd := "";
shared stringvar add := "";
 
 
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.