Display DataSet name - reporting-services

I have written a complex Stored Procedure that creates tables depending on the Parameter it recieves.
My SSRS report has 7 tables that need to be populated from this Stored procedure, so i have 7 DataSets, each executing the same stored procedure but with different Parameters so that it can populate each of the tables in my report.
My problem is, and even to me it sounds silly that I wouldnt know, I need to, on each of the 7 tables being populated by the SP, Show the DataSet name used for that particular table.
Does anyone know how to display the Dataset Name of the DataSet that each tablix on my report is using?

Related

Calling a dataset and table related to it using parameter in SQL Server Reporting Services

I have 3 different datasets and each having a different table and a parameter which is having 3 values, for each value it has to call one dataset and as well as the related table to that dataset what can be done to make it possible.

dynamic sql in SSRS

I have a dynamic SQL stored procedure returning multiple number of columns for different items.
For example, item1 - 5 columns, item2 - 4 columns
I am thinking of building SSRS reports using that stored procedure hoping to get multiple results.
For example, when click 'item1', it gives you that 5 columns sp can return whist click 'item2', it gives you that 4 columns sp can return
Can SSRS do this? When I use SP as a source for SSRS, it seems that the output is NOT dynamic as it only returns 'item1'
thanks
r
RS will read column metadata from the first result set of the query.
So I suggest you can add a table variable (fixed columns to support all your dynamic results) into your stored procedure, insert the dynamic query result into the table variable, and then select the result from the table variable.
what I did is to create a 'big table' in SSRS and manually create fields sp potentially returns and only display the columns based on the sp outputs by using 'viability' option
the only issue is that you need to manually configure each column to indicate under what circumstance it is supposed to appear

Need to write SSRS report that uses stored procedure with a pivot as a dataset but I can't get the report to be dynamic, is this even possible?

I have a bear of a problem here. The user wants a report that shows the earnings, deductions and liabilities (EDL) code of each employee or null/blank if an EDL code doesn't apply to that employee. I needed one row for each employee name and columns for each possible EDL code combination. I got that answer fixed from my previous question here:
Struggling with a dynamic pivot on multiple columns with one being concatenated
I ran into a problem where there are a potential 270 column headings (EDL code combination with "subj", "elig" or "amt" appended) but not every employee will have a value for every column and security settings lock me out of seeing 1 of the 3 payroll groups. This made my report very limited in that when I ran it I could only show on the Crystal Report the data for what columns I had at the time I created the Crystal Report. Well, the user who requested this report has access to payroll group 1 and if even one of those employees had an EDL code that I didn't have in my data when I created the Crystal Reports file then the report wasn't useful to the user. We figured a way for her to get the info she needed by her logging into SQL Server and executing the stored procedure and she did what she needed to do with the data.
Fast forwarding to today I have to create this as a report in SSRS or give detailed instructions on how she can do this in the future if need be since my contract is coming to an end. I'm not familiar with SSRS but I thought maybe that would meet her needs over Crystal Reports. However, I'm running into the same problem. When I add the stored procedure as a dataset (adding it in as text to execute, not clicking the stored procedure radio button) I only see the EDL codes from that particular query not all potential combinations. I need a way to maybe dynamically add columns to the SSRS report, does such a thing exist?

How to pass a record from ssrs main report dataset to subreport

I have a customer dataset from a main report which I bind to a list. In this list I have a subreport. How do I pass the each row of data to the subreport? I don't want to pass an id from main report to subreport then call a stored procedure to fetch the record based on the id. I already have all the details flattened out in the dataset which i fetched from the main report.
The fact is that you can't pass a set of rows as a parameter to a subreport. The most common approach is to have a shared dataset so you can execute it again based on the same parameters or a store procedure for exactly the same purpose. Only other thing can be done, and it's to convert a dataset's field into a string containing all the values, and then split it again. This is done with SSRS built-in functions join and split (if I'm not wrong), but to be honest I don't know if that solves your problem and it's a really nightmare to get it working properly.
My standard approach is to have efficient stored procedures that can be executed any times within a set of SSRS reports. I understand that you want to retrieve each datataset only once, but SSRS is not meant to make that easy.
And even more important, if you queries or procedures are efficient, data retrieval time is just a tiny porting of all SSRS report build and presentation time. Usually rendering the report is what takes longer and some repeated data extraction won't be noticed in the overall execution.
If you what to be really efficient in data retrieving, you can explore the options provided to cache data in datasets, but stills seems to be too complex to solve something that doesn't really need a solution.
Hope this helps.

How do I get the tables in an SSRS report to use the data in a dataset without multiple trips to the database

I have a dataset which has the data to be used in by several tables in my 2012 SSRS report.
Each table uses a different set of rows in the dataset, i.e. where a particular column in the dataset has a particular value.
I would like to grab all the data to be used by all the tables in one go, and then have the tables use the dataset's data, filtering by this particular column.
Unfortunately, it looks like the report fetches data into the dataset every time each table needs to be populated.
Is there a way I can get the table to use the data that has already been fetched into the dataset without it making the report refetch data into the dataset?