Let the platform do the work

Troubleshooting Scheduled Reports

Overview

Reports in Sugar can be scheduled to be emailed to users periodically based on specified date and time intervals. When a user reports that they are not receiving the scheduled reports, there are several potential causes.

Resolution

There could be various reasons that could cause scheduled reports to fail and not be delivered to users. We will go over some potential causes below:

Report Contains an Error

If a scheduled report has not been delivered, first check the specific report in Sugar to see if there are any errors detected. Click the Reports module tab in the navigation bar to view the reports. Choose the specific report from the Reports list view.

Verify that the report is displaying the data correctly and that no errors are detected on the page or in the sugarcrm.log file. You can navigate to Admin > System Settings and click the View Log link to see if any errors were detected in the application. If you notice errors on the report page or in the log file, you will need to troubleshoot the report accordingly to determine the root cause of the issue. Please file a case with the Sugar Support team if you need assistance troubleshooting the report's error.

Occasionally a report may reference a custom field that was deleted, which can break the report and display the following error: "The following field in this report is no longer valid: {Field Name}. Please Edit the report and check to make sure that the other parameters are still relevant". You will need to remove the deleted field from the report to correct the issue.

Report Not Scheduled Properly

If a user is not receiving the report, check to make sure that the report is scheduled properly.

  1. Log into Sugar, click the three-dots menu on the Reports module tab in the navigation bar, and select "Report Schedules". 
  2. Look for the scheduled report in the Report Schedules list view.
  3. Check the Active column to make sure that the checkbox is enabled.
    Check report schedule is active

If the Active column shows a disabled checkbox for the report, then the report is not scheduled for delivery.

  1. Click on the name of the report in the Report Schedules list view.
  2. Select the "Start Date" and time.
  3. Select the "Repeat Type".
  4. Enable the Active checkbox.
  5. Click the Save button to schedule the report.
    Update schedule

Invalid User Email Settings

Each user in Sugar needs to have their email settings configured under their user profile in order for the report to be sent to the correct email address. If a specific user is not receiving scheduled reports, but the other users are, then check to see that their email setting is configured for their user profile.

  1. Navigate to Admin > User Management > {User Name} > User Profile tab.
  2. Check the user's email settings.
    • If the email settings are blank, then enter the user's current email address (set as "Primary"), username, and password.
    • If your instance is SugarIdentity-enabled, you must edit the user's primary email in SugarIdentity.

    Note: The Users module utilizes the Sidecar user interface in Sugar versions 13.3 and higher.
  3. Click "Send Test Email" and enter your email address to send the test.
  4. If you do not receive the test email, double-check and re-enter the email account information.

If you continue not receiving the test email, please refer to the article Troubleshooting Outbound Email Using Sugar Logs for information on troubleshooting the potential cause.

Invalid System Email Settings

The System Email configuration handles outbound emails that the system generates such as scheduled reports. For more information on setting up the system email settings, please refer to the Email documentation. If none of the users are receiving scheduled reports, chances are that the outbound mail server is not configured properly.

  1. Navigate to Admin > Email Settings.
  2. Check the outbound mail configuration.
    • If the email settings are blank, then enter your mail server information such as the server address, username, password etc.
  3. Click "Send Test Email" and enter your email address to send the test.
  4. If you do not receive the test email, double check and re-enter the mail account information.

If you continue not receiving the test email, please refer to the article Troubleshooting Outbound Email Using Sugar Logs to see what error your email server is encountering.

Report Routed to Spam Folder

If the user continues not receiving the reports after all of the above items have been verified, have the user check the spam folder in their email client. It is possible that the email client may be incorrectly placing the scheduled report emails into the user's spam or junk folder.

Scheduler Job Not Running

Sugar's Run Report Generation Scheduled Tasks scheduler processes the scheduled reports at specified intervals. Check to make sure that the Run Report Generation Scheduled Tasks scheduler is active and configured properly. For more information on configuring schedulers, please refer to the article Setting Up the Scheduler.

  1. Navigate to Admin > Scheduler > Run Report Generation Scheduled Tasks.
  2. Verify that the status is set to "Active" and the interval is frequent enough and set as expected.
  3. If necessary, click "Edit" and uncheck the "Advanced Options" to modify the interval.

It is recommended to update the interval to run every 1 hour in order for the users' reports to be processed at their requested time. For example, if the scheduler is set to trigger once per day at 6 AM and a user schedules a report 3 times throughout the day, the report will only be delivered once at 6 AM due to the set interval.

Cron Not Running

For On-Site instances, you will also need to ensure that cron is running properly. When navigating to Admin > Schedulers, there is a panel titled "To Setup Crontab" with instructions on what to include in your Crontab file to ensure that the Scheduler runs successfully. For more information, please refer to the Introduction to Cron Jobs and Troubleshooting Cron and Schedulers articles.

Incorrect File System Permissions

For On-Site instances, if your cache and/or custom directories have incorrect permissions, you may receive the following error in the Sugar log file when the system attempts to send a scheduled report:
FATAL SugarCRM - -----> Scheduler got a bad execute time: [ 1999-12-31 22:00:00 GMT-0 ]

You will need to ensure that both the cache and custom directories, along with all of their subdirectories, have permissions that allow writing, appending, and deleting files. Otherwise, when the Scheduler job attempts to run, this error will be generated because attempting to create the ./cache/modules/Schedulers directory and insert the pid.php file failed. The fatal error will not be written to sugarcrm.log until after this failure to create and write the directory when the scheduled job attempts to fire. For more information, please refer to the articles Required File System Permissions on Linux and Required File System Permissions on Windows With IIS.

Troubleshooting Report Results

Scheduled reports are generated based on the saved filter values in the Define Filters step of the report wizard. Any changes you make on the run-time filter from the report's results page will be ignored. So if you want to receive the correct report results, be sure to edit the report to change the original filter values. The next report scheduled to run will display results based on the updated filter values.