I am certain that this is a tired old subject based on the google search results I've seen, but I am trying to deploy a WinForm app built in VB .NET (VS 2005 - 2.0 framework).
I built a setup package including the merge modules, the .Net framework, and MDAC which should be OK for Crystal reports using SQL Server, but cannot find any info on how to deploy the necessary modules for Oracle 10g.
Do I need to install the entire Oracle 10G client, or are there merge modules I can include in the setup project to minimize the install requirements?
Please help. This has become a nightmare, leading me all over the planet trying to find good info on this.
P.S. The applciation itself does NOT contain any Crystal reports. It is an attempt at managing distribution of Crystal Reports without a report server. The reports are uploaded to a shared central repository directory, and the app simply uses a SQL database to control who has access to view/refresh the reports, and contains the Crystal Viewer and runtime.
This is code showing how the CR Viewer is being used and driven by the SQL database. The user sees a treeview of user groups and available Crystal Reports. On the click event, the database calls are made to determine what happens next. The database stores connection data, parameter values, and user permissions: (app works great locally - when deployed, well that is another issue)
Private Sub TreeView1_NodeMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseDoubleClick
Dim i As Integer
Dim x As CrystalDecisions.Shared.ParameterField
Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim sql As New SQLDataPortal2003.Common
Dim outParms As New Hashtable
Dim pList() As String
Dim dr As SqlDataReader
Dim sPath As String = "
Dc001\ISD\Corporate Systems\Crystal Reports WareHouse\"
If e.Node.Tag = "" Then
Exit Sub
End If
sPath = sPath & e.Node.Text.Trim() & ".rpt"
' Does the user have permissions for this report?
sql.ExecNonQuery("CRManager", outParms, "proc_CRM_Check_Permissions", My.User.Name, CType(e.Node.Tag, Int32))
If outParms("@Allow") <> vbTrue Then
MsgBox("You do not have permission for this report." & vbCrLf & _
"Contact System Administrator to be granted access to this report.", MsgBoxStyle.Information, "Crystal Reports Manager")
Exit Sub
End If
outParms = Nothing
rptDocument.Load(sPath)
sql.SP_ReturnDR("CRManager", dr, "proc_CRM_Get_Report", CType(e.Node.Tag, Int32))
While dr.Read() = True
rptDocument.SetDatabaseLogon(dr("DB_Login").ToString(), dr("DB_Pwd").ToString())
pList = Split(dr("ParmList").ToString(), ",")
End While
dr.Close()
dr.Dispose()
sql = Nothing
For Each x In rptDocument.ParameterFields
Select Case x.ParameterValueType
Case CrystalDecisions.Shared.ParameterValueKind.BooleanParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Boolean))
Case CrystalDecisions.Shared.ParameterValueKind.CurrencyParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Double))
Case CrystalDecisions.Shared.ParameterValueKind.DateParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Date))
Case CrystalDecisions.Shared.ParameterValueKind.DateTimeParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Date))
Case CrystalDecisions.Shared.ParameterValueKind.NumberParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Int32))
Case CrystalDecisions.Shared.ParameterValueKind.StringParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), String))
Case CrystalDecisions.Shared.ParameterValueKind.TimeParameter
rptDocument.SetParameterValue(x.Name, CType(pList(i), Date))
End Select
rptDocument.SetParameterValue(x.Name, pList(i))
Next
CrystalReportViewer1.ReportSource = rptDocument
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.Show()