Solved

Dynamic Report

Posted on 2011-09-11
5
441 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delete Trigger in SQL Server2008R2 5 20
email the result out from a T-SQL queries 29 62
SSRS String Manipulation 6 40
SQL Server - SQL field is defined as text 3 26
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

930 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now