vb.net and crystal reports

jwebster77
jwebster77 used Ask the Experts™
on
Hi Everyone, we are using Visual Studio.Net.  The code below is used to populate the parameters and launch a crystal report.  THe problem we are faced with is that on 64 BIT boxes, the report does not launch.  Instead, a login comes up asking for service name, username, password everytime.

If we launch a report via a different method (passing in dataset, see code below the line below for that example, the report launches and works.  Can anyone help!  Thanks in advance.

Dim crParameterDiscreteValue As ParameterDiscreteValue
        Dim crParameterFieldDefinitions As ParameterFieldDefinitions
        Dim crParameterFieldLocation As ParameterFieldDefinition
        Dim crParameterValues As ParameterValues

        Dim crReport As New crLaborClockInPercent
        crReport.SetDatabaseLogon("apps", "apps")

        '
        '' Get the report's parameters collection.
        ''
        crParameterFieldDefinitions = crReport.DataDefinition.ParameterFields
        '**** Location
        crParameterFieldLocation = crParameterFieldDefinitions.Item("RunDate")
        crParameterValues = crParameterFieldLocation.CurrentValues
        crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
        crParameterDiscreteValue.Value = Me.dateTimePickerFrom.Value
        crParameterValues.Add(crParameterDiscreteValue)
        crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
        '****  From Date
        crParameterFieldLocation = crParameterFieldDefinitions.Item("StopDate")
        crParameterValues = crParameterFieldLocation.CurrentValues
        crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
        crParameterDiscreteValue.Value = Me.dateTimePickerTo.Value
        crParameterValues.Add(crParameterDiscreteValue)
        crParameterFieldLocation.ApplyCurrentValues(crParameterValues)

        Dim frm As New frmViewReport
        frm.ReportType = "LaborCockInPercentage"
        frm.Report29 = crReport
        frm.Show()
    End Function
--------------------------------------
crReport.SetDatabaseLogon("apps", "apps")

            Dim dayo As OracleClient.OracleDataAdapter

            Dim dsyo As New DataSet
            Dim sqlString As String

            sqlString = "SELECT * FROM CTL.REPORTS_RECEIPTS WHERE rcv_txn_creation_date >= '" & Format(Me.datetimepickerfrom.Value, "dd/MMM/yyyy") & "' and rcv_txn_creation_date <= '" & Format(Me.datetimepickerto.Value, "dd/MMM/yyyy") & "'"


            GlobalsqlString = sqlString

            Dim frm As New frmViewReport
            frm.ReportType = "ReceiptsNew"
            frm.Report77 = crReport
            frm.Show()
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
What version of VS and Crystal?

Some versions of Crystal are not 64-bit compatible.  Also do you have a 64-bit database or did you install the 32-bit drivers on the 64-bit machines?

mlmcc

Author

Commented:
It is a Oracle backend database.  (Does not occur w/ SQL Server)  Oracle client is 64bit.  Visual Studio.Net 2005.  Maybe the answer is simply upgrading program to .net 2008?
Top Expert 2011

Commented:
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Crystal for VS2005 is strictly 32-bit

mlmcc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial