How to create SSRS Report Dynamically with Dynamic Schema, Dynamic Table Name and Dynamic Columns Part 59.1

Scenario:

Few months back, I created a post/video "How to Create SSRS Report When Number of Columns Can change Anytime in Source Object". In this post we are going to create another dynamic reports in which we will be able to

1) Choose the Schema form our Database
2) Choose Table for given schema from step 1
3) Choose column/s depending upon values of step 1 and Step 2
4) Display the data on report for our selected columns

This type of report can be very helpful when we have to simply create many details reports for users from our database. If we would like we can add also the Where clause in our report to provide filtered reports. Let's leave that challenge to you.


SQL Queries for our Data Sets

1) DS_Report 
Link to Code


3) DS_Tables
This will return the list of user tables depending upon the schema you will choose

Select Distinct Table_Name as TableName from INFORMATION_SCHEMA.TABLES
where TABLE_TYPE='BASE TABLE'
and TABLE_SCHEMA=@SchemaName
order by Table_Name


4) DS_Columns
This will return us the list of columns depending upon the selection of Schema and Table

Select COLUMN_NAME as ColumnName from INFORMATION_SCHEMA.COLUMNS
where TABLE_SCHEMA=@SchemaName
and TABLE_NAME=@TableName




8 comments:

  1. I went over this website and I believe you have a lot of wonderful information, saved to my bookmarks www.dynamicmarketing.sg/seo-consultant-singapore

    ReplyDelete
  2. Great post. I'm looking exactly. But I'm facing a challenge when i entered SP, am not getting fields. I'm referring step at Video at 17.37. What could be issue?

    ReplyDelete
    Replies
    1. Getting the same error>>!!! Did you happened to find out???

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. SCERT Himachal Pradesh 2nd Class Textbook

    Himachal Pradesh Elementary Education Board Responsibilities of Preparing the Textbook, Syllabus, Study Material and Conducting Middle, Final Examination, HP Board 1st, 2nd, 3rd, 4th, 5th Textbook 2023 are one of the most Resourceful Tools for the Students. SCERT Himachal Pradesh 2nd Class Textbook Primary School Textbooks Provide the Right and in-Depth information on a Particular topic. Also, these books act as a Framework for Facilitating Students with Effective learning, HPBOSE 1st, 2nd, 3rd, 4th, 5th Books 2023 These books aim at Analyzing the Instructional objectives of the Subject. HP Board 1st, 2nd, 3rd, 4th, 5th Book 2023 Pdf Format is Upload in Online. Himachal Pradesh Board Adopt by National Council of Educational Research and Training is an autonomous Organization of the Government of India, Himachal Pradesh 1st, 2nd, 3rd, 4th, 5th Textbook 20232 will be Download on the NCERT Official Website,

    ReplyDelete
  5. I thought your post was excellent, and I think readers will learn something from it. Posts will still be acquired in the same manner. I also recommended trying out the new profile space bar clicker. Improve your spacebar clicker by visiting the profile.

    ReplyDelete