Dynamically creating a matrix in a Report

Last post 08-19-2008 11:10 AM by projammer. 1 replies.

Sort Posts:

  • Dynamically creating a matrix in a Report

    08-18-2008, 1:48 PM
    • Member
      2 point Member
    • projammer
    • Member since 06-20-2008, 12:54 PM
    • Posts 14

    Hello,

     

    I am somewhat new to SSRS, and have run into a problem.  I have a table in my application that is dynamically made at run time depending on variables from several different tables in my database structure.  Eventualy, it all gets put together and displayed as a gridview.  Is there anyway that I can pass this gridview, or a datatable, or any dynamically created object to the SSRS Report?  These reports can range in size.  There is no one database I can call to create this table.  The grid is made through a series of loops and database calls.  If this is not possible, what way would you suggest?  Thanks in advance.

  • Re: Dynamically creating a matrix in a Report

    08-19-2008, 11:10 AM
    Answer
    • Member
      2 point Member
    • projammer
    • Member since 06-20-2008, 12:54 PM
    • Posts 14

    Hello again!  I have came up with a solution to fix my problem and thought it would be good to share with everyone else. 

     1)  With a for loop, I go through the DT and use an INSERT statement to put the values into a dummy table in the DB.  The DB table must be a permanent table to build the report in SSRS.

     2) Use a matrix in SSRS.  Get all of the information needed and use row groups.  There is a property to eliminate duplicates in neccessary.  Put your value in the matrix field. and done!

    3) to prevent using too much DB space, delete the entries to the DB once the field is called.  Some ideas are to use a RNG to generate a number to put into a field for every entry into your dummy table and delete based on that.

     

    I am still subscribed and available to help if anyone else has a problem like this.  Also, suggestions for a better way are always welcomed.

Page 1 of 1 (2 items)