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

Problem with Blank line

Status
Not open for further replies.

akinia

Programmer
Nov 23, 2000
69
BE
Hi,

I've a report where I' ve to display the records in a certain order; their are classified like this:

Record 1
Record 2
Record 3
Record 4

Sometimes I've the four records, sometimes not, I've only the third, or fourth.

The problem is that I need to let how many blank lines I find between the record number and the Record number 1.
If I've the record 1 in my list, no problem, but if I begin with Record 2, I need a blank line and so on.
What I've done is to insert a new section below and compare the present field with the previous to determine if I need a blank line or not. It works, but only between to records.
If I begin with Record 3, I get only one blank but I need two.
I hope that you understand what I'm trying to explain.

Any suggestion will be appreciated.

Thanks

 
You have to know what you have before you start, so using the Previous () function isn't going to help.

Off the top of my head you are going to need four formulas. Each testing for one of the four values:

if Field = val1 then 1 else 0

if Field = val2 then 1 else 0

if Field = val3 then 1 else 0

if Field = val4 then 1 else 0

Now do 4 subtotals, one for each formula by group.

Now you can say if subtotal of Val1 = 0 then print the first blank line. And the same for each of the four blank lines you are creating.

Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top