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
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
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