3


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....

Amol Kolekar
  • 2,307
  • 5
  • 30
  • 45

1 Answers1

7

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

=First(Fields!<field name>.Value, "<dataset name>")
Ε Г И І И О
  • 11,199
  • 1
  • 48
  • 63
  • How could I compare values from two datasets? I'd like to do something like below, to count detail records in a master detail report: =Sum(IIF(
    .Fields!.Value == .Fields!.Value, 1, 0))
    – Marlon Oct 19 '12 at 18:19
  • Haven't tried that inside an RDLC. But I were you, I would do it in the SP and get the count as another field in the master dataset. – Ε Г И І И О Oct 20 '12 at 22:01
  • I am amazed if there is no workaround, since it's very unproductive to start adding First and a datasetName. – Ed_ Apr 15 '16 at 20:15
  • But how do we get multiple files (not the first or last)? – Buzzzzzzz Mar 12 '20 at 10:34