Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Print mult address for sample facility Post Reply Post New Topic
Author Message
hmatyas
Newbie
Newbie


Joined: 23 Jan 2008
Location: United States
Online Status: Offline
Posts: 6
Quote hmatyas Replybullet Topic: Print mult address for sample facility
     Posted: 19 Mar 2008 at 7:25pm

Hi

 
I'm trying to combine both a facility address and mailing address to be next to each other.  I'm currently only using 2 table to get it to work
 
The way that the tables are written is something like this
ID_S     Desc                       
1           Fac Address            
2           Mailing Address
3           Alt Mailing Address
4           Corp Address
 
 
 
The second table
CI    Company       Street       City       State       Zipcode         ID_S
1      Joe               12 Main Sr  Cudahy      WI         53221            1
1      Joe                34 North St  Oak Crek WI         54312            2
2      Smith            56 West Av   Milw         WI        53215            1
3      Smith             78 Apple       Milw         WI        53214            3
 
 
 
 
Printout
 
 
Joe Company
12 Main Str                         34 North Str
Cudahy, WI  53221            Oak Creek, WI  54312
 
 
 
 
 
 
 
What I want is to generate a bill showing both the Facility address and the mailing address.  I tried to printout both the facility address and the mailing address without success.
One being a conditional function
 
FacAdd
 
IF ID_S = 1
THEN FacAdd = [Street]
 
 
FacMail
IF IS_S = 2
THEN FacMail = [Street]
 
 
 
When the user starts the program, they enter an invoice number which selects only one Company ID.  Right now I get either the facility address or the mailing address,not both, or errors on my function.
 
Thank you for any help that maybe given.
 
 
 
Harvey
IP IP Logged
hmatyas
Newbie
Newbie


Joined: 23 Jan 2008
Location: United States
Online Status: Offline
Posts: 6
Quote hmatyas Replybullet Posted: 20 Mar 2008 at 6:25am
I figured it out,  In the formula field, I created a new formula, FacMail
 
StringVar FacMail1;
FacMail1 := IF({ADDRESS.ADDRESS_L_S}=6) Then {ADDRESS.ADDRESS_LINE_1};
 
Then I created another formula field FacAdd
 
StringVar FacAdd1;
FacAdd1 := IF({ADDRESS.ADDRESS_L_S}=1) Then {ADDRESS.ADDRESS_LINE_1};
 
 
It works.
Harvey
IP IP Logged
hmatyas
Newbie
Newbie


Joined: 23 Jan 2008
Location: United States
Online Status: Offline
Posts: 6
Quote hmatyas Replybullet Posted: 20 Mar 2008 at 6:49am
Except that there are two lines printed instead of one.  In order to get around this problem, I had to use a running total RFacAdd and RFacMail, set both to Max and placed them in the footer.  Now I get both the Facility address and the mailing address on the same line.
Harvey
IP IP Logged
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