troubleshooting Question

vb.net and crystal reports

Avatar of jwebster77
jwebster77 asked on
Crystal ReportsVisual Basic.NET
4 Comments1 Solution441 ViewsLast Modified:
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()
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros