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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
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.
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.
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