×
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

Want to generate an error with the Query object - Using Events

Want to generate an error with the Query object - Using Events

Want to generate an error with the Query object - Using Events

(OP)
I am still trying to figure out the best way to only kick off a report when there is data to report and I think the best way to do this is with Events.  I would like to create a query using INFO SQL Designer that will tell me if there is a check processed on that day in our database.  If so, I want to schedule a report to run which will send the report of the check created in an email to an individual.
 I have found a Crystal Care Technical Support KnowledgeBase Article c2001299 on this and it will work BUT I do not know how I can make the query fail if there is no data to report. Is there a way to do this within SQL then I can use an If Exists (query showing if there were checks cut) Else  'Generate and error.

Any help would be appreciated..

Regards,
Bob  

RE: Want to generate an error with the Query object - Using Events

Hi,

I have been testing this procedure.

@Formula - put in the report footer.
If {?InputAmountFromMainFrame} = Sum ({contract_pay_amt}) then
today //no action
Else
CDate({security_agency}) // this is our failure...

-- Security_agency is a 3 char string and cannot be a date.


An E-mail notifies me if the report generates a contract_pay_amt that is not equal to my input amount.

Also I have found that you have to publish in a different format than rpt (testing with Excel).

Hope this helps.

Mark

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