Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports 8 & Cold Fusion

Status
Not open for further replies.

lifeisfun

Programmer
Feb 28, 2001
4
US
Hi,

I'm looking to implement Crystal Reports 8 (CR8) into my templates and i'm looking for advice from anyone who has done it before.

I've passed the initial error hurdles and have basic reports outputing with the CFReport tag and the undocumented type="microsoft" parameter.

What I'm looking to understand is how I can pass parameters, use java or activex controls, or insert PDF output links.

I'd appreciate almost anything you could say on this subject if you've done it before.

Thanks and Good Fortune,
Rick Walters
 
Rick, I've used a custom tag available on Allaire's site in order to use the ActiveX control. I've also created a custom tag to display reports with the java control posted below. Hope this helps

Marlon Moyer

<!---------------------------------------------------------------------------
NAME: cf_java
VERSION: 1.0
CREATED: 11/17/2000
LAST MODIFIED: 11/29/2000
AUTHOR: Marlon Moyer (mcmoyer@home.com)
DESCRIPTION: Displays a java control viewer for Crystal Reports.
Must have Crystal Reports 7 on the web server to run this tag.

------------------------------------------------------------------------>

<cfparam name=&quot;attributes.Language&quot; default=&quot;en&quot;>
<cfparam name=&quot;attributes.reportName&quot;>
<cfparam name=&quot;attributes.reportParameters&quot;>
<cfparam name=&quot;attributes.selectionFormula&quot;>
<cfparam name=&quot;attributes.hasGroupTree&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.showGroupTree&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.hasRefreshButton&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.hasPrintButton&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.hasExportButton&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.hasTextSearchControls&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.canDrillDown&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.hasZoomControl&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.promptOnRefresh&quot; default=&quot;true&quot;>
<cfparam name=&quot;attributes.height&quot; default=&quot;95%&quot;>
<cfparam name=&quot;attributes.width&quot; default=&quot;100%&quot;>


<SCRIPT LANGUAGE=&quot;JavaScript&quot;><!--
var _ns3 = false;
var _ns4 = false;
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE=&quot;JavaScript1.1&quot;><!--
var _info = navigator.userAgent;
var _ns3 = (navigator.appName.indexOf(&quot;Netscape&quot;) >= 0 && _info.indexOf(&quot;Mozilla/3&quot;) >= 0);
var _ns4 = (navigator.appName.indexOf(&quot;Netscape&quot;) >= 0 && _info.indexOf(&quot;Mozilla/4&quot;) >= 0 );
//--></SCRIPT></COMMENT>

<cfoutput>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;><!--
if(_ns3==true)
document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer codebase=&quot;/viewer/JavaViewer&quot; id=ReportViewer name=&quot;CrystalReportViewer&quot; width=#attributes.width# height=#attributes.height# archive=&quot;/viewer/JavaViewer/ReportViewer.zip&quot;>' );
else if (_ns4 == true)
document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer codebase=&quot;/viewer/JavaViewer&quot; id=ReportViewer name=&quot;CrystalReportViewer&quot; width=#attributes.width# height=#attributes.height# archive=&quot;/viewer/JavaViewer/ReportViewer.jar&quot;>' );
else
document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer codebase=&quot;/viewer/JavaViewer&quot; id=ReportViewer name=&quot;CrystalReportViewer&quot; width=#attributes.width# height=#attributes.height#>' );
//--></SCRIPT>

<param name=Language value=&quot;#attributes.language#&quot;>
<cfif cgi.SERVER_PORT_SECURE eq 1>
<cfset httpType = &quot;<cfelse>
<cfset httpType = &quot;</cfif>

<param name=ReportName value=&quot;#httpType##CGI.SERVER_NAME#:#CGI.SERVER_PORT##attributes.reportName#&quot;>
<param name=ReportParameter value=&quot;#attributes.reportParameters#&quot;>
<param name=SelectionFormula value=&quot;#attributes.selectionFormula#&quot;>
<param name=HasGroupTree value=&quot;#attributes.hasgroupTree#&quot;>
<param name=ShowGroupTree value=&quot;#attributes.showGroupTree#&quot;>
<param name=HasRefreshButton value=&quot;#attributes.hasRefreshButton#&quot;>
<param name=HasPrintButton value=&quot;#attributes.hasPrintButton#&quot;>
<param name=HasExportButton value=&quot;#attributes.hasExportButton#&quot;>
<param name=HasTextSearchControls value=&quot;#attributes.hasTextSearchControls#&quot;>
<param name=CanDrillDown value=&quot;#attributes.canDrillDown#&quot;>
<param name=HasZoomControl value=&quot;#attributes.hasZoomControl#&quot;>
<param name=PromptOnRefresh value=&quot;#attributes.promptOnRefresh#&quot;>
<param name=cabbase value=&quot;/viewer/JavaViewer/ReportViewer.cab&quot;>
</cfoutput>
</applet>
 
Thanks for the help. I'll give it a try for sure.

Good Fortune,
Rick Walters
 
Did this work for you? if yes can you tell me how you point to the report and then put in the parameters for the report. I can see it in the param fields but do not know how to complete it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top