Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report design as pre-printed paper Post Reply Post New Topic
Author Message
scandan
Newbie
Newbie


Joined: 31 Jan 2011
Online Status: Offline
Posts: 2
Quote scandan Replybullet Topic: Report design as pre-printed paper
     Posted: 31 Jan 2011 at 9:53pm
Hi,

I am working on a report for a client that needs the report layout look like pre-printed report with a table. I draw a box from the header section across the footer section and a horizontal line in the details section.

However, the report output did not meet the requirement because the report will display 5 records with line if there are 5 database records. The output required is to display the lines until the report footer no matter how many record it has.

Any idea? Thanks!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 Feb 2011 at 4:19am
This can be done only if your detail section will always be the same height - if you have any "Can Grow" data that may or may not have multple lines, there is no way to handle this. 
 
- First you need to determine the maximum number of lines that can appear on the report.
 
- You'll have one detail section that contains data.
 
- If you don't have any grouping in your report, you need to create a group on a field that only has one value in the report.
 
-  Create a separate group footer section for each possible line that you need to have that you may not have data for.  Each of these sections will be set up like your detail section (lines and any hard-coded text you may need), but will not include any fields.  If you will always have at least one row of data, you can create one fewer of these sections than the total lines that can appear on the report.
 
-  Create a running total that will count some unique identifier that is in your detail data and reset on change of the group where you've created the footer sections.  I'll call this {#RecordCount}.
 
- In the suppression formula for the first footer section put something like the following formula:
 
{#RecordCount} >= 1
 
For the second section use:
 
{#RecordCount} >= 2
 
And so on for each section.  This will suppress the "blank" sections that aren't required because there is a corresponding detail section with data.
 
-Dell
IP IP Logged
scandan
Newbie
Newbie


Joined: 31 Jan 2011
Online Status: Offline
Posts: 2
Quote scandan Replybullet Posted: 06 Feb 2011 at 3:08pm
It works great. Thanks for your help!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum