Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Crystal Server Events: If Else behavior Post Reply Post New Topic
Author Message
statey603
Groupie
Groupie
Avatar

Joined: 14 Aug 2013
Online Status: Offline
Posts: 78
Quote statey603 Replybullet Topic: Crystal Server Events: If Else behavior
     Posted: 08 Jan 2014 at 2:59am
I have some Crystal Reports scheduled and using Events to trigger other reports. The current Event configuration uses Successfully Ran events to trigger downstream reports.
For example: If Rpt1 succeeds, fire the input trigger for Rpt2 to run. If Rpt1 fails, fire an event to print an Error Rpt. And so on and so forth for Rpts 2 and 3.
 
------   --------------   -------------   ------------------
Report   Scheduled Time   Input Trigger   Output Trigger
------   --------------   -------------   ------------------
Rpt1          9pm         None            Rpt1 Success
Rpt2          9pm         Rpt1 Success    Rpt2 Success
Rpt3          9pm         Rpt2 Success    None
------   --------------   -------------   ------------------
 
This is working great, however, the users would like a printed notification if a report fails so they know why downstream (dependant) reports do not print.
 
I am hoping to use IF/ELSE logic with events.
 
For Example:
IF Rpt1 ran successfully
  Trigger Rpt1 Success Event
ELSE
  Trigger Rpt Failed Event.
 
Also, the Rpt Failed Event would trigger a generic report indicating a failure was detected.
 
It does not look like the Events support this. In the Event Settings you have to choose either [Success], [Failure] or [Success or Failure] when setting up an event. I was hoping that with one event you could take different actions based on the rpt execution status. I assume that the [Success or Failure] Event Setting does not tell you the status and is for situations where you want to trigger something regardless of the execution success status.
 
Alternatively, I guess I could configure 2 triggered events for each report [1 for success, 1 for failure] but it seems like it might get pretty complicated to set up the chaining of rpts and maintain the event configuration whenever rpts get updated/uploaded to the server making the existing rpt/schedule instance obsolete.
 
I appreciate any suggestions from anyone that might have tackled this on how to approach this.
 
Thanks,
Bill
 
  

Crystal Server: BI 4.0 SP4



Edited by statey603 - 08 Jan 2014 at 5:58am
-bill
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 15 Jan 2014 at 6:18am
You can't set this for events. However, you can set the notification on the report schedule to send an email if the report fails - when you schedule the report there should be a section for "Notification" as part of the schedule properties.

-Dell
IP IP Logged
statey603
Groupie
Groupie
Avatar

Joined: 14 Aug 2013
Online Status: Offline
Posts: 78
Quote statey603 Replybullet Posted: 15 Jan 2014 at 6:22am
That's what I was afraid of.  Our Admin folks will not enable Email capability on this server.
Thanks.
-bill
IP IP Logged
statey603
Groupie
Groupie
Avatar

Joined: 14 Aug 2013
Online Status: Offline
Posts: 78
Quote statey603 Replybullet Posted: 06 Jun 2014 at 3:00am
I am taking another shot at report failure detection. We are not allowed to configure email [SMTP] on the server so I hope to find some way to be alerted if a scheduled report fails.
 
I have a group of 3 reports scheduled with recurrence set to run weekly (M-F) starting at 8pm. this group of reports prints in a different building so if there is a problem, I either have to find it in history via CMC or if I get notified by the report recipient.
 
Rpt Grp: Report 1 success triggers an input event for report 2, etc.
 
In the case that any of the reports fails, I want to trigger a Failure event that will fire off a generic 'Report Failure Occurred' report to print on my local printer.
 
I created a single Report Failed event with [x] Failure selected in Event Settings. This report has the Report Failure event as an inpout trigger.
 
When scheduling the report group [described above], each report has its original output/input Success events for the report chaining. I also added my new Report Failed Event as an output event for each of the reports in the group.
 
I scheduled my 'Report Failure Occurred' report reccurrence weekly [M-F] but starting at 7:55pm so it is up and running before the report group starts.
 
It looks like it started on the first day and then did not recur. I am now wondering if it did not recur because it did not actually run because no failure was detected.
 
I appreciate any suggestions on a non-email approach to scheduled report failure detection/alerting.
 
 
 
 


Edited by statey603 - 06 Jun 2014 at 3:02am
-bill
IP IP Logged
hello
Groupie
Groupie
Avatar

Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
Quote hello Replybullet Posted: 06 Jun 2014 at 3:26am
We use File System as the DESTINATION in certain circumstances...especially when we need to deliver a report outside the domain.

Drop the report(s) onto the same server that runs CMC, then use task scheduler to run a DOS bat file that copies the reports to mapped drives. You could copy the reports to a personal folder also. Then, you would be able to tell which reports were disbursed.

Edited by hello - 06 Jun 2014 at 3:27am
IP IP Logged
statey603
Groupie
Groupie
Avatar

Joined: 14 Aug 2013
Online Status: Offline
Posts: 78
Quote statey603 Replybullet Posted: 06 Jun 2014 at 3:35am
thanks, I will investigate.
-bill
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Jun 2014 at 3:40am
The failure report did not reschedule because it is still waiting for the failure event. This is not an issue.

-Dell
IP IP Logged
statey603
Groupie
Groupie
Avatar

Joined: 14 Aug 2013
Online Status: Offline
Posts: 78
Quote statey603 Replybullet Posted: 06 Jun 2014 at 4:03am

Thanks for the clarification Hilfy. Smile

So does this mean that my scheduled failure report will wait indefinitely (barring any system outages) and fire when a failure occurs?
Also, if that is the case, then I assume it will consider its own execution a complete and thus would only catch the first failure and then stop running until the next scheduled time. That behavior is OK with me since all I really am looking for is to know if a failure occurred. That way I will know to investigate all schedule groups and their reports.
 
Please clarify further if I am getting off track.
 
Thanks,
Bill
 
 
 
-bill
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Jun 2014 at 4:38am
You've got the process exactly!

-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum