Auto Execute SSRS 2008 reports
I was hoping not to have to modify the ASPX page. When a report has no parameters it auto executes, you dont have to click on View report. If I have to modify the page, I would rather use code to auto execute. My users will complain about an extra enter as much as an extra click :) Thanks for your response, Joe
July 1st, 2011 9:05am

Hi all, I was wondering if there was a way to have a report start as soon as all parameters are entered. A good example is a monthly report where I default the date to Today(), and the user enters a location number, after they enter the location, I would like to have the report run. Is that possible? I go to meetings where people run reports to discuss issues, and everytime without fail the driver will enter the location number and wait for something to happen, then they realize they have to hit View Report. TIA, Joe
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2011 10:19am

Hi Jaylou, There is no build-in feature to support this requirement in reporting services, to work around the issue, we can press the Enter key on keyboard instead of clicking the “View report” button to view the report, steps are below: 1. Open the “Report.aspx” using notepad. By default, the file located at: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ ReportManager\Pages 2. At the end of the file, embed the following code. <script language = "Javascript"> function GetViewReportBtn() { dueTime += 50; if(dueTime > 30000) { clearTimeout(timer); return; } var obj=document.getElementsByTagName("INPUT"); for(var i=0;i<obj.length;i++) { if (obj[i].type=="submit" && obj[i].value=="View Report") { clearTimeout(timer); return obj[i]; } } timer=setTimeout(GetViewReportBtn,50); } var dueTime=0 var timer; timer=setTimeout(GetViewReportBtn,50); function document.onkeydown() { var e=event.srcElement; if(event.keyCode==13) { var btnViewReport; btnViewReport=GetViewReportBtn(); if(btnViewReport) btnViewReport.click(); } } </script> 3. Save the file. 4. Open the “ReportViewer.aspx” using notepad. By default, the file is located at: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\Pages 5. At the end of the file, embed the sample code we have used in step2. 6. Save the file. Now, you can view the report by keying Enter rather than click the view report button. Thanks, Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
July 2nd, 2011 2:30am

Hi Jaylou, We can give a default value to parameter, then when we open the report, the report will execute directly without clicking the view report button, if you select the parameter's value once again, you have to click the view report button to show report's content, this behavior is by design. However here I still would recommend you to submit a feedback to Microsoft Connect at this link at this link https://connect.microsoft.com/SQLServer/Feedback This connect site is a connection point between you and Microsoft. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature in the following release after official confirmation. Regards, Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2011 1:57am

Thanks for the link I will make a suggestion and see what comes in future releases. I do default all my drill downs, but the main report is the issue, I will need to create a reporting page and have 50 links to 50 reports. Thansk, Joe
July 7th, 2011 8:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics