Skip to content
Advertisement

SSRS : How to make a data set field appear in the footer?

I have a simple report with a dataset( Patient id, programid, name, address, phone). In my report footer, I am trying to write a condition where the footer value shouldn’t show up for specific program ids. But the report footer doesn’t display the dataset fields. How do I write this condition for report footer?

Advertisement

Answer

Headers and Footers can’t display fields from your datasets because the dataset is out of scope for the header and footer – it wouldn’t know which row to display the field for.

However, you can use aggregate functions to specify a scope and the row and field; for example, to show the ProgramId field from the first row of a dataset, you can use the First function, specifying the scope of the dataset:

=First(Fields!ProgramId.Value, "MyDataset")

So you could do something like this for the Visibility-Hidden property of the footer:

=IIF(InStr("10090,116,10094,10083", First(Fields!ProgramId.Value, "MyDataset")) > 0, True, False)
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement