Search code examples
crystal-reportsbusiness-objects

run one crystal report multiple times with different parameters


I am using the BusinessObjects Enterprise server and i have a report that uses the "department" as a parameter field to control the selection of records. there are 20 different departments.

I want to schedule this report to run 20 times with a new single department selected each time. Is there a way to do this without scheduling the report 20 times?

thanks for any help


Solution

  • Yes, you can. A bit of a process:

    • Create a Group for each department
    • Add users to groups as desired; ensure that they have an email address
    • Create a Profile; add a Profile Value for each Group (one Profile Value for each Group/Department ID combination); the Profile Values will be strings (important)
    • Create a Publication; add your report to the Source Document; add the Groups that you created earlier to the Enterprise-Recipient list
    • now define the Personalization (the key part of this); you can either add a Filter (set TABLE.FIELD or FORMULA to your Profile (Report Field & Enterprise Recipient Mapping columns) OR set the Department ID parameter to the appropriate Enterprise Recipient Mapping value (your parameter needs to be a string for this to work; note comment earlier).
    • set Destination to Email
    • set other properties (e.g. Format) as desired
    • Save & Close

    You can also schedule this Publication to occur on a recurring basis.

    Notes:

    • This solution uses the Publication Job Server (runs the Publication), the Crystal Reports Job Server (to run the report), the Adaptive Processing Server (does the bursting), and the Destination Job Server (send the email messages). You may want to create a separate set of these services and package them into their own server group, then force the Publications to use only this server group.
    • Related to the earlier point, you may want to create a server group just for scheduled reports and force recurring instances to use this server group. Why? Publications don't seem to do a good job of waiting for reports in a queue--if a Crystal Reports Job server isn't available, the Publication will fail. Forcing scheduled-report instances to generate on their own server group helps to eliminate this issue.
    • If you make significant changes to the report (e.g. add a parameter), you may need to remove then add the report to the Source-Document list to ensure that it has the most-recent definition; other changes to the report (e.g. adding a column) don't seem to require this attention. YOUR MILEAGE MAY VARY.