Adding dummy data to a report (1 Viewer)

bayman

Registered User.
Local time
Today, 00:48
Joined
May 25, 2001
Messages
96
I have a requirement to print 10 records per page...even the final page if the number of records to print isn't divisible by 10. For example, if I have report detailing Name and Address, and have 51 records, I'll need to include 9 records at the end that say 'Dummy Name' and 'Dummy Address'. Is there a way to do this?
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:48
Joined
Aug 11, 2003
Messages
11,695
You can do this....

Make your report based of a Union query...

Your original query
UNION ALL
Select * from DummyTable

This dummy table needs to match your original query in the # of field and/or field types.
Then in code get the result of your original query, count the records and get the dummy records

Perhaps you can even add a counter to your dummy table (extra columns is not a problem as long as you dont query them)... That contains a number 1 ... 9.
Put a where on this:
Where recNumber <= (Select count(*) From yourOriginalQuery)

Not sure that will then work with a Union... but with code it sure will...

Hope you get the idea and take it forward. Ask more questions if you need to...

Good luck !
 

Srinvb

Registered User.
Local time
Today, 05:18
Joined
May 25, 2009
Messages
10
I would probably try the crystal report Arrays.By creating dynamic arrays and assigning the fields to the arrays.

Then i can check each upper bound of an array and if they are not multiples of 10 then i could always add an empty string to an array and increase my counter to accommodate the remaining records.

For more info on arrays
limitations array can hold up to 1000.

check the below link.
https://www.sdn.sap.com/irj/scn/go/...ary/uuid/50477290-db1d-2b10-ce9c-a1b38197b8cb

try this.
 

Users who are viewing this thread

Top Bottom