Crystal Reports .NET 2005 Subreport linked with parameters and command cols
Sorry if this has been asked before, but I cannot find the answer after looking for over an hour.
I have a Crystal XI report that I am using in .NET 2005 that links on a paramter (same parameter name in the main and sub report), AND links on 2 command object columns.
The links looks like this:
I'm trying to pass the parameters to the main report via code in ASP.NET (C#) like so:
private void SetCurrentValuesForParameterField(ReportDocument rptDoc, string szParameter, ArrayList valuesARY)
ParameterValues currParamValues = new ParameterValues();
foreach (object singleValue in valuesARY)
ParameterDiscreteValue paramDiscVal = new ParameterDiscreteValue();
paramDiscVal.Value = singleValue.ToString();
ParameterFieldDefinitions paramFldDefs = rptDoc.DataDefinition.ParameterFields;
ParameterFieldDefinition singleParamFldDef = paramFldDefs[szParameter];
This works for other reports that do NOT have sub reports. However, thsi si the first sub report we are trying to set up and cannot get it to work properly.
Error it throws is this one:
Why does this fail? Is there a workaround or fix?
I would like to inform you that VS 2005 is only compatible with CR XI R2 and CR 2008.
Have look in supported plateform guide:
You need to upgrade CRXI to CRXIR2 then try to solve parametes issue.
To download the CR XI R2 follow the instructions given below:-
Crystal Reports XI is installed on your computer. You need to manually uninstall Crystal Reports XI for one of the following reasons:
u2022 To verify that all Crystal Reports XI components have been completely removed prior to installing a later version of Crystal Reports.
u2022 To remove the remaining Crystal Reports XI components that have not been removed using the 'Add/Remove Programs' command (Start > Settings > Control Panel).
u2022 To remove the remaining Crystal Reports XI components that have not been removed using the Setup.exe file from Crystal Reports XI installation CD.
How do you manually uninstall Crystal Reports XI?
Before getting started, uninstall Crystal Reports XI by launching the Setup.exe file from the installation CD or by using the 'Add/Remove Programs' command. If either of these methods fails to remove all Crystal Reports directories, files and registry keys, then continue with the resolution of this article.
This resolution can be applied if Crystal Reports XI is the only software installed on the computer that uses the Business Objects directories, files and registry keys.
For example, Crystal Analysis, Crystal Enterprise and BusinessObjects Enterprise XI are applications that may share the same directories, files and registry keys.
Removing these directories, files and registry keys may cause other software to function incorrectly.
1. To manually uninstall Crystal Reports XI, delete the following directories:
u2022 C:\Program Files\Common Files\Business Objects\3.0
u2022 C:\Program Files\Business Objects
Do not remove the directory C:\Program Files\Common Files\Business Objects\3.0 if you have BusinessObjects Enterprise XI or Crystal Reports Server XI installed. These files are shared by both applications and removal of these files will cause Business ObjectsEnterprise XI and Crystal Reports Server XI to function incorrectly.
2. Delete the following registry keys:
The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk.
For information on how to edit the registry key, view the 'Changing Keys And Values' online Help topic in the Registry Editor (Regedit.exe).
It is strongly recommended that you make a backup copy of the registry files (System.dat and User.dat on Win9x computers) before you edit the registry.
u2022 HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects
u2022 HKEY_CURRENT_USER\Software\Business Objects
u2022 HKEY_USERS\S-#-#-##-...-####\Software\Business Objects
(The number signs (#) represent a series of numbers that are different on each computer.)
After making changes to the registry, restart the affected service or application as required.
After deleting the CR XI from the system install the CR XI R2 full build and provide the same key as you provided in CR XI.
URL to download CR XI R2 is: - http://downloads.businessobjects.com/akdlm/crystalreports/14-00806-085.zip
Hope this helps!!