Help with Deployment using CDO
Using:
VB 6
Crystal Reports 8.5 Developer Edition
Installshield 7.0
Windows 2000 Professional for both the Developer computer and the client computer
My program consists of a ServerAPI and a Client. The user chooses the type of report and sets the necessary criteria. The client passes the info to the server, who does a query against the database and passes the requested info back to the client in the form of a string. The client parses the strings and loads the data into an array. The array is then passed to the report via CDO.
This process works beutifully on my own computer (which has VB6 and CR 8.5 installed). When I run the Installshield setup on the client machine, everything installs fine. But when I run the program and try to bring up a report, I get "Error: -2147024770 - Automation Error, The specified module could not be found."
In my setup, I included:
Crystal_Database_Access2003.msm (which includes cdo32.dll and crpe32.dll)
cpeaut32.dll
p2smon.dll
Here's the code I use in my program:
Code:
Private m_crApplication As CRPEAuto.Application
Private m_crDatabase As CRPEAuto.Database
Private m_crTables As CRPEAuto.DatabaseTables
Private m_crTable As CRPEAuto.DatabaseTable
Private m_crView As CRPEAuto.View
Private WithEvents m_crReport As CRPEAuto.Report
If FindReport = True Then
Screen.MousePointer = vbHourglass
UpdateStatus "Generating Report, Please Wait..."
Dim clsPrtSel As New CSelectPrinter
m_cdoRowset.AddRows m_varRowsArray
'According to my debug info, it breaks on this line
Set m_crApplication = New CRPEAuto.Application
Set m_crReport = m_crApplication.OpenReport(m_strCRReportPath & "\" & m_strReportName)
Set m_crDatabase = m_crReport.Database
Set m_crTables = m_crDatabase.Tables
Set m_crTable = m_crTables.Item(1)
Call m_crTable.SetPrivateData(3, m_cdoRowset)
If blnPreview = True Then
Debug.Print "PreviewData"
Set m_crView = m_crReport.Preview
m_crView.ZoomPreviewWindow 100
Else
Debug.Print "PrintData"
m_crReport.SelectPrinter clsPrtSel.SelectedPrinter.DriverName, _
clsPrtSel.SelectedPrinter.DeviceName, _
clsPrtSel.SelectedPrinter.Port
m_crReport.PrintOut False, clsPrtSel.SelectedPrinter.Copies
End If
End If
Am I missing a dll, or a dependency for one of the dll's? In my research, it seems that that the only dll's I needed were Cdo32.dll, crpe32.dll, cpeaut32.dll, and p2smon.dll (along with all their dependencies).
Any information you have that might help me, or any website you could point me to, would be greatly appreciated. I've been working on this almost nonstop for the past 2 days and have come up empty handed. I've done online searches on every keyword that I can think of.
Thanks in advance!
Fiona
Crystal Report: Access Denied
Mr. Guru,
I created a CR report , and I tried to open it with ASP, code is like
following:
---------------------------------------------------
<%
Dim objReportApp
Dim objReport
set objReportApp = Server.CreateObject("crystalruntime.Application")
set objReport = objReportApp.OpenReport("c:/reports/ClientInformation.rpt")
%>
---------------------------------------------------------
and I got these error:
--------------------------------
Seagate Crystal Reports ActiveX Designer error '80043ac6'
Access denied.
/reporttest/test1.asp, line 8
How to slove it?
Thanks.
Re: Crystal Report: Access Denied
Hi,
Make sure you have Read/Write access for your logon user in server machine.
Quote:
Originally posted by asp_worker
Mr. Guru,
I created a CR report , and I tried to open it with ASP, code is like
following:
---------------------------------------------------
<%
Dim objReportApp
Dim objReport
set objReportApp = Server.CreateObject("crystalruntime.Application")
set objReport = objReportApp.OpenReport("c:/reports/ClientInformation.rpt")
%>
---------------------------------------------------------
and I got these error:
--------------------------------
Seagate Crystal Reports ActiveX Designer error '80043ac6'
Access denied.
/reporttest/test1.asp, line 8
How to slove it?
Thanks.
Re: Reference to Subreport
Hi,
This code works through the RDC object model to identify a subreport object in the main report
Code:
Dim crSecs As CRAXDRT.Sections
Dim crSec As CRAXDRT.Section
Dim crRepObjs As CRAXDRT.ReportObjects
Dim crSubRepObj As CRAXDRT.SubreportObject
Dim crSubReport As CRAXDRT.Report
Dim i As Integer
Set crSecs = CRReport.Sections
For i = 1 To crSecs.Count
Set crSec = crSecs.Item(i)
Set crRepObjs = crSec.ReportObjects
For X = 1 To crRepObjs.Count
If crRepObjs.Item(X).Kind = crSubreportObject Then
Set crSubReport = CRReport.OpenSubreport(crRepObjs.Item(X).SubreportName)
'the following code sets the subreport table to a different database
crSubReport.Database.Tables(1).Location = CommonDialog1.FileName
'set the value for a text object in the header of the subreport
CRReport.Subreport1_Text2.SetText "This is the subreport"
'within this loop you can set other properties of the subreport and
'the field objects and sections in it.
End If
Next
Next
Quote:
Originally posted by harmonycitra
Hi,
I want to refer a sub report field in my main report. Is there any way to do this. Using CR9
Error while closing Crystal Reports
Hi,
I have a table full of <Nulls> and at first my application loads correctly after I log into SQL Server via ODBC. However, when I close the CrystalReportViewer, the login window for SQL Server comes up again.
I tried closing and closing, but I still get the same window. Any solutions? It only does it to this table, all my other reports work fine w/ different tables. Any solutions?
I am using Crystal Reports with VB.NET
Chris