Crystal Reports without cfreport
Does anyone have an example of connecting to a Crystal Reports report without using cfreport? Can this even be done? Todd ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Crystal Reports without cfreport
Here is the contents of a page that I use to open a particular report. IP's and passwords are changed to protect the vulnerable - and my job :-) == BODY BGCOLOR-C6C6C6 LANGUAGE=VBScript ONLOAD=Page_Initialize OBJECT ID=CRViewer CLASSID = CLSID:C4847596-972C-11D0-9567-00A0C9273C2A WIDTH=100% HEIGHT=95% CODEBASE=/viewer/activeXViewer/activexviewer.cab#Version=7,0,100,52 PARAM NAME='EnableDrillDown' VALUE=1 PARAM NAME='EnableAnimationControl' VALUE=1 PARAM NAME='EnableCloseButton' VALUE=1 PARAM NAME='EnableGroupTree' VALUE=1 PARAM NAME='EnableNavigationControls' VALUE=1 PARAM NAME='EnablePrintButton' VALUE=1 PARAM NAME='EnableProgressControl' VALUE=1 PARAM NAME='EnableRefreshButton' VALUE=1 PARAM NAME='EnableSearchControl' VALUE=1 PARAM NAME='EnableStopButton' VALUE=1 PARAM NAME='EnableZoomControl' VALUE=1 PARAM NAME='DisplayGroupTree' VALUE=1 PARAM NAME='DisplayToolbar' VALUE=1 PARAM NAME='EnableToolBar' VALUE=1 PARAM NAME='DisplayBorder' VALUE=1 PARAM NAME='DisplayTabs' VALUE=1 PARAM NAME='DisplayBackgroundEdge' VALUE=1 PARAM NAME='EnablePopupMenu' VALUE=1 PARAM NAME='EnableExportButton' VALUE=1 /OBJECT SCRIPT LANGUAGE=VBScript Sub Page_Initialize Dim webBroker Set webBroker = CreateObject (WebReportBroker.WebReportBroker) if ScriptEngineMajorVersion 2 then window.alert IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available from Microsoft's web site. CRViewer.ReportName = http://xxx.xxx.xxx.xxx/Reports/Membership_Roster.rpt; else Dim webSource Set webSource = CreateObject (WebReportSource.WebReportSource) webSource.ReportSource = webBroker webSource.URL = https://xxx.xxx.xxx.xxx/Reports/Membership_Roster.rpt; webSource.AddParameter user0, user webSource.AddParameter password0, abcdef CFOUTPUT webSource.AddParameter prompt0, #Client.CHAPTER# /CFOUTPUT webSource.PromptOnRefresh = False CRViewer.ReportSource = webSource end if CRViewer.ViewReport End Sub /SCRIPT JoAnn A. Schlosser Consultant Association Management Software Grant Thornton LLP Washington, D. C. 703.837.4428 -Original Message- From: Todd Ashworth [mailto:[EMAIL PROTECTED]] Sent: Friday, August 17, 2001 10:07 AM To: CF-Talk Subject: Crystal Reports without cfreport Does anyone have an example of connecting to a Crystal Reports report without using cfreport? Can this even be done? Todd ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Crystal Reports without cfreport
Hi Todd, Yep, it sure is possible. Here's how we did it, after having no luck with CFREPORT (CF 4.0 Enterprise). It wasn't easy, but we finally figured it out. We pass the CF variables into an ASP page, and then call the CFREPORT from the ASP page. If you go to Crystaldecisions.com and search for a download called ASPXMPS8, it will give you all of the examples you need. Of course, you also need the Web Component Service running on your server as well (so Crystal Reports can serve the report up via the browser). Here are my tips: This is how I passed the information from my page to the ASP page. Note that these are hidden fields only because these values came from my form page. If you have no interim page, you can just send the info directly from your form page: cfform name=continue action=http://ourserver/open_rpt.asp; method=post cfoutput input type=hidden name=reportname value=#form.reportname#.rpt input type=hidden name=param1 value=cursor input type=hidden name=param2 value=#form.param1# input type=hidden name=param3 value=#form.param2# input type=hidden name=param4 value=#sessid# input type=hidden name=promptOnRefresh value=0 /cfoutput Note that the field names are named param1, param2, etc. This is what you need to name them. Crystal Reports will use whatever is in param1 as its first parameter, whatever is in param2 as its second parameter, etc. The files you will need from the examples on CrystalDecision's site are: open_rpt.asp (the main file--this is where you would change the dsn/pw info) rptserver.asp (I'm no ASP expert, but somehow this file tells ASP how to communicate with Cr. Rpts.) AlwaysRequiredSteps.asp (an include for open_rpt) MoreRequiredSteps.asp (another include for open_rpt) the JavaViewer and/or ActiveX viewer (allows the report to be viewed in the browser). Not being an ASP person, I didn't know how to fix this particular problem, but if you try to pass more parameters/fields than what open_rpt is expecting, you will get an error. Be patient. You will probably get alot of errors until you get this right ;) Original Message Follows From: Todd Ashworth [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Crystal Reports without cfreport Date: Fri, 17 Aug 2001 10:07:09 -0400 Does anyone have an example of connecting to a Crystal Reports report without using cfreport? Can this even be done? Todd ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Crystal Reports without cfreport
I do have this file and have been looking over it. What I most need to do is have a way to tell Crystal Reports what database file to use while generating its report. I found an example that lets you change the DSN, but that doesn't help since I have 1 DSN and many many different database files. Supposedly, there is an example in that file you mentioned, but I don't know enough about ASP to find it. You wouldn't happen to know which file that example is in, or how to do it, would you? Todd - Original Message - From: Terri Stocke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 12:55 PM Subject: Re: Crystal Reports without cfreport | | Hi Todd, | | Yep, it sure is possible. Here's how we did it, after having no luck with | CFREPORT (CF 4.0 Enterprise). It wasn't easy, but we finally figured it out. | We pass the CF variables into an ASP page, and then call the CFREPORT from | the ASP page. If you go to Crystaldecisions.com and search for a download | called ASPXMPS8, it will give you all of the examples you need. Of course, | you also need the Web Component Service running on your server as well (so | Crystal Reports can serve the report up via the browser). Here are my tips: | | This is how I passed the information from my page to the ASP page. Note that | these are hidden fields only because these values came from my form page. If | you have no interim page, you can just send the info directly from your form | page: | | cfform name=continue action=http://ourserver/open_rpt.asp; | method=post | cfoutput | | input type=hidden name=reportname value=#form.reportname#.rpt | input type=hidden name=param1 value=cursor | input type=hidden name=param2 value=#form.param1# | input type=hidden name=param3 value=#form.param2# | input type=hidden name=param4 value=#sessid# | input type=hidden name=promptOnRefresh value=0 | | /cfoutput | | Note that the field names are named param1, param2, etc. This is what | you need to name them. Crystal Reports will use whatever is in param1 as its | first parameter, whatever is in param2 as its second parameter, etc. | | The files you will need from the examples on CrystalDecision's site are: | | open_rpt.asp (the main file--this is where you would change the dsn/pw info) | rptserver.asp (I'm no ASP expert, but somehow this file tells ASP how to | communicate with Cr. Rpts.) | AlwaysRequiredSteps.asp (an include for open_rpt) | MoreRequiredSteps.asp (another include for open_rpt) | the JavaViewer and/or ActiveX viewer (allows the report to be viewed in the | browser). | | Not being an ASP person, I didn't know how to fix this particular problem, | but if you try to pass more parameters/fields than what open_rpt is | expecting, you will get an error. | | Be patient. You will probably get alot of errors until you get this right ;) | | Original Message Follows | From: Todd Ashworth [EMAIL PROTECTED] | Reply-To: [EMAIL PROTECTED] | To: CF-Talk [EMAIL PROTECTED] | Subject: Crystal Reports without cfreport | Date: Fri, 17 Aug 2001 10:07:09 -0400 | | Does anyone have an example of connecting to a Crystal Reports report | without using cfreport? Can this even be done? | | Todd ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists