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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate record x times on report

Status
Not open for further replies.

kriesten

Technical User
Apr 16, 2001
13
US
Is there a way to duplicate a record on the same page of a report, perhaps the number of times duplicated would be through a user defined parameter? Any help would be appreciated.
 
I wrote an article in my Novermber newsletter that shows one technique using an extra table of numbers to force inflation.


You can also put in multiple (identical) detail sections (suppress those not needed), as long as the records can be consecutive

Or, you can use subreports. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Easiest approach is to insert the same section (e.g., Detail section) several times and suppress each one according to the parameter. For example Detail Section C
would be suppressed if the parameter is less than 3.

Cheers,
- Ido ixm7@psu.edu
 
I think you should describe how you want this field sprinkled across the report.

for example is it just a single field appearing over and over again in a section....or is it spread out over the whole report...or is it to control the visibility of sections somehow as well.

If it is just a single field you might do something like this:

In an initialization formula placed in the report header (or in a Group header if appropriate) and suppressed...initialize the count to zero

{@initialization}
numberVar OccuranceCount := 0;

**********************************************************
now in the conditional suppress of the field in question, create the following formula

WhilePrintingRecords;
numberVar OccuranceCount;
BooleanVar result;
OccuranceCount := OccuranceCount + 1;

if OccuranceCount > {?User_Occurance_Parm} then
result := True
else
result := False;

result;
**********************************************************

NOTE: the result of this formula always must be either true or false to work in the conditional suppress...but that doesn't stop you from doing some math before that.

In the above formula, the field should be supressed once this field has been printed more times that the user wants.

Just copy and paste the field wherever you want.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top