String header text box into footer (1 Viewer)

markmrx

New member
Local time
Today, 00:50
Joined
Oct 11, 2018
Messages
2
Hi all,
I've been searching high and low for a solution to something that would take me 5 mins to do in crystal reports :banghead:

I have a report which is grouped via customer. In the header I have iif fields
(=IIf(IsNull([DelAdd5]),IIf(IsNull([AddL5]),[DAdd5],[AddL5]),[DelAdd5])) to pull the delivery address from the customer and order tables. The items are then listed in a details section.
Then the report moved onto the next customer + details etc.

What I'm trying to do is list the Address5 text field (which contains the =iff's) that are in the headers into a text box in the report footer followed by a comma.
I.E 1st customer's post code, 2nd, 3rd, etc. So it should look like

nn10 4ft, lq2 3et, sq6 7ff, etc

I would normally just make a global string, put each one into that and dump the result in the footer.

I would be thankful for any help!
 

Ranman256

Well-known member
Local time
Today, 03:50
Joined
Apr 9, 2015
Messages
4,337
put this field calc in the query.

If you use it in the report then you must have all the fields on the report to build the Calc....fld1 & fld2 & fld3
so put it in the query instead.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:50
Joined
Aug 30, 2003
Messages
36,125
I would normally just make a global string, put each one into that and dump the result in the footer.

Also, what prevents you from doing this? It's perfectly feasible in Access. Putting it in the query as ranman suggests is a good way to go, but I'm curious what stopped you from using your normal method.
 

markmrx

New member
Local time
Today, 00:50
Joined
Oct 11, 2018
Messages
2
Thanks for the help! I'm such a muppet...
Seeing your comment Paul I just googled how to make & call global strings. Didn't think to just look it up! I spent all my time trying to loop ref the [address5] or use =dlookup.

Added a global var and in the details put in a If InStr(1, Postcode, Me!Address5.Value) = 0 Then Postcode= Postcode & "/" & Me!Address5.Value

to stop the duplicates... Boom!
Thanks again :)
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:50
Joined
Aug 30, 2003
Messages
36,125
Glad you got it working!
 

Users who are viewing this thread

Top Bottom