How to open Crystal report to Crystal Report

Is there any way , I can call crystal report in to Crystal report? I meant I have created Report1, Report2, Report3, etc in Crystal report. Report1 is the main report. Based on Report1 parameter selection Report2 will be open, based on Report2 parameter selection Report3 open and so on…
I can not use Sub-report on this case, becasue I can not add sub-report in to another sub-report.
Any other alternative way to call these reports?


Philip (BOB member since 2006-03-02)

Using OpenDocument, you can link between Crystal Reports if reports are stored within BO Enterprise. Do a search on OpenDocument. There are lots of topics discussing this.


AnthonyJ :philippines: (BOB member since 2006-06-30)

where to use OpenDocument syntex in crystal report? I meant in field or …hyperlink…
please advise.


Philip (BOB member since 2006-03-02)

  1. Right click on the field you want to link from and choose Format Field and go to the Hyperlink tab.
  2. From the hyperlink tab, choose ‘A website on the internet’
  3. If using CR2008, you can use the ‘Create enterprise hyperlink’ wizard to help you create the link, otherwise click on the X-2 icon. This will launch the formula workshop editor

Here’s an example


StringVar param :=
"&lsMApplication=" + "["+{@Prompt List - Application}+ "]" + 
"&lsMServer=" + "["+{@Prompt List - Server}+ "]" + 
"&lsSPage=" + {Front_Page.Page Name} +
"&lsSCountry=" + {?Country} +
"&lsSState=" + {?State} +
"&lsSCity=" + {?City} +
"&lsSDate=" + "DateTime"+"("&{@Date Year}&","&{@Date Month}&","&{@Date Day}&",00,00,00"&")"

"../OpenDocument/opendoc/openDocument.jsp?sType=rpt&sWindow=New&sPath=[Reports]&sDocName=ReportName"+URLEncode(param);

AnthonyJ :philippines: (BOB member since 2006-06-30)

Hi Anthony,
Appreciate your help on this.
Could you please look on below URL, state revenue report is opening but with prompt. I do not want any prompt to display. It supposed be display data for those state which user has selected.

'http://server/InfoView/scripts/openDocument.aspx’+"?sType=rpt&sWindow=New&DocName=" + URLEncode(“state revenue.rpt”) + “&sDocName=” + URLEncode(“state revenue.rpt”)+"&lsS{State name}=?Enter State Name:"

?Enter State Name is a dynamic prompt defined in state revenue report.
I had defined State name={?Enter State Name:}


Philip (BOB member since 2006-03-02)

Try this.


'http://server/InfoView/scripts/openDocument.aspx&sType=rpt&sWindow=New&DocName=state+revenue&lsSState+name=' + {?Enter State Name:}

AnthonyJ :philippines: (BOB member since 2006-06-30)

Hi Anthony,
I had modified the URL as below. Now no prompt is displaying but I am not geeting any data. Any idea what I am missing here?

'http://server/openDocument.aspx’+"?sType=rpt&sWindow=New&DocName=" + URLEncode(“state revenue.rpt”) + “&sDocName=” + URLEncode(“state revenue.rpt”)+"&lsSstate={?state}"


Philip (BOB member since 2006-03-02)

It looks like you are including {?state} as part of the text. By doing “&lsSstate={?state}”, you are passing the word {?state} to the target report instead of the selected state.

Replace “&lsSstate={?state}” with this “&lsSstate=” + {?state}

A few things to note:-

a. The DocName need to be called only once.
b. You need not include the .rpt in the DocName as that is already being handled in the sType=rpt option.


AnthonyJ :philippines: (BOB member since 2006-06-30)

Hi Anthony,
I replaced “&lsSstate={?state}” with this “&lsSstate=” + {?state} , but data is not displaying however report 2nd report is still opening.
Let me clear something here:
state={?state} is defined in 2nd report, state revenue report. Do I need to create same prompt state={?state} is in main report and add this in main report URL? If we do so then when main report is refreshed it will pop up promt box. I think I am missing something here…
I just want to pass state parameter in to 2nd report, state revenue report.


Philip (BOB member since 2006-03-02)

Most of the time source and target reports have the same parameters.

You don’t have to create a parameter {?state} in your main report if you don’t need to filter out records. If you just want to simply pass the value of a column state in the main report to the 2nd report, you just put in “&lsSState=”+ {name of your state object}


AnthonyJ :philippines: (BOB member since 2006-06-30)

Hi Anthony,
It is working now. You are great. I highly appreciate your help on it. I will let you know if I have any question. Once again thanks.


Philip (BOB member since 2006-03-02)

Hi
I had created a sales summary report in Crystal Report. On this report one chart for Sales Revenue by Country. If you drill down on this chart another chart (report) will open which is Sales Revenue by State. This two charts are on same report (I had set up in Report Part Drilldown). Final detail report is Sales Revenue by City which is separate report and I had used below syntax for City detail report.
My questions is how to pass Country and State parameters (which is Report Part Drilldown) on below syntax?

'http://server/openDocument.aspx’+"?sType=rpt&sWindow=New&DocName=" + URLEncode(“state revenue.rpt”) + “&sDocName=” + URLEncode(“state revenue.rpt”)+"&lsSstate={City}


Philip (BOB member since 2006-03-02)