Wrox Programmer Forums
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 3rd, 2005, 07:52 PM
Authorized User
 
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default another parameter

i have created SP with a parameter.
then i created a report bind to this SP with parameter
parameter is @coname in SP

when i want to display it in crstal viewer, theres no data.

but when i create same stopred proced with no parameter
bind it to crsyla repots as datasource. then in crystal i made my parameter which is "coname " then call this in my vb.net form inside crytal report then it shows. what the problem

tnx in advance



heres the code

Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    '
    ' Load the selected report file.
    '
    Dim CR As New ReportDocument
    CR.Load(strReportPath)
    '
    ' Declare the parameter related objects.
    '
    Dim crParameterDiscreteValue As ParameterDiscreteValue
    Dim crParameterFieldDefinitions As ParameterFieldDefinitions
    Dim crParameterFieldLocation As ParameterFieldDefinition
    Dim crParameterValues As ParameterValues
    '
    ' Get the report's parameters collection.
    '
    crParameterFieldDefinitions = CR.DataDefinition.ParameterFields
    '
    ' Set the first parameter
    ' - Get the parameter, tell it to use the current values vs default value.
    ' - Tell it the parameter contains 1 discrete value vs multiple values.
    ' - Set the parameter's value.
    ' - Add it and apply it.
    ' - Repeat these statements for each parameter.
    '
    crParameterFieldLocation = crParameterFieldDefinitions.Item("@coname")
    crParameterValues = crParameterFieldLocation.CurrentValues
    crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
    crParameterDiscreteValue.Value = strStartDate
    crParameterValues.Add(crParameterDiscreteValue)
    crParameterFieldLocation.ApplyCurrentValues(crPara meterValues)
    '
    ' Set the Crytal Report Viewer control's source to the report document.
    '
    CrystalReportViewer.ReportSource = CR









Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter object malfunction - out parameter dash dev C# 2005 6 December 4th, 2007 12:58 PM
subreport parameter lisabb Access 2 October 26th, 2007 12:10 PM
parameter umeshtheone Beginning VB 6 0 May 23rd, 2007 01:13 AM
Parameter shanib Crystal Reports 1 September 30th, 2005 02:35 AM
Parameter Bhavin Crystal Reports 4 September 9th, 2004 10:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.