Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: creating serial numbers Post Reply Post New Topic
Author Message
developer
Newbie
Newbie
Avatar

Joined: 04 Dec 2009
Location: Canada
Online Status: Offline
Posts: 6
Quote developer Replybullet Topic: creating serial numbers
     Posted: 04 Dec 2009 at 8:03am
Hi all,
I'm trying to generate a grid of numbers in a report that should fit on 1 page. The user selects a part number and a starting serial number.Crystal returns 1 record from the database.I display some fields for that part number.I also need to display 500 numbers starting from the  entered serial number.
I've tried a for loop & placed the formula field in the detail section but Crystal only displays the 500th number, it doesn't display at each occurance of the loop.
 
Does anyone have any suggestions?
 
Thanks
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Dec 2009 at 6:08am
Here's the problem...Crystal will not create data, and generating 500 serial numbers is creating data.  You only have 1 data row, so Crystal will only display 1 row.
 
The simplest way to do this is to use a stored proc, and have it create all the duplicate rows, with or without serial numbers, and then Crystal read the results and display them.
 
I know it sounds silly, but this is how all the reporting tools that I have used operate.
 
HTH
IP IP Logged
developer
Newbie
Newbie
Avatar

Joined: 04 Dec 2009
Location: Canada
Online Status: Offline
Posts: 6
Quote developer Replybullet Posted: 07 Dec 2009 at 11:24am

Hi Lockwelle,

I found another solution before I read yours. I created a subreport that I pass the starting serial number that the user entered & then generate the serial numbers based on all records in that same table, which are about 1000. I put the serialnumber in the details section with multiple columns ticked off.Then I stop displaying the serial numbers when my counter that I setup reaches 500.
 
Thanks again
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Dec 2009 at 11:40am

hadn't thought of a subreport...something to tuck away for future reference.

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