My application is not finding the Crystal DLLs

I am using crystal reports 11.5 in my web application, which is been built in Visual Studio 2003, and I am using DotNetNuke framework. The problem I am having is only in deployment computer. I do not have the problem in my development computer. My development and deployment computers both have windows 2003 server OS.
My development machine has Crystal Reports 11.5 developers edition installed.
I ran the redistribution package that come with Crystal 11.5, which is called CrystalRedist115_x86.msi, in my deployment machine. I noticed that the install created a folder in program files\business objects\common\35\managed and added some dlls.

The error that I am getting is

“DotNetNuke.Services.Exceptions.ModuleLoadException: File or assembly name CrystalDecisions.CrystalReports.Engine, or one of its dependencies, was not found”

When I add all the crystal’s DLLs to the bin folder of my application that error disappears; but I get another error. (I do not have the DLLs in my bin folder on my development machine)

'log on to SQL server
'Report code starts here
'Set the database and the tables objects to the main report 'oRpt'
crDatabase = oRpt.Database
crTables = crDatabase.Tables
'Loop through each table and set the connection info
'Pass the connection info to the logon info object and then
' apply the logon info to the main report
For Each crTable In crTables
With crConnInfo
.ServerName = configurationAppSettings.GetValue("ServerName", GetType(System.String))
.DatabaseName = configurationAppSettings.GetValue("DatabaseName", GetType(System.String))
.UserID = configurationAppSettings.GetValue("UserID", GetType(System.String))
.Password = configurationAppSettings.GetValue("Password", GetType(System.String))
End With
crLogOnInfo = crTable.LogOnInfo
crLogOnInfo.ConnectionInfo = crConnInfo
crTable.ApplyLogOnInfo(crLogOnInfo)
If (crTable.TestConnectivity()) Then
If (crTable.Location.IndexOf(".")) > 0 Then
crTable.Location = crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1)
Else
crTable.Location = crTable.Location
End If
End If
Next
'Set the sections collection with report sections
crSections = oRpt.ReportDefinition.Sections
'Loop through each section and find all the report objects
'Loop through all the report objects to find all subreport
' objects, then set the logoninfo to the subreport
For Each crSection In crSections
crReportObjects = crSection.ReportObjects
For Each crReportObject In crReportObjects
If crReportObject.Kind = _
ReportObjectKind.SubreportObject Then
'If you find a subreport, typecast the reportobject
' to a subreport object
crSubreportObject = CType(crReportObject, SubreportObject)
'Open the subreport
oSubRpt = _
crSubreportObject.OpenSubreport( _
crSubreportObject.SubreportName)
crDatabase = oSubRpt.Database
crTables = crDatabase.Tables
'Loop through each table and set the connection info
'Pess the connection info to the logoninfo
' object then apply the logoninfo to the subreport
For Each crTable In crTables
With crConnInfo
.ServerName = _
configurationAppSettings.GetValue("ServerName", _
GetType(System.String))
.DatabaseName = configurationAppSettings.GetValue("DatabaseName", GetType(System.String))
.UserID = configurationAppSettings.GetValue("UserID", GetType(System.String))
.Password = configurationAppSettings.GetValue("Password", GetType(System.String))

End With
crLogOnInfo = crTable.LogOnInfo
crLogOnInfo.ConnectionInfo = crConnInfo
crTable.ApplyLogOnInfo(crLogOnInfo)
Next
End If
Next
Next
' Set the parameters
If DoParams Then
'Get the collection of parameters from the report
crParameterFieldDefinitions = _
oRpt.DataDefinition.ParameterFields()
For Counter = 0 To UBound(arParams) - 1
crParameterFieldDefinition = _
crParameterFieldDefinitions.Item(Counter)
'
'Get the current values from the parameter field.
crParameterValues = crParameterFieldDefinition.CurrentValues
If Not IsArray(arParams(Counter)) Then
'Test if param passed in matches CR param receiving
Dim test As String
Dim paramcounter As Integer
For paramcounter = 0 To UBound(arParams) - 1
' Response.Write(arParams(paramcounter))
test = arParams(paramcounter)
' Grabs param from CR and compares against param
' passed in
If test.StartsWith(LCase(crParameterFieldDefinition. _
ParameterFieldName())) Then
test.Substring(test.IndexOf("=") + 1)
'Set the current values for the parameter field 0
crParameterDiscreteValue = New ParameterDiscreteValue
crParameterDiscreteValue.Value = _
test.Substring(test.IndexOf("=") + 1)
'Add the first current value for the parameter field
crParameterValues.Add(crParameterDiscreteValue)

Exit For
End If
Next
Else
crParameterRangeValue = New ParameterRangeValue
crParameterRangeValue.StartValue = arParams(Counter)(0)
crParameterRangeValue.EndValue = arParams(Counter)(1)
crParameterValues.Add(crParameterRangeValue)
End If
'All current parameter values must be applied for the
'parameter field.
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
Next
End If
End sub

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

When I placed the DLLs in the bin folder the following error disapears
"System.IO.FileNotFoundException: File or assembly name CrystalDecisions.CrystalReports.Engine, or one of its dependencies, was not found."

But I get the
"Unable to connect: incorrect log on parameters. ---> CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Error in File C:\WINDOWS\TEMP\IB_Daily_Transaction_Blotter {8FF2F0A8-BD78-41E1-89C8-668466A7B458}.rpt: Unable to connect: incorrect log on parameters"

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

I hate sub reports and always consider them the last resort in any reporting solution. The negative effect on performance and maintainability is just not worth the easy ride they give the report writer. Nine times out of ten reporting requirements…

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples).
Crystal Reports uses a two-pass reporting process to provide greater …

Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message. In the To field, type your recipient's fax number @efaxsend.com.
You can even send a secure international fax — just include t…

Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…