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 June 5th, 2006, 08:05 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gsboss007
Default how to pass parameter in subreports any idea?

   how to pass parameter in subreports any idea?


 
Old June 5th, 2006, 08:27 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gsboss007
Default

i am using this code for the main report it is working super but what can i write for the subreports ???

MeetingManagement.frm_meet_preview frmReport= new MeetingManagement.frm_meet_preview ();

string path=Application.StartupPath+ "\\"+ "Report_met_prevw.rpt";

frmReport.ReportViewer.ReportSource =path;


//'The Parameters in the report

CrystalDecisions.Shared.ParameterField ParamterField =new CrystalDecisions.Shared.ParameterField();


//'A collection of parameters is a parameter field

CrystalDecisions.Shared.ParameterFields ParamterFields =new CrystalDecisions.Shared.ParameterFields();

// 'Every parameter has a descrete value

CrystalDecisions.Shared.ParameterDiscreteValue ParamterDescreteValue = new CrystalDecisions.Shared.ParameterDiscreteValue();


// 'Now each of these parameters should be added a meaning

ParamterField.ParameterFieldName = "mmid";



//'Each of these parameters should be given a starting value

ParamterDescreteValue.Value = hidtxt_mmid.Text.Trim ();

//'All these values should be added to parameter field

ParamterField.CurrentValues.Add(ParamterDescreteVa lue);



//'Finally all these parameters should be added to the report

ParamterFields.Add(ParamterField);

//'ParameterInfo has been given all the information needed

frmReport.ReportViewer.ParameterFieldInfo = ParamterFields;

//'frmReport.MdiParent = Me.Parent.FindForm()

frmReport.Show();










Similar Threads
Thread Thread Starter Forum Replies Last Post
how to pass parameters in Crystal to subreports vayrapetov BOOK: Professional Crystal Reports for VS.NET 0 November 1st, 2007 09:37 AM
pass parameter naeem_ul_hussan Classic ASP Basics 2 August 30th, 2007 11:18 AM
Passing parameter value to subreports elygp Crystal Reports 4 May 3rd, 2007 01:25 PM





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