Print Page | Close Window

Subreports & Linked Parameters

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1061
Printed Date: 26 Apr 2024 at 8:50am


Topic: Subreports & Linked Parameters
Posted By: Dave P
Subject: Subreports & Linked Parameters
Date Posted: 25 Jul 2007 at 1:50am
OS:        Windows XP Professional
Crystal:  Crystal XI Developer Edition (SP2 & latest monthly hotfix)
Dev Env: Visual Studio .NET 2003 Professional (.NET Framework v1.1.4322)
 
I have a report which contains 1 subreport. This subreport has 2 parameters linked to the main report. 
 
I have some ASP.NET code to loop through the parameters in the main report and populate certain ones with pre-defined values. The problem I encounter is that the linked parameters in the subreport return false from the IsLinked function even though they are in fact linked, and so expect a value to be entered by the end user.
 
Any reason you can think of for this, as I've checked in the Subreport Links screen and the links are set up correctly?



Replies:
Posted By: hilfy
Date Posted: 25 Jul 2007 at 8:53am
I usually look at the parameter name when I work with linked parameters in code. Parameters used to link a subreport start with "PM".
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Dave P
Date Posted: 25 Jul 2007 at 9:20am
Well I finally got to the bottom of it. Apparently it was an issue with Crystal XI Release 1 that the ParameterFieldDefinition.IsLinked function always returned false. I went to the Business Objects site and downloaded the Release 2 Build & SP2 (a nice 1.03Gb download). Once updated the problem was resolved. It has also solved other problems I was experiencing, one being where as soon as I dropped a boolean parameter onto a report and ran it via the report viewer, I got an exception. It was fine with every other type of parameter though?!!
Anyway, everything seems fine now (fingers crossed).



Print Page | Close Window