×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Stop report printing

Stop report printing

Stop report printing

(OP)
Hi

Is there a way to stop a report printing if something meets a certain criteria. I know you can supress areas, but what I would like to happen is that the report is not printed at all.

If possible a prompt to say it cannot be printed because of .....

I am not sure of what [parameters there are yet, but cannot find anything to [prevent it printing at all.

Could someone advise please

Thanks

RE: Stop report printing

By "printing", I assume you mean displaying results.

Not sure what your criterion would be, but as an example let's say you didn't want to print it if the total amount of an order was less than a certain amount. First you would need to create a SQL expression {%sumamt} like this:

(
select sum(`amount`)
from Table
)

Then create a parameter {?amt}(number or currency depending on your field type) that will hold your criterion. Then add a record selection formula like this:
(
if {%sumamt}< {?amt} then
false else true
) and //add other selection criteria here

Then add a text box to a new report header_b section and add in something like: "Total amount is less than " and then insert {?amt}. Format the text box to suppress with a formula like this:

not isnull({table.id}) //use whatever field is present in each row of the report

Format the report header_b section to "suppress blank section".

Suppress the field headers in the report with the formula:

isnull({table.id})

If you have trouble with the SQL expression, let me know--if you need one. You haven't specified your criterion, so I have know idea if this is the direction you are headed. The syntax and punctuation of the SQL expression depends on your datasource and your version of CR.

-LB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close