none
Running multiple queries on SSRS RRS feed

  • Question

  • Hi all,

    I have a complicated situation, I am getting used to SSRS and I do my report building on visual studio.

    I have 7 SQL-SERVER queries, all pointing to one Shared Datasource. I want to run all these queries (these are relatively small) and put them in one large report. I want it in an excel document with 3 queries in one tab, and the other 4 in 4 separate tabs so the excel workbook will have 5 tabs in total.

    I have all the SQL-Server queries ready so all I need to do is somehow put them into visual studio and produce a report as mentioned above.

    I am very new to SSRS and visual studio, so generic answers will not help me but I need step by step answers- sorry for any inconveniences but just trying to avoid any back and forth of messages.

    I can provide the sql queries if needed.

    Thanks in advance

    Wednesday, June 6, 2018 9:36 AM

Answers

  • Hi Taz,

    Please find the detailed steps below. Assuming there are no charts involved and its just tabular reports:-

    1. Create 7 datasets pointing to the same shared datasource.

    2. Drag 7 tablix control and place them one below the other and map each tablix to it's specifc data set.

    3. Drag and drop the fields in the corresponding tables.

    4. For the export after the 3rd table, 'place a page break after'.

    5. repeat step 4 for table 4,5, and 6. In this way the first 3 tables will be in one sheet and the rest four in different sheets.

    For more information on page break, please follow this link.

    For naming excel worksheet while exporting from SSRS, set the Initial Page name property in SSRS. 

    HTH,

    Ram


    Please vote as helpful or mark as answer, if it helps


    • Marked as answer by taz 91 Wednesday, June 6, 2018 10:20 AM
    • Edited by Ramakrishnan.lh Wednesday, June 6, 2018 10:24 AM
    Wednesday, June 6, 2018 10:16 AM

All replies

  • Hi Taz,

    Please find the detailed steps below. Assuming there are no charts involved and its just tabular reports:-

    1. Create 7 datasets pointing to the same shared datasource.

    2. Drag 7 tablix control and place them one below the other and map each tablix to it's specifc data set.

    3. Drag and drop the fields in the corresponding tables.

    4. For the export after the 3rd table, 'place a page break after'.

    5. repeat step 4 for table 4,5, and 6. In this way the first 3 tables will be in one sheet and the rest four in different sheets.

    For more information on page break, please follow this link.

    For naming excel worksheet while exporting from SSRS, set the Initial Page name property in SSRS. 

    HTH,

    Ram


    Please vote as helpful or mark as answer, if it helps


    • Marked as answer by taz 91 Wednesday, June 6, 2018 10:20 AM
    • Edited by Ramakrishnan.lh Wednesday, June 6, 2018 10:24 AM
    Wednesday, June 6, 2018 10:16 AM
  • That is an amazing explanation, I will start this process now. If i have any questions I will let you know in this thread.

    What will happen if there are charts involved? Will this change the process at all? My queries create tables but then I would like them to be presented via line and bar graphs underneath the tablix.

    Wednesday, June 6, 2018 10:21 AM
  • The only thing that will change is the page breaks. If you want the charts to be below the table then you need to add page break in the chart area and not in table area.

    Page breaks are the once that splits your data into multiple sheets. So you need to be careful as to where you are applying the page breaks.

    HTH,

    Ram


    Please vote as helpful or mark as answer, if it helps

    Wednesday, June 6, 2018 10:24 AM
  • Yes that makes sense, thank you @Ramakrishnan :)
    Wednesday, June 6, 2018 10:26 AM