?
Solved

Crystal Report Error in User Machines

Posted on 2003-03-13
8
Medium Priority
?
1,116 Views
Last Modified: 2007-12-19
I am working in the maintaince project.

All the Crystal Reports have been developed using FileDsn (Tesco.dsn) connection.

At present we are removing filedsn connection and using the direct sql server connection.

So I have changed the crystal RPT files from filedsn  connection to Microsoft SQL Server connection.[ found in SetLocation->More data Sources].

It works fine in the Crystal Reports and SQL Server installed machines.In the user machines it gives error message "Active X  Componet Can't create object" and I can't locate the required dll.

I tried to preview the .Rpt file in the Crystal Report only installed machine, It gives error message and there is no Microsoft SQL Server connection under SetLocation->More data Sources.

so tell me how to make work with all user machines.
the user machine doesn't have crystal report and sql server.

please help in this regard.
0
Comment
Question by:e_senthil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 8130027
You must install the SQL client dlls.

mlmcc
0
 

Author Comment

by:e_senthil
ID: 8130594
In my system, lot of dlls are there.

Hence, tell me how to extract the sql client dlls.

and I tried to register some of dlls, but they can't  be registered using regsvr32. It gives "Dll Entry point not found error"
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8132702
How are you calling the reports?

mlmc
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:Piter
ID: 8135293
HI,

Here r some Dll's u required for Crystal report..
  cpeaut32.dll, craxddt.dll, craxdrt.dll, crpe32.dll, craxdui.dll, crviewer.dll, crystalwizard.dll,

if you Decleared...
 dim app as new CRAXDRT.Application    ' Decleration

 then close it in form_unload event.
 set app = nothing

0
 

Author Comment

by:e_senthil
ID: 8135778
I am using crystal32.ocx to view the report

with CrystalReport1
 .ReportFileName = App.Path & "\RepPrjSummary_GLPostWAccSpread.rpt"
 .Formulas(0) = "dispSubTitle= 'G/L WIP Posting Detail as of " & MonthName(arrDateMonth(1)) & " " & arrDateMonth(2) & "'"
 .ParameterFields(0) = "@strCondOne;" & " and Acc.ChrProjcode in (Select chrprojcode from tbGenProjectNo where intHostid=" & inthostid & ");TRUE"
 .ParameterFields(1) = "@strCondTwo;" & arrDateMonth(0) & ";TRUE"

  If Not setLogonServer(CrystalReport1) Then
     Exit Sub
  End If

  .Destination = crptToWindow
  .Action = 1

end with

-----------------------------------------------------------------------

Public Function setLogonServer(obj As Object) As Boolean
On Error GoTo setLogonServer_Error

  Dim crApp     As New CRAXDRT.Application
  Dim crRep     As CRAXDRT.Report
  Dim crSubRep  As CRAXDRT.Report
  Dim crTab     As CRAXDRT.DatabaseTable
  Dim crSec     As CRAXDRT.Section
  Dim subRepObj As CRAXDRT.SubreportObject
 
  Dim i         As Integer
  Dim j         As Integer
  Dim k         As Integer
 
 If Trim(obj.ReportFileName) = "" Then
   MsgBox "Error: File name is empty" & vbCrLf & "Please call the setlogonserver function after ReportFileName", vbInformation, "SetLogon Server Failed"
   setLogonServer = False
   Exit Function
 End If
 
 Set crRep = crApp.OpenReport(obj.ReportFileName)
 
 
 For i = 0 To crRep.Database.Tables.count - 1
  obj.LogonInfo(i) = "DSN=" & gstrMySQLServer & ";UID=" & gstrMySQLUserName & ";PWD=" & gstrMySQLPassword & ";DSQ=" & gstrMySQLDataBaseName
 Next i
 
 For i = 1 To crRep.Sections.count
   Set crSec = crRep.Sections.Item(i)
  For j = 1 To crSec.ReportObjects.count
     If crSec.ReportObjects.Item(j).Kind = crSubreportObject Then
       Set subRepObj = crSec.ReportObjects.Item(j)
        Set crSubRep = crRep.OpenSubreport(subRepObj.SubreportName)
        If (subRepObj.SubreportName <> "") Then
            obj.SubreportToChange = subRepObj.SubreportName
            For k = 0 To crSubRep.Database.Tables.count - 1
              obj.LogonInfo(k) = "DSN=" & gstrMySQLServer & ";UID=" & gstrMySQLUserName & ";PWD=" & gstrMySQLPassword & ";DSQ=" & gstrMySQLDataBaseName
            Next k
        End If
      End If
   Next j
 Next i
 
 obj.SubreportToChange = ""


setLogonServer = True

   On Error GoTo 0
   Exit Function

setLogonServer_Error:
   setLogonServer = False
   Call gPrErrorMail(Err.number, Err.description, False, "RightsAssigner", "setLogonServer", Erl, "Rights Assigner")

End Function


The setLogonServer function is used to set the datasource to the report at runtime. I am using LogonInfo method to set the datasource, because my development server(kgislatds) and production server(tesco6) are different.

if I use the connect method or logonserver method, the server name is not changed at runtime. It gives "can't open sql server error".

so I am using CRAXDRT (Crystal Reports 8.5 ActiveX Designer RunTime Library) to find the no of tables in that report and I set the datasource to those tables at runtime using crystal32.ocx LononInfo method.


As perter mentioned,I registered  cpeaut32.dll, craxddt.dll, craxdrt.dll, crpe32.dll, craxdui.dll, crviewer.dll, crystalwizard.dll to all user machines.

 Eventhrough the Error occured in the following line.

 .Action = 1

The error description is

"CAN'T FIND DATABASE DLL"

please tell me what are the dlls that I have to register in the user machines.

Thanks
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8135924
0
 

Expert Comment

by:jc_arizmendi
ID: 8137184
Hi :)
If you need SQL libraries
You can intstall the OLAP part of SQL Server CD in the client machines, so you will see the reports.

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 100 total points
ID: 8140463
I think he just needs the CR dlls for database access.

mlmcc
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Simple Linear Regression
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question