I am a complete newbie, but I think I got the C# code for Listing 16-4 (SetParameterDiscreteWithReport) exactly right. It compiles correctly.
But I get an error when I run it: "Index was outside the bounds of the array". The error occurs at SubreportName in
ParameterFieldDefinition=
MyReport.DataDefinition.ParameterFields[ParameterName, SubreportName];
I am passing the method "" as SubreportName, since I don't have a Subreport. But I get the runtime error with this empty field.
I am working in Visual Studio 2005, if that makes any difference.
Am I missing something obvious?
Thanks...Marv