Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Editing output in a report Post Reply Post New Topic
Author Message
JoshIntern
Newbie
Newbie


Joined: 04 May 2015
Location: United States
Online Status: Offline
Posts: 2
Quote JoshIntern Replybullet Topic: Editing output in a report
     Posted: 07 May 2015 at 4:22am
Alright, I had never used crystal reports prior to two days ago and I have been trying to do something that I believe to be nearly impossible, but I would like some more opinions on it.

Our database is filled with product numbers that contain a "-L" or "-S" on the end, for "Large" or "Small" sizes, respectively. We have four different possible sizes: Small, Medium, Large, and X-Large. Each different size has a different UPC code. What we are trying to do is to remove the "-L" from the end of all product numbers, and concatenate the UPC codes with ", " as a delimiter.

We already have a function titled @Model to take the "-L" part off of the name, and I have made a formula using the Next() function to test and concatenate the UPCs, but as I have read everywhere, Crystal Reports can only access one record ahead or behind the current record being processed. I also attempted a recursive approach(I have experience with programming) and Crystal reports does not support that either.

Here is an example of what is going on, it has model numbers like this-

D101MN-L 84564789456 Large

D101MN-S 84564789455 Small

D101MN-X 84564789454 X-Large

D101MN-M 84564789457 Medium

C296KN-L 84651325896 Large

And what I want to make is this-

D101MN 84564789456, 84564789455, 84564789454, 84564789457 Large, Small, X-Large, Medium

C296KN 84651325896 Large

This may be super difficult, again I'm not sure since I had never used this software before Monday.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 May 2015 at 5:42am
just to be clear, you are hoping to make a report output that changes multiple lines into one , not actually change your source data, correct?
IP IP Logged
JoshIntern
Newbie
Newbie


Joined: 04 May 2015
Location: United States
Online Status: Offline
Posts: 2
Quote JoshIntern Replybullet Posted: 07 May 2015 at 6:11am
Correct, Its not going to change the data in the SQL db, but simply edit and concatenate the information given from the database to go on the report differently.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 May 2015 at 6:20am
having it "go on the report differently" may change how you need to approach this but basically you just group on the "item"
Left(table.code,5)
then use shared variables to create your strings to display in the group footer.
 
 
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