Avatar of jwebster77
jwebster77
 asked on

vb.net and crystal reports

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()
Visual Basic.NETCrystal Reports

Avatar of undefined
Last Comment
Mike McCracken

8/22/2022 - Mon
Mike McCracken

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
jwebster77

ASKER
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?
vasto

Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question