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

How to FORCE lines to print if no records

Status
Not open for further replies.

behbeh

Programmer
Mar 10, 2001
48
US
Hi!
I'm creating a 6+ page report that needs it's subreports to be laid out specifically on each page, record independent. For example, if there are no records in one of the subreports, I still need to print 10 blank 'lines'; or if there are only 3 records, I need to print 7 blank 'lines' after the 3 printed records. I realize I need to use the COUNT function some how, but I'm lost after that!
Can this be done in Crystal Reports 8.5?
 
The following should give you what you want. It is replicating a "line return" for every record count less than 10. I placed it in the report footer of the sub-report

ReplicateString (chr(13),10-Count ({field}))
Mike

 
Here is an easier way perhaps

Simply check off the "New Page after" box for the section the report is in.

 
Thanks for your quick response, Mike!
Is there a way I can actually print a line? This report is a survey and if the person filling out the survey wants to add new data, I need to have lines already printed on the page (kind of like notebook lines). Currently, I have a line drawn in the detail section with the field on top of it. If there are no records, I still need to display this line, 10 times. I tried your formula with a continuous underscore in quotes (replacing the Chr(13)) and I got something really funky. Can this be done?
 
rather than create the lines in the Main report...why don't you do it in each subreport.
 
I am doing this in the subreports since there are 2 to 3 subreports on each page and some subreports don't need lines...they's just rows of checkboxes.
 
so on the subreport that needs lines...can you not create the 10 sections of details (the ten lines you want) and fill them as needed.

If you are gathering data...make these 10 sections in the report footer and suppress the rest of the report...you save the data you want to variables that are initialized to null.

Then create display formulas for each line in the report footer that will show data or null.

This will give you a consistant subreport size and save a lot of headache

Jim

 
Holy Cow!
I'll give it a shot!
Thanks so much for all your help!
:->
Carol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top