cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduling a report in SAP BusinessObjects

Former Member
0 Kudos

Good afternoon,

I'm new to crystal reports and SAP BusinessObjects.

I have created a report and during design of the report I have hardcoded the as follows.

{tblBusinessPartner1.BP_ID} = 2 and

{tblVoucherHeader1.VH_DATE_ACCOUNTED} = Date (2016, 03, 28)

But I want to schedule this on 10th of each month so therfore the BP_ID and VH_DATE_ACCOUNTED will be dynamic.

How do I tell SAP BusinessObjects to run the report for each BP_ID for VH_DATE_ACCOUNTED the 28th of the previous month.

I thought about doing this:

{tblBusinessPartner1.BP_ID} = {?paramBP_ID} and

{tblVoucherHeader1.VH_DATE_ACCOUNTED} = ?paramDateAccounted

But I am struggling to understand how to accomplish this.


Any help will be appricated.


Thanks

Darren

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Instead of using a parameter for the Date Accounted, create a formula like this:

{@LastMonth}

DateVar lastmonth := DateAdd('m', -1, CurrentDate);

Date(Year(lastmonth), Month(lastmonth), 28)

In the Select Expert, manually edit the selection formula like this:

{tblBusinessPartner1.BP_ID} = {?paramBP_ID} and

{tblVoucherHeader1.VH_DATE_ACCOUNTED} = {@LastMonth}

If you want all of the business partners in the same report, I would group by Business Partner as your outer group then go to the Section Expert for this new group footer and turn on "New Page After" for the group.  Do not check the checkbox; instead click on the formula button to the right of it and enter this formula:

Not OnLastRecord

This will prevent a blank page at the end of the report.

If you need to have separate reports for each business partner, then you'll do one of two things depending on how the report will be delivered:

1.  Users get the report through BI Launchpad/InfoView only:  Create a recurring schedule for each partner.

2.  Reports are emailed to the specific partners and each partner should only receive their own data:  Schedule a publication.

     a.  Create a new report to use as a "Dynamic Recipients" report.  This report will include the name of the business partner, the BP_ID value, and the partner's email address.

     b.  Create a new publication using your original report as the "Source Document".

     c.  Use the new report in the Dynamic Recipients.  Set the BP_ID as the "Recipient Identifier", the name as "Full Name", and the email address as "Email".

     d.  Under "Personalization", set ?param_BP_ID} to be the BP_ID from the Dynamic Recipients report.

     e.  Set the format that you want to use to deliver the report.

     f.   Set the Destination for the report.  If it's email, use '%SI_EMAIL_ADDRESS%' in the To address to pick up the email address from the Dynamic Recipients report.  For all destinations, use a specific file name - you can select "User Full Name" from the "Placeholder" list to add the partner's name to the file name.  I usually use this format with placeholders: 

Title-User Full Name-DateTime.File Extension

which looks like this:

%SI_NAME%-%SI_USERFULLNAME%-%SI_STARTTIME%.%EXT%

-Dell

Former Member
0 Kudos

Thank you very much Dell for your response.

I Will give this a go in the morning.

senario 2 is the exact route I want to go, sorry I should of said I wanted a seperate report emailed to my business partners.

will let you know know how I get on.

Darren

Former Member
0 Kudos

Good Morning Dell,

I'm a bit stuck, I created a Formula field and added to the report. In the Formula Editor I placed your example:

DateVar lastmonth := DateAdd('m', -1, CurrentDate);

Date(Year(lastmonth), Month(lastmonth), 28)


However I get a Syntax Error:

A Date is required here.


and it highlights as per screen shot.

Cheers

Darren

abhilash_kumar
Active Contributor
0 Kudos

Change the first line to:

DateVar lastmonth := Date(DateAdd('m', -1, CurrentDate));

-Abhilash

Former Member
0 Kudos

Thank you Abhilash, that worked

Former Member
0 Kudos

Hello again

I completed the following:

Create a new report to use as a "Dynamic Recipients" report.  This report will include the name of the business partner, the BP_ID value, and the partner's email address.

However I cannot see an option within CMC to create a new publication, I did find this document:Creating and Scheduling Publications for Dynamic Recipients on SAP Business Objects Enterprise located http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8077811e-7637-2e10-7c9f-dcb81d630...

It is dated March 2011 so a couple of years old. However as I say there is no option that I can find to create a new Publication.

I'm logged in as Adminstrator.

Regards,

Darren

Addede info about which user being logged into CMC Message was edited by: Darren Gulliver

DellSC
Active Contributor
0 Kudos

Which version of BO are you using?

-Dell

Former Member
0 Kudos

5 CAL - My reseller gave me a addon key to unlock the publication part of BO.

Getting there

Just waiting on my system admin to configure the SMTP server.

Hopefully Tuesday I will have something up and running...

Thanks for help been very benificial.

Have a good weekend.

Thanks

Darren