Report Viewer add dataset


I’m trying to create basic template for report view. The problem is that my report should include dataset from custom property, which may have columns from one to n. For what I have learned from report view component is that you need to introduce every column individually in report designer. Isn’t there possibility to fetch whole dataset to report?

Dataset has row for each analysis and column for each sample/sample location, which is why dataset can be anything from [1x1] to [nxn]. There could be possibility to limit columns to 10 or such, but column headers are given by sampleid ("#123, #124, #125" etc.).

So, should I just look for another solution by using CSV and Excel or is there hope for me?

So you are saying that your dataset has a varying number of columns?

Is it possible that you can put your dataset on its side, meaning change the dataset so that the columns are rows and the rows are columns? That way you have a varying number of rows instead of columns. Just an idea. I suppose this won’t work if you have both varying columns and rows.


You can select the whole dataset.

In your custom property, DB browse, select your table and you can drag and copy the whole table.

Then you can edit the SQL query to suit what you want based on index or time stamp etc.

Thank you for your replies.

To clarify: Dataset can vary depending on selected reportdata (that has been saved on database). So by selecting group name of reportdata to be printed on PDF, Report Viewer -tool should change data. This way user could use same template for all the documents where only dataset, name, date and such changes. Name and date can be changed by switching reportdata’s groupid as there is always one name, one date and so on. Dataset however include information of different analyses (rows) such as pH, amount of iron, amount of Escherichia coli etc. taken from number of locations (1-n).

So I already have correct dataset, but I dont know the way to insert that dataset to my report without adjusting Report View -tool everytime dataset’s column or row count changes.

I might need to set max number of columns and split my dataset so that I have each column on their own custom dataset property. Then I can insert data to report template column by column up to 10 and if I have less than 10, null columns will just be null columns.