May 24, 2005 at 2:10 pm
Hi,
I am having a problem with subreport.
The subreport has two parameters EmployeeID and CYear. The same parameter are defined for the main report.
Now, I have inserted this subreport in the main report in details section. In the main report, I right click on subreport and go to properties and on the Parameters tab, I specify the values for the parameters as:
= Fields!EmployeeID.Value and
= Fields!CYear.Value
So, the subreport will automatically take the current field values from the main report.
But when I preview my main report, I see the main report correctly, but no subreport information, instead, it prints the following line:
Error: Subreport could not be shown
and the error is: The report parameter "EmployeeID" is read-only and cannot be modified.
Then what I tried was: I deleted EmployeeID parameter from the subreport. But now it gives the same error for CYear parameter.
I am not running the report from browser... I am trying to preview the report in VS.NET IDE itself by clicking on Preview tab.
Has anybody came across such a problem?
Your help is greatly appreciated.
Thanks in advance
Vikram
May 24, 2005 at 8:51 pm
Instead of passing the field value, you could try passing the value of the parm as selected in the outer report i.e.
= Parameters!Employee_Parm.Value ; and
= Parameters!CYear.Value
Steve.
May 25, 2005 at 7:19 am
Hi Steve,
Thanks for the reply.
I do not want to pass Parameter value. This is because in the main report, the parameter can be null.
For example, if user does not pass any EmployeeID, then I want to display records for all the employees for the specified year (CYear parameter).
So in this case, the subreport should read the current EmployeeID that is being processed in the main report.
I have already created a group on EmployeeID field.
Regards
Vikram
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply