Error While Using Multiple Datasets in RDLC Report

2019-02-24 14:48发布

问题:


I am creating RDLC report with two datasets. Earlier i was using one dataset and it was working fine,but when i added second dataset it started giving me following error for textboxes.

Error 1 The Value expression for the text box ‘Textbox10’ refers to the field ‘HospitalAddress’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.

Why is this happening? Please help....

回答1:

You need to specify which dataset to use in your expressions now. Sample expression syntax below:

=First(Fields!<field name>.Value, "<dataset name>")