none
SSRS table data RRS feed

  • Question

  • Hello

    Firstly thank you for taking the time to read my question.

    I am new to SSRS so forgive my simplistic approach / explanation.

    I have a report which calls a stored procedure which itself inserts into a seperate table the results from the stored procedure.  For example, my stored procedure will build a recordset and then insert the contents of that recordset into this table. 

    There are multiple select statements within the SP to filter the data correctly and as I understand it, SSRS will only work with the first SELECT statement it sees.

    How then could i ask, can i achieve the result? i.e. I need to build the table via a stored procedure and then that table would be the tablix source data.  If any clearer in VB.NET etc. I would run the stored procedure on the form open event or button click and then I would have access to the data etc. 

    How can I do this within SSRS, is there a way to fire the SP on open or other method? 

    Thank you for taking the time and I appreciate all feedback.


    Monday, September 16, 2019 6:05 PM

Answers

  • Hi Lukas

    Many thanks for your reply and ideas.  If of any help to anyone else what I did was to get the SSRS report to stage the way in which the datasets are loaded so that I could effectively present them in the order in which they should run, meaning that the stored procedure fired after the end user chose the relevant order number, fire SP, then the last dataset was built as a simple select * from table.

    Thank you for the ideas etc., very much appreciated :) 

    Friday, September 20, 2019 8:26 AM

All replies

  • Hi Topher,

    In this scenario, we have to say that in SSRS one call to one stored procedure can only return one dataset result. For you case.

    1. You could modify the stored procedure, adding parameter to it. Then make multiple calls to this procedure in multiple dataset queries, in each query use different parameter to get different dataset result.

    2. If you insist you require, you could try to make rdlc report, which allows you to write code on SSRS. You could take a look into this tutorial Beginner's guide for creating standalone .rdlc reports with ssrs.

    Hope these could help.

    Regards,

    Lukas


    MSDN Community Support Please remember to click Mark as Answer; the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 17, 2019 2:18 AM
  • Hi Lukas

    Many thanks for your reply and ideas.  If of any help to anyone else what I did was to get the SSRS report to stage the way in which the datasets are loaded so that I could effectively present them in the order in which they should run, meaning that the stored procedure fired after the end user chose the relevant order number, fire SP, then the last dataset was built as a simple select * from table.

    Thank you for the ideas etc., very much appreciated :) 

    Friday, September 20, 2019 8:26 AM
  • Hi Topher,

    Great that you have worked it out.

    You could marked these post as answer, it will help other people with similar issue to see it and find it more easily.

    Regards,

    Lukas


    MSDN Community Support Please remember to click Mark as Answer; the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 23, 2019 1:50 AM