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

Conditional horizontal line 4

Status
Not open for further replies.

allyne

MIS
Feb 9, 2001
410
US
Hi Everyone,

I'm new to crystal reports and I'm using Crystal reports 11 and am trying to create a line in the details sections that will show only every five lines on a page and if there are not five lines left at the bottom of the page don't show the line. I'm also trying to draw a border that will show a border around the whole page and if there is only a half of a page only show a border around the half of the page and not the full page.


Thanks everyone for your help!
 
Lines can't be conditional.

But what you can do is to put your line in a sub section by itself and conditionally suppress that section.

To create a sub section, right click on the section area and "Insert Section Below". Use the section expert and use a conditional suppress of
Remainder(RecordNumber, 5) <> 0

Editor and Publisher of Crystal Clear
 
You can also add a text object and set either the top or bottom border to display.
You can then conditionally suppress the text object using same formula provided by chelseatech

~Brian
 
For the border, go into design mode and insert a box that extends from the top of the page header to the bottom of the group footer (if you have one, otherwise to the bottom of the detail section), but excluding the page footer (which you could minimize). This is easier to do if you set the page magnification to 200% or so. Make sure the bottom line of the box sits just above the bottom of the group footer section.

Also, if you want the count for the five lines to begin anew on each page, then create formulas like the following:

//{@reset} to be placed in the page header:
whileprintingrecords;
numbervar linecnt := 0;

//{@accum} to be placed in the details section:
whileprintingrecords;
numbervar linecnt := linecnt + 1;

Then change your conditional suppression formula to:

whileprintingrecords;
numbervar linecnt;
remainder(linecnt,5) <> 0

-LB
 
Hi Everyone,

Thanks for all your help! Everything works great except that I'm getting a line under the last record when the last record count is 5. Is there a way to suppress this. I can't seem to get that to work.

Thanks again for all your help!
 
Insert the line "If OnLastRecord Then True Else" before the line doing the conditional suppression.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top