Reputation: 63
I have a shipping label that needs to print on a Dymo Label printer with slightly different data on each of 3 pages. Can this be done with just one .rpt so the users only need to print one report, rather than three?
Upvotes: 6
Views: 42373
Reputation: 8640
It's been a while since I've used Crystal Reports, but you can setup your .RPT to have three detail sections (A/B/C) and have B and C "print new page before". That way each detail will be on three separate sections.
You shouldn't need to do anything crazy with custom formulas. All you need to do is display each piece of data three times, one on each page, with each page being slightly different.
(Of course you could use a header and just put the changing data in the details section... but that will take more time to get right then just repeating the required data in each data section.)
Confirmed
.RPT Detail Section Setup
Section Expert
Upvotes: 4
Reputation: 10035
If you can get your data to repeat three times, so each 'record' for your report is duplicated you could do something with multiple details sections (from the section expert create three details sections)
And then use the 'Supress (No Drill-Down)' with a formula to show each version of the label in turn, depending on the record number.
For each details section add the formula (using Basic Syntax)
formula = (Remainder(RecordNumber,3) <> 1)
formula = (Remainder(RecordNumber,3) <> 2)
formula = (Remainder(RecordNumber,3) <> 0)
Then create each slightly different label on each of the thee details sections.
I managed to get the three data rows by doing a cross join like so (in SQL Server) assuming a table with the data called ReportData
;with cte as
(
select 1 as ver
union
select 2 as ver
union
select 3 as ver
)
select * from
cte cross join ReportData
order by OrderNumber, ver;
Upvotes: 0
Reputation: 539
You have two basic methods.
You can use groups and use the option to start a new page for the group when it changes. The other option is to use subreports, but I would avoid this option. If you want me to elaborate, please let me know.
Upvotes: 0