heres a bit of sample code that will opens the viewer:

<snip>
 <cfset session.cry_width="100%">
 <cfset session.cry_height="100%">
 <cfset session.cry_tree="False">
 <cfset
Report_Location="http://gbvwfsmks00050/extranet/commonApps/DataCapture/Cryst
alTest/isp_month_detail.rpt">
 <cfset param1="date(2002,1,1)">
 <cfset param2="73116">
 <OBJECT  ID="CRViewer"
  CLASSID = "CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
  WIDTH=<cfoutput>#session.cry_width#</cfoutput>
  HEIGHT=<cfoutput>#session.cry_height#</cfoutput>
  CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,0,100,52">
  <PARAM NAME='EnableDrillDown' VALUE=1>
  <PARAM NAME='EnableAnimationControl' VALUE=1>
  <PARAM NAME='EnableCloseButton' VALUE=1>
  <PARAM NAME='EnableGroupTree' VALUE=<cfoutput>#iif(session.cry_tree is
"True",1,0)#</cfoutput>>
  <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 window_onLoad()
     Page_Initialize()
  End Sub
  Sub Page_Initialize
     On Error Resume Next
  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 at Microsofts web site."
<!---    CRViewer.ReportName =
"http://999.999.999.999\<cfoutput>#session.cry_rpt#</cfoutput>" --->
   CRViewer.ReportName = "<cfoutput>#Report_Location#</cfoutput>"
  else
   Dim webSource
   Set webSource = CreateObject("WebReportSource.WebReportSource")
   webSource.ReportSource = webBroker
   <!--- webSource.URL =
"http://208.252.193.180\<cfoutput>#session.cry_rpt#</cfoutput>"  --->
   webSource.URL = "<cfoutput>#report_location#</cfoutput>"
         webSource.AddParameter "user0", "REPORTER"
                 webSource.AddParameter "password0", "reporter"
    webSource.AddParameter "prompt0","<cfoutput>#param1#</cfoutput>"
                webSource.AddParameter
"prompt1","<cfoutput>#param2#</cfoutput>"
<!---   webSource.AddParameter
"sf","<cfoutput>#replace(session.cry_query,'"',"'","ALL")#</cfoutput>" --->
   webSource.PromptOnRefresh = false
   CRViewer.ReportSource = webSource
  end if
   CRViewer.ViewReport
  End Sub
 </SCRIPT>
<end snip>



-----Original Message-----
From: Terry Troxel [mailto:[EMAIL PROTECTED]]
Sent: 02 June 2002 22:00
To: CF-Talk
Subject: Crystal Reports ActiveX


Does anyone know how to access the Crystal Reports ActiveX Viewer with CF?

If so how do I pass variables, formulas to it?

I am using IIS and when i use a page with an href to a filename.rpt it
activates the named report, but I sure would like to be able to massage the
output like we used to be able to in CF 3 with  the cfreport tag. The
activeX viewer is alot more mature, but so far all I can see in their docs
is references to ASP.

Any and all help would be appreciated.

Terry


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.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

Reply via email to