Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Auto-Refresh Report with new parameter each time Expand / Collapse
Author
Message
Posted Saturday, February 22, 2014 9:26 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 25, 2014 5:10 AM
Points: 25, Visits: 56
Hi,

I have a requirement , wherein , the report shows different values , based upon the parameters selected . Now there are 6 parameters.

Is it possible to refresh the report ,periodically , so that is automatically takes the parameters one by one and displays the corresponding data on the Report for 10 seconds , for each parameter . I am usin VS 2008 (SQL 2008 R2)

This is basically going to be like a moving display . How can we acheive this

Please help
Post #1544275
Posted Sunday, February 23, 2014 5:05 PM This worked for the OP Answer marked as solution


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 5:49 PM
Points: 1,787, Visits: 5,722
Not entirely clear what you want, but it sounds like you want to get the stored procedure you are calling to handle this rather than using parameters in the report...

e.g.

create proc GetMyDataController
as
declare @RunNumber int;

-- get and update the run number - which is just an incrementing value

update RuntimeStore
set @RunNumber = 1 + ( RunNumber % 6 )
, RunNumber = RunNumber + 1
where ReportName = 'MyReport';

-- get your data based on your RunNumber

exec GetMyData @RunNumber;



MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1544328
    Posted Monday, February 24, 2014 3:12 AM
    SSC Rookie

    SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

    Group: General Forum Members
    Last Login: Tuesday, March 25, 2014 5:10 AM
    Points: 25, Visits: 56
    Thanks for the procedure.

    My basic need is that the Report , has to automatically get updated with different rows every 10 seconds.

    Say suppose , I have set my Report to Auto-Refresh option every 10 seconds. In that case, will this stored procedure return a value exactly incremented by 1 each time , the auto-refresh happens . That is ...

    1st time , this procedure is invoked from the Report via Auto-Refresh it should return 1
    2nd time the same procedure is invoked from the Report via Auto-Refresh, it should return 2
    3rd time the same procedure is invoked from the Report via Auto-Refresh, it should return 3
    4th time the same procedure is invoked from the Report via Auto-Refresh, it should return 4

    Finally the 5th time ,the same procedure is invoked from the Report via Auto-Refresh , it should return 1

    So across each postback from the Report , is there a mechanism which will make the SQL Server remember the value it returned from the stored procedure , the previous time , so that it can get incremented by 1 , on every new call.
    Post #1544396
    Posted Monday, February 24, 2014 4:01 AM


    SSCommitted

    SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

    Group: General Forum Members
    Last Login: Yesterday @ 5:49 PM
    Points: 1,787, Visits: 5,722
    That example uses a table called runtimestore to keep track of which number/variant of data you require. You could use any table on the server for this.

    MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1544416
    Posted Monday, February 24, 2014 7:04 AM This worked for the OP Answer marked as solution
    SSC Rookie

    SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

    Group: General Forum Members
    Last Login: Tuesday, March 25, 2014 5:10 AM
    Points: 25, Visits: 56
    Thanks,

    I wrote a stored procedure which always returns next row from the table and the proc does not take any parameters. So I think, if I call the stored procedure during Auto-Refresh, it should return different vales each time. I will give this a try.
    Post #1544485
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse