Tuesday, February 14, 2012

Best way to launch report from a C# Winforms app?

I'm new to SSRS. I would like to launch a report from a C# desktop application, supplying parameters programatically. I was able to do this using System.Diagnostics.Process p ... then p.Start(@."(path)\iexplore.exe","(reportURL)"); I'm betting there's a much better way to do this.

Ideally I would like to create an IE window that shows only the report, that is, only the report viewer toolbar is visible, the IE toolbars and menus are hidden. I want to specify IE as the browser in case some other browser is installed as the default web browser.

Can anyone link me to a tutorial or provide a code snip? Thanks.Hi do not launch in IE. use ReportViewer Control to see that. You can add reports to your application by adding from Add Web Reference.|||Alas, it is at present still a .Net 1.1 application. I'll use ReportViewer when I upgrade it to .Net 2.0. In the meantime I'll launch IE to view the report. I tried to use SendKeys.Send to send F11 to get IE in fullscreen mode, but SetForegroundWindow did not work when given the Handle property of the process object returned by Process.Start.

Thanks for your response.

No comments:

Post a Comment