Skip to Content
0

Multiple values on one line

Feb 24, 2017 at 09:45 PM

52

avatar image

I know Crystal wasn't written to do this and I've looked through this Q&A section for over an hour trying to find a question similar to mine and I can't.

I have a field which returns two values, causing 2 detail lines to be created for (1) item. As you can see the item code is the same, but there is a BES and an SAP number. For our customer, I need to write a report which will list both the BES and SAP number on the same line.

item code description customdescription
123456 BES 13121212
123456 SAP 10000000

The item has two descriptions for it causing two detail lines. I need to get both of the customdescription numbers on the same line for the item code. I can group by item code and so far I see that something has to be done with the footer, but other than that I'm clueless.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Brian Dong Feb 24, 2017 at 10:00 PM
0

Hi Shelley,

You're correct about grouping on the Item Code. In the Group Header create a formula like:

WhilePrintingRecords; 
StringVar Descr := ""; 

This formula will reset the string for each Item Code.

In the Detail section create a formula like:

WhilePrintingRecords; 
StringVar Descr; 

Descr := Descr & " " & {table.CustomDescription}; 

This formula will concatenate the Custom Description to the variable Descr.

In the Group Footer create a formula like:

WhilePrintingRecords; 
StringVar Descr; 

This formula will display the result of Descr for each Item Code.

Hope this helps,

Brian

Show 1 Share
10 |10000 characters needed characters left characters exceeded

BRIAN!!!! THANK YOU

This worked absolutely perfect. I don't know much about string or shared variables, but this worked. I truly appreciate your taking the time to answer this question for me.

0
Ian Waterman Feb 27, 2017 at 09:14 AM
0

If you want two separate columns for the descriptions create two formalae

@SAP

If {description} = 'SAP' then {customdescription} else ' '

@BES

If {description} = 'BES' then {customdescription} else ' '

Then Add Maximum summaries of these two formula to either your itemcode group header or footer and suppress detail line

Ian

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Ian - I did the first part, but didn't think about the part. This worked as well!!

Thank you to both of you!

0