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
Avatar of Mike McCracken
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
Avatar of jwebster77
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?
Avatar of vasto
vasto
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo