Solved

Dynamic Report

Posted on 2011-09-11
5
443 Views
Last Modified: 2012-05-12
Hello Experts,
I need to create Dynamic report,I mean I can use one report  for different tables and fields,
I need to select colums in aspx page then pass the database and function  to sql report .
How can I change field name in the report ?
0
Comment
Question by:samprg
  • 3
  • 2
5 Comments
 
LVL 25

Expert Comment

by:TempDBA
ID: 36524517
As far as I know, this is not possible with SSRS.
But still this looks achievable. Create a report that gives all the fields that is possible, with NULL values for the fields where data is not retrieved for a particular report type, and while showing in the frontend, hide the columns where datavalue is NULL.
0
 

Author Comment

by:samprg
ID: 36525061
Please Can you give more detail
0
 

Author Comment

by:samprg
ID: 36525075
Do you have any example ?
0
 
LVL 25

Accepted Solution

by:
TempDBA earned 500 total points
ID: 36527527
What I wanted to say is create a common procedure that retrives data from all other procedures and finally creates a temporary table with all the possible columns. Then select data from this table. This is because while creating a rdl, you need to finalize on the datafields which can't be produced dynamically. So, this is the way I was suggesting. This is troublesome but to create a master procedure for all as you wish, you have to do in this way only I guess.

Suppose you have three procedures which gives different results. So, now instead of creating three different reports, Create a master procedure and call all the three procedure inside, and built a temporary table with all the possible columns and fetch data from that. For the fileds which are not resutled from the procedure, by default keep the value to be NULL. Now built a rdl which will have dataset getting datafiled for all the possible ones. When you are showing your data, just hide the columns with no data. I did this for one of my report where we had  100 columns to display but everywhere data presence was not sured and the presence of data was based on some criteria. so, generally the column respect to the criteria just yields 10-12 columns with good data.

This is again an overhead for the server as you will be running the procedures unnecessarily . But based on your requirement you can even skip that.
0
 

Author Closing Comment

by:samprg
ID: 36530830
Awesome
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS Dynamic Column Names - Last 8 Weeks 3 36
SQL Server 2012 r2 - Sum totals 2 22
TSQL - How to declare table name 26 28
Text file into sql server 5 21
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question