Wednesday, June 19, 2013

Report Distribution Using XML Publisher - Right Report To The Right Person


Consider the situation where you have to run certain report, which is keyed by the Business Unit and Company. Once the report is run using a job using a batch user id, the report should go to the CEO of the Company and Business Unit combination. 

The above requirement can be achieved as below through an XML Publisher report.

You might know the bursting feature in XML Publisher, which will help you to slice the report based on a field. As the first step, to extend this functionality, I added another Colum (say BU_COMP_MIX) to the report staging table which is a concatenated of the BU and Company. And burst the report on this field. Make Sense?

Now you have to create a view with the CEO details for a Company and Business Unit combination along with the BU_COMP_MIX field. I name the view as AN_CEO_DET_VW. Three fields, with the values fetched from the data sources you have.

Navigate to the Report Definition page: Reporting Tools > XML Publisher > Report Definition

And follow the steps in the below screen shot.

Now try running the report and login as the respective CEO's and verify the report receipt in the Report Manager.

To make the CEO's to view only their own reports, you have to disable the User ID search in the Report Manager page. That can be done by removing the report distribution role from the user profiles.

The above tip might look simple in technical perspective but not in the business view. This matters a LOT!

2 comments:

  1. We have tried this approach. It our case it is splitting the pdf into several based in employee id and stored each pdf document in it's own folder. Can we customize the folder name. we would like to name the folder as emplid. Please let me know if there is a way to do this. Thanks!

    ReplyDelete
  2. Yes, you can publish the files to a custom folder. all you have to do is to set the folder name as dynamic

    /* send to folder on server */
    &oRptDefn.PrintOutput(&yourfilepath);

    ReplyDelete

Total Pageviews

Copyright © Tech & Management Notes