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 September 16th, 2003, 02:41 PM
Authorized User
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to pass multiple parameters to CR 9

Hi all
How can i pass multiple parameters to Crystal Report 9
in Dot net framework latest version 2003,
in previous version i use to pass parameters using
the SetParametervalues method of ReportDocument Class.
But in this version i did not found this method in the
reportdocuement class.

Thanks in advance
javid





syedjavid
__________________
syedjavid
 
Old September 17th, 2003, 05:50 AM
Authorized User
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default


i Done it,this is the method to pass the parameters to CR 9
    private void SetParameterFieldsNew(CrystalDecisions.CrystalRepo rts.Engine.ReportDocument rptDoc,string ParamNameList,string ParamValuesList)
        {
                    string[] strParamNames = ParamNameList.Split (new char[] {Convert.ToChar(44)});
                    string[] strParamValues = ParamValuesList.Split (new char[] {Convert.ToChar(44)});


            foreach( string N in strParamNames)
            {
                foreach(string V in strParamValues)
                {
                    CrystalDecisions.Shared.ParameterValues objParamField;
                    CrystalDecisions.Shared.ParameterDiscreteValue objDiscreteValue;
                    for(int Index = 0 ; Index < rptDoc.DataDefinition.ParameterFields.Count-1 ; Index++)
                    {
                        objParamField = new CrystalDecisions.Shared.ParameterValues();
                        objDiscreteValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
                        objDiscreteValue.Value = V;
                        objParamField.Add(objDiscreteValue);

                        if(!rptDoc.DataDefinition.ParameterFields[Index].IsLinked())

                            rptDoc.DataDefinition.ParameterFields[N].ApplyCurrentValues(objParamField);
                    }
                }

            }
        }

syedjavid





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass parameter value to CR SQL Command vijaykumartaduri BOOK: Professional Crystal Reports for VS.NET 3 July 31st, 2007 12:13 AM
Can I pass parameters when creating files via CR linjader Classic ASP Databases 0 July 26th, 2006 03:48 AM
Pass Date parameter from jsp to CR ray5 Crystal Reports 0 September 6th, 2005 09:23 PM
Pass Multiple Parameters from C# to SQL RS ms_code_bsuter BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 July 25th, 2005 06:34 PM
how to pass the data from dataset to CR? zouky Crystal Reports 0 November 8th, 2004 02:49 AM





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