Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
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 February 2nd, 2007, 06:04 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing Multiple Parameters to a Crystal Report Pr

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=310

i have tried article which is published in this website.
its not working i want urgent reply for this.

i have used visual studio.net 2005 vb.net windows application
in form1.vb.just i drag and drop crystalreportviewer,then i created a report named MyReport.rpt.In that simply,i created new parameter country type string.drag and drop it in page header.then right click it got highlighting expert.in that click new then in item editor value of this field in ddl,is equal to in 2nd ddl and typed Country in txtbox.

My code i have written:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

in button click event i pasted this code.

 Dim paramFields As New ParameterFields
        Dim paramField As New ParameterField
        Dim discreteVal As New ParameterDiscreteValue

        paramField.ParameterFieldName = "Country"
        discreteVal.Value = "USA"
        paramField.CurrentValues.Add(discreteVal)

        paramField = New ParameterField
        discreteVal.Value = "Netherlands"
        paramField.CurrentValues.Add(discreteVal)

        paramFields.Add(paramField)
        Dim rpt As New MyReport

        CrystalReportViewer1.ParameterFieldInfo = paramFields
        CrystalReportViewer1.ReportSource = rpt

while debug this code by setting breakpoint and f11.
code got struck in this line
CrystalReportViewer1.ReportSource = rpt


debug below code.it shows error invalid pointer while trying to debug Set method.

Public Overrides Property ResourceName() As String
        Get
            Return "MyReport.rpt"
        End Get
        Set
            'Do nothing
        End Set
    End Property

thats all ...output of my program is nothing.crystal report become in active.

please reply soon
thanks imar.








Similar Threads
Thread Thread Starter Forum Replies Last Post
crystal report passing multiple parameter noppanit C# 0 March 20th, 2007 12:32 PM
Passing Multiple Parameters into Access Query rit01 Classic ASP Databases 1 October 26th, 2005 04:00 PM
Problem passing parameters in Crystal Report. joydip_kanjilal Crystal Reports 0 October 8th, 2004 01:47 AM
passing parameters at runtime using crystal report anilkumar Crystal Reports 2 January 3rd, 2004 01:35 AM





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