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 July 14th, 2005, 02:21 AM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing Parameter field values of sub report

Hi
I have an issue with accessing the Parameter field values of sub report in the main report.
Here with the description of my problem.
I am involved in developing a windows based applicaiton using Crystal Reports.
I am to access different reports based on check boxes selection.I have different rpt files which hold the data to be printed for individual check boxes selection.
For example ..I have check boxes 1,2,3 .Based on the selection combination ((1,2),(1,2,3),(1,3)...)the particular reports should be displayed.

I am inserting these subreports into the main report as individual details sections.The problem here is that I am not able to access the parameter field values of the sub reports in the main report.The paramters which are to be accessed are being prompted to be entered when I run the application.

I have added the code for the parameter fields values into the main report .The code goes like this in the main report
'************************************************* **************
crParameterDiscreteValue = New ParameterDiscreteValue
                        crParameterDiscreteValue.Value = Myvalue
                        crParameterField = New ParameterField
                        crParameterField.ParameterFieldName = "value"
                        crParameterField.CurrentValues.Add(crParameterDisc reteValue)
                        crParameterFields.Add(crParameterField)

CrystalReportViewer1.ParameterFieldInfo = crParameterFields
'************************************************* *******************
The crParameterField that I added should link to the sub report's parameter field.
"MyValue" is the name of the parameter field that i added in the sub report .
I should be able to access this at the main report.

Can anyone help me in explaining as to how to go ahead with this with some sample code.Or can anyone please tell me if this approach is correct or not?

Thanks in advance





Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing text in a hyperlink field mvyjim ASP.NET 2.0 Professional 0 March 10th, 2007 05:22 PM
passing parameter values to the crystal report connect2sandep Crystal Reports 0 December 20th, 2005 06:27 AM
TIP: Displaying Parameter Values in the Report bsullins BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 December 21st, 2004 12:23 PM
Date Field from Parameter Field narooma.12 Crystal Reports 0 November 14th, 2004 08:51 PM
Parameter field in Olap Report with Page dimension dma Crystal Reports 0 June 3rd, 2004 06:01 PM





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