Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass parameters in Crystal Report
Message
 
To
24/11/2004 01:14:02
General information
Forum:
ASP.NET
Category:
Reporting
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00964140
Message ID:
00964220
Views:
9
This message has been marked as the solution to the initial question of the thread.
I use this method:

I used this code to pass values to parameters:
    Private Sub SetParameters()
        Dim objParameterFieldDefinition As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
        Dim objParameterValues As CrystalDecisions.Shared.ParameterValues
        Dim objParameterDiscreteValue As CrystalDecisions.Shared.ParameterDiscreteValue

        'Set the parameter name on the next line
        objParameterFieldDefinition = rptReport.DataDefinition.ParameterFields.Item("pMgmtFees")
        objParameterValues = New CrystalDecisions.Shared.ParameterValues
        objParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
        'Set the parameter value on the next line
        objParameterDiscreteValue.Value = Me.mdecMgmtFees
        objParameterValues.Add(objParameterDiscreteValue)
        objParameterFieldDefinition.ApplyCurrentValues(objParameterValues)

        'Set the parameter name on the next line
        objParameterFieldDefinition = rptReport.DataDefinition.ParameterFields.Item("pIncentiveFees")
        objParameterValues = New CrystalDecisions.Shared.ParameterValues
        objParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
        'Set the parameter value on the next line
        objParameterDiscreteValue.Value = Me.mdecIncentiveFees
        objParameterValues.Add(objParameterDiscreteValue)
        objParameterFieldDefinition.ApplyCurrentValues(objParameterValues)

     End Sub
>Hello,
>
>I need advice on how to implement Crystal Reports within VB.Net application using SQL Server 2000 as back-end.
>
>What I want to do is to use VB forms to pass parameters to my Report, what is easiest way to do this?
>
>Thank you for all your help!
>
>
>PS
>I'm using VB.Net and Crystal 10
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform