This blog explains how to pass Date Range from Design Studio to a Web Intelligence Report via Open document with BW data.
Using a Bex query in Design studio which contains an Optional Date Prompt
Image may be NSFW.
Clik here to view.
So when user selects a date range from Design Studio via Calendar component
Image may be NSFW.
Clik here to view.
Passing the selected date to this optional prompt and returning the results in Design Studio .
Here user wanted to open a Web Intelligence report from Design Studio for detailed analysis with date range parameter. Below steps will explain how to manage it.
Create a Web Intelligence Report
First of all create a Web Intelligence report with the same Bex query , when WebI is refreshed then the Optional date prompt appears
Image may be NSFW.
Clik here to view.
the User response of the Date range is as follows
Image may be NSFW.
Clik here to view.
as per the below thread , I found the Open doc syntax for the Date Time range and the URL for open doc .
Now we need to create DateTime format in Design Studio .
Create Date Time Range format in Design Studio
Create below DateTimeformat in Design studio to pass the selected date from the calendar component to a Webi Report
Image may be NSFW.
Clik here to view.
Finding the Start Date and End Date from the Calendar Component
Create 6 Global variables in Design Studio for Start and End dates,
1.Start Month
2.Start Day
3.Start Year
4.End Month
5.End Day
6.End Year
There are two calendar components
- From
- To
Image may be NSFW.
Clik here to view.
1.From Calendar Component (named as DEMO_FROM)
When a Date is selected in "From Calendar component "
Image may be NSFW.
Clik here to view.
then we will take the output via following script
(DEMO_FROM.getDate());
Image may be NSFW.
Clik here to view.
Now we need to find Day,Month and Year for Starting date from the above calender component
a) Script for Start Month from the calendar component
Start Month=Convert.subString(DEMO_FROM.getDate().substring(6,2),2);
Image may be NSFW.
Clik here to view.
b) Script for Start Day from the calendar component
Start Day=DEMO_FROM.getDate().substring(6);
Image may be NSFW.
Clik here to view.
c) Script for Start Year from the calendar component
Start Year=DEMO_FROM.getDate().substring(0,4);
Image may be NSFW.
Clik here to view.
1.To Calendar Component (named as DEMO_TO)
When a Date selected in "To Calendar component "
Image may be NSFW.
Clik here to view.
then we will take the output via following script
(DEMO_TO.getDate())
Image may be NSFW.
Clik here to view.
a) Script for End Month from the To Calendar component
End Month=Convert.subString(DEMO_TO.getDate().substring(6,2),2);
Image may be NSFW.
Clik here to view.
b) Script for End Day from the To Calendar component
End Day=DEMO_TO.getDate().substring(6);
Image may be NSFW.
Clik here to view.
c) Script for End Year from the To Calendar component
End Year=DEMO_TO.getDate().substring(0,4);
Image may be NSFW.
Clik here to view.
Building the Open Document URL
Currently with the above steps we have Start and End Year, Month and Day values .
Now we need to built the Date Time syntax as below
Image may be NSFW.
Clik here to view.
Creating some of the variables
var comma =",";
Now appending the Start and End Year, Month and Day variable in the final Date Time Variable
var datetime="[DateTime("+Start Year+ comma+ Start Month +comma + StartDay + comma +"12"+ comma +"0"+ comma +"0+")"+".."+"DateTime("+End Year+ comma+ End Month +comma + End Day + comma +"12"+ comma +"0"+ comma +"0+")]"
Above the time is given as yellow color.
After the above step the result will look like this
Image may be NSFW.
Clik here to view.
var u_datetime= Convert.urlEncode(datetime);
Finally Open Document URL is
APPLICATION.openNewWindow("http://boserver/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&sType=wid&sRefresh=Y&iDocID=AQqHNJjiKkR_ZGlk25nJ6oc8g"+ "&lsRZTM_EVT_RANGE="+u_datetime);
where ZTM_EVT_RANGE= this is the prompt text of the Date range in Webi Report
Now we successfully Opened the Web Intelligence report by passing Date Range from Design Studio .!!