Scheduled report with no data.. prevent from emailing?

Sort:
You are not authorized to post a reply.
Author
Messages
Jeroen
Basic Member
Posts: 6
Basic Member
    Thanks for taking the time to read this

    we're pretty new at Lawson in general (pre go-live stage), and I am appointed as the "LBI man",
    so far so good, but I'm facing a constant challenge:

    We have several Crystal Reports now, and some of them are scheduled in LRS to be delivered through email.

    The nag is: when there is no data on the report (either because of bursting, or because the underlying query just turns up empty) there will still be an email, containing a .pdf file with...well, nothing.

    I've searched the world to prevent empty reports from being sent but I have not been succesful.

    Have any of you encountered the same issue and have been able to tackle it?

    I would also be happy to learn about a way to change the subject of the email conditionally...like if there's no data, present that fact in the subject, or..provide a sum / count or the no. of records in the report as a part of the email's subject.

    I have found neither of these two options anywhere, so any help would be appreciated.

    Jeroen.

    Matthew Nye
    Veteran Member
    Posts: 514
    Veteran Member
      Id say about the closest you are going to get is inserting a hidden section in your Crystal Report that displays a note that there is no data when no rows are returned.

      One possibility that I havent explored that is the use of System Variables. They are typically used in parameters but if they can be used in the Subject line of a schedule you might be able create customized server side code to check the number of rows returned. Probably a bit more work than you want to do for this but a thought.

      You can always put in an Enhancement Request with Lawson and cross your fingures.

      hth
      Matt
      If any of my answers were helpful an endorsement on LinkedIn would be much appriciated! www.linkedin.com/pub/matthew-nye/1a/886/760/
      Shane Jones
      Veteran Member
      Posts: 460
      Veteran Member
        Might be a bit kludgey but...

        Is there a way that you could use the system events schedule. I am thinking that you might be able to have a report run on a schedule where it looks for the system event and then when the system event either happens or does not happen it would trigger the emailed report.

        I have not used the system events but I just looked at the help on EVENTS and it looks like you could create a pre-event that would look for something to decide if the report should run or not. If that is the case you could create an event that looks for data before running.
        Shane Jones
        Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
        Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
        ** Teach others to fish...
        Shane Jones
        Veteran Member
        Posts: 460
        Veteran Member
          Just played with the Events and you can create a "File-Based" event. I created a file-based event that looks for a file on the server. If you schedule a report with events and then setup the file as the "Event to wait for" you can stop the report if the file does not exist. The File that it would be looking for does not have to have anything in it... It just looks to see if the file exists.

          Now use another program to drop a file in the location before you are running the Crystal report. You would only drop the file when your query has results. A stored procedure or process flow could easily drop a file in the location. (Come to think of it - I would probably try to do this in the reverse and make it run when no file exists so that if the first part of your process ever fails the users will get an empty report. The reverse might mean someone would not get a report when they should have.)

          ** This is not an ideal solution just because of the complexity and the fact that you will be relying on two programs to make this happen and three separte processes. (droping a file, running report, removing file) I still think it is possible and if you work the solution correctly the risk of one part failing would just mean that a user would get the empty report..... Good luck.
          Shane Jones
          Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
          Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
          ** Teach others to fish...
          vishcom
          New Member
          Posts: 1
          New Member
            Can you tell me pls, how to schedule a report in LBI, as i am a new user I did get the device users on and had the test report sending to me ok, but when i use that for schedule from My Reports -> ->Details->then data settings/General Properties/ Data Settings/Output Options then New Schedule/Run Date and Time & Report Users .... am i missing something there ??

            or to come to my email .. what am i exactly missing ... or what is the exact procedure .. thanks a lot in advance .. running version 9.0.3 (LBI)

            abc
            You are not authorized to post a reply.