Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra pages on field quantity? 1

Status
Not open for further replies.

PapaSmurf

IS-IT--Management
May 16, 2001
48
GB
I have a single page report working fine, showing a single item and it's details of an order. I want crystal to produce a separate page for each item depending on the quantity required of that item. Each page will be the same except for the serial number, which I wish to be something like:

totext(LineNumber},"000")& totext(PageNumber, "00")

I just need a cunning way of getting to crystal to produce X pages where X=quantity of items.

Is there any way of doing this?

 
So if the qty on order is 5, you want 5 pages, if it is 12, you want 12 pages, etc? Software Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
PapaSmurf,

This is ugly, but it works. I did this exact thing for an "X number of labels" report.

You need to setup a table in your database (or in an external database such as MS Access, which is what I had to do) with numbers in it, 1 through 300, or whatever you could reasonably expect to be the maximum number. Join this table to your quantity field using a less than or equal to join. This way, crystal will return 5 records for the qty 5, 20 for the qty 20 , etc.

Then your report is very straightforward from there. This is the type of record inflation that often happens in one-to-many relationships, which we usually work hard to avoid. In this case we do it on purpose.

If you have to go the MS access route, as I did, I could not perform a less than or equal to join because of different data types. To compensate for that, I pu the number 1 in there once, 2 twice, 3, 3 times, etc all the way up to 300, 300 times. I then had an equal join and got the desired results.

I have a MS Access table that automatically populates itself based on a parameter field I can email you if you are interested.

Let me know if you have any questions. Software Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top