Click to See Complete Forum and Search --> : dummy barcodes in crystal reports 10
rachelha
April 28th, 2009, 02:22 PM
I'm trying to create a report with 500 plus barcodes in one report. I would like to have 10 barcodes per page. The last page of the report may not end up with 10 records, how do I put in dummy barcodes for the remaining reocrds. For instance, on the last page, I have 3 records, I want to put in 7 dummy barcodes?
Ned Pepper
May 5th, 2009, 11:36 AM
There are probably several ways to accomplish this. One that comes to mind is to create a table of integers which contains just the numbers 1 through however many you will need to drive your report.
You will need a field in the table(s) of data to link to the integer table. Then do a left outer join from the table of integers to the table of data. The idea is to force the query to return all your data, plus a great many more records of integers joined to null data.
Once you have this, create a formula in your report which examine a field in the data table and sets a global boolean based on ISNULL()
whileprintingrecords;
global booleanVar suppressor := isnull({DATA.FIELDA})
drop this formula on the page footer of your report. Then suppress the details of the report base on the variable, using the suppression formula
whileprintingrecords;
global booleanVar suppressor;
the report will now print a page, examine if the data is null and if not print the next page. If the data is null, no more pages will print. this will give you a full page of recrods. The a formula that displays your data when data is not null and some default value when the data is null will compelte the task.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.