2
votes

I am creating a report in SSRS. I have a table showing the date and time the report was generated, it's a single column table with one expression =Now() and is not linked to any datasets.

The trouble I am having is that it returns 77 rows all with the exact same date. My main dataset returns 77 rows in a different table but that table is not linked to this one in any way.

How can I stop it from returning so many rows? The reason I'm using a table and not a text box is because I want it to have the same look and feel as other data presented in my report i.e. Header Row and Data Presented underneath. There are a few tables that use the same approach and all of them are returning duplicate rows. As you can see from the image below, I just need the first row from each table. enter image description here

EDIT: Looks like SSRS automatically references a dataset when I insert a new table. When I change the table properties dataset to none it returns an error. Is there a way around this? I don't want data from any dataset, just want to use an simple expression =now()

1
If it is the First record you want to filter by then you can safely use the =First(Field!Values,"TopGroup") in your other tables as a filter condition of the other table groups you want to filter. - Ross Bush
You would be better off not using a table for the dates, just put them in textboxes. - StevenWhite

1 Answers

4
votes

As you've seen, a Tablix requires a DataSet, and when you only have one DataSet in a report it will link to this DataSet automatically in some circumstances.

You've mentioned you don't want to use Textboxes, but this does seem like the easiest option.

If you're set on using a Tablix for ease of formatting, to prevent any repeating rows just delete the Details group that gets set up by default when you create a Table through the designer:

enter image description here

enter image description here

This leaves a table with one header row only - you can add more header rows as required:

enter image description here

The result is a table that will only display the header rows once, i.e. no repeating rows.

You can add Summary data or individual fields from the DataSet to these header rows; if no aggregation is specified it will just take the first row by default.