April 29, 2009 at 1:00 pm
I am using SQL Server Reporting Service 2008. I want to call reporting service from my window application.
I am using Report Viewer control and can't use the same code to call reporting service for ASP.Net.
Anyone help me.
Thank you.
April 29, 2009 at 1:14 pm
Can you give us a clue as to any error messages you are seeing? What do you mean by "I am using Report Viewer control and can't use the same code to call reporting service for ASP.Net."?
Do you already use the Report Viewer Control in an ASP.net site and now you're trying to do it for a win forms app? I would imagine that your security is being handled differently in the 2 apps so that might be a place to start to look for problems...
-Luke.
April 29, 2009 at 8:45 pm
Hi Luke,
Thank you for your reply.
Yes, I already use the Report Viewer Control in an ASP.net.
The actually problem is:
When I configure as following in the design time
Chose Report = ServerReport
Report Server URL = http://localhost:8080/reportserver
Report Path = /AdventureWorks 2008 Sample Reports/Product Catalog 2008
It is working.
And then I write the code in the code behind. It is not working. My code behind is as follow:
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportServerUrl = new System.Uri("http://localhost:8080/reportserver");
reportViewer1.ServerReport.ReportPath = "/AdventureWorks 2008 Sample Reports/Product Catalog 2008";
reportViewer1.ServerReport.Refresh();
I can see only the blank screen. Please help me what I need to do to see the report in win form.
Thank you.
April 30, 2009 at 7:09 am
You're code looks ok. I created a winforms app to test it and it seems to work properly, but that is with .net 2005 and SSRS 05 instead of 08 like you are using. That leads me to think it may be some sort of security issue? Have you checked the Event logs on the Reporting Server? Are you doing any kind of error handling in your code which may keep you from seeing the actual error being displayed?
-Luke.
May 4, 2009 at 6:58 pm
Thanks for your reply.
Please let me know where is the Report Server event logs? I checked in window event logs but there is no error or warnning occur and I already added Exception error handing code in my program but there is no exception occur. Now I can see only the blank in Report Viewer.
Please let me know, what kind of security issue used to happen when we call the report from win form?
Now, I am running on WinXP Sp2, SQL Server Standard Edition 2008, Visual Studio 2008 sp1.
Report Server, Database and report calling code are in my local computer and I am the administror of my local machine.
Please try to find the solution for me.
Thank you.
May 5, 2009 at 8:20 am
Check to make certain you didn't change anything on the security side of the reporting services instance. How are you authenticating to SSRS? Are you passing a specific username/password?
For other log entries to check, you could check %windir%\system32\logfiles. Also you can check to see if your report is actually being run and just not brought back to your application by querying the ExecutionLog table of the ReportServer Database (as long as your are logging report execution that is).
Check the SQL Server logs.
-Luke.
May 5, 2009 at 9:01 am
Now, I found the solution.
I put Report Server URL and Report Path in Design time and also write the above code in code behind. Then the report can show the data. But in ASP.Net, I don't need to do like this. I only need to write in Code Behind.
I think, this is not the right solution.:unsure:
May 5, 2009 at 9:05 am
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply