Joined: 22 Dec 2011
Online Status: Offline
Posts: 6
Topic: Shared Variables Posted: 02 Aug 2018 at 10:09pm
I hope someone can help and thanks in advance to all that read my issue - much appreciated. I'm very computer savvy (but clearly not in this particular case).
I've developed a report that when completed is saved and passed into some other software as a .rpt file with data saved therefore I have some data rules that I must obey for the software outside of Crystal. My point here is that the solution I found to the issue below isn't compatible with the 3rd party S/W.
The report prints a group as follows:
GH1 (supressed drill down ok) - {group header data} {detail data email address where a field from below = "OTH"}
Detl - some data, some data (value = "PAR")},some data { email_address}
detl - same data, some data (value = "OTH", some data { email_address}
detl - same data, some data (value = "CPT", some data { email_address}
GF1 (suppressed )
The detl line that contains "OTH" can be anywhere in an unknown number of detl lines.
My issue is that when a certain field in the detl data = "OTH" I would like to print the email address of that detail record in the group header. I can do this using a sub-report however the software this report is fed into doesn't recognise data from a sub-report. I have tried to get the data from the sub-report back to the main report using sharedvariable and whilereadingrecords but this doesn't seem to work.
I would be very grateful if someone on the forum could give me some pointers. I can work things out but if you suggest a function of feature that might work please could you show a simple example
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 03 Aug 2018 at 4:31am
You can also try this
create a formula field
//EmailGHDisplay
If table.field = 'OTH' then table.email else ''
Add a group summary of the @EmailGHDisplay as a MAX
place that summary in the GH.
This assumes you only have one row per group that meets the OTH condition. If you have multiple OTH emails you need to decide how you want to resolve that 'conflict'. This will show you only one that is the max email string
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