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!

Suppress printing of fields on a report.

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
623
GB
There is a single cursor containing the lines of a batch of invoices : Date, Invoice Ref, Customer name, Line value . . .

A report is produced from this cursor using a .frx file. It is grouped by Invoice Ref. On the report the ‘Invoice Ref’ field is marked Print Repeated Values = “No”, so that the Invoice Ref is only printed on the first line of the invoice. I would also like to suppress the printing of the date and Customer name until the Invoice reference changes.

What is the simplest way to do that please?
 
I would use the report grouping (on invoice ref.), rather than a simple Print Repeated Values= No, then use a group header (and footer if needs be)
to include all those elements that only need printing once.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
You'll need a report variable or two to hold the current and last invoice ref #'s. Then, using Print When, compare the two variables and print the date and customer name only when the two differ.

For the variables, do something like this (I haven't done this in a while, so...):

cLastRef: Initial value = ''; Value to Store = cCurRef
cCurRef: Initial value = InvoiceRef; Value to Store = InvoiceRef. (Whatever that field is really called.)

Note that the order in which the variables are defined matters, because you want cLastRef to trail one record behind cCurRef.

Tamar
 
Thank you both. Yes, I see that report variables (which are a folk memory for me too) are the way to go.

I could not at first work out why I needed two variables, but now realise that it is because the variables are updated before the fields on the report are evaluated - so I need (as you say, Tamar) to rely on the order of evaluation of the report variables.

Thank you Griff; however I did not want the report to have a separate header (separate from the first line, that is) : All the lines look pretty much the same, except that in 2nd and subsequent lines some of the fields are suppressed.

Andrew
 
Andrew said:
I did not want the report to have a separate header

While you have the option of making each Report Group have its own Heading, it is not Required.
You can set up the Report with a Group band and still use one single overall Column Header row (put into the Report's overall Header) by leaving the Group's Header band empty and collapsed to a height of 0.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top