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

Any suggestions on how to suppress certain records?

Status
Not open for further replies.

delphidestructor

Programmer
Oct 20, 2000
67
Scenario

Parameters passed to report are min = 1 and max = 4

Rec 1: Cust A
Rec 2: Cust A
Rec 3: Cust B
Rec 4: Cust A


This is not usually going to occur and for printing it isn’t a problem. The reports need to be printed in the original order entered. Not sorted by customer.

Problem : I also want to export this report to PDF for emailing to the customer. I don’t want to use the other obvious options; to send two pdf’s (recs 1-2 and rec 4), programmatically merge the two after creation, or have to versions of the same report calling a different stored procedure that would filter the records. I do have a parameter that is passed to this report to tell it whether it will be a PDF to unsuppress a few graphics. I was hoping that there might be an easy way (using the select expert in combination with a formula and the “PDFReport” parameter) to suppress any records that the customer number wasn’t equal to the customer number on the first record (min parameter). I don’t want to add any more parameters in or out of the CR if possible. I was trying to find a way do something like suppress if -> (PDFReport = true) and not(rec[currentrow].customernumber = rec[1].customernumber)

The report is currently in version 9.

Thanks for any help.

Mike
 
Passing this to the database would depend upon whether your database type, or the table(s) themselves have a row number field. Posting your database type and version is always a smart idea with any post.

It sounds like you want to go to the Report->Selection Formulas->Record and use:

{table.recordnumber in minimum({?MyRecordparameter})) to maximum({?MyRecordparameter}))

Hard to say as you didn't state whether this parameter is a range, or two differnet parameters, so I made assumptions.

You seem to already understand the suppression part.

If your tables don't have a row associated with them, then post your database type, and you can probably use a Command object to accompish this if the database has a row ID, which many do.

Otherwise you'll have to use suppression, which is slower.

-k
 
The parameter mentioned to export to a PDF is not passed to the database (SQL Server 2000). It is passed into the report through code and not forwarded on to the database.

The min and max parameters although, are two distinct values that are passed to the report and then in turn passed to the database to define the upper and lower bounds of the records returned.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top