Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 open report from vb6

Author  Topic 

spyr
Starting Member

2 Posts

Posted - 2004-10-22 : 07:00:02
Hi,
i would like to know if it's possible to launch a RS report from a VisualBasic application...
If it is possible, how can i do it?

Thanks in advance!
Bye

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-10-22 : 07:26:08
Since RS is based on URL access, you can use the Shell command in VB to start Internet Explorer and pass the URL of the report/server you want to open:

Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://myRSURL/")

That's probably the easiest way.
Go to Top of Page

spyr
Starting Member

2 Posts

Posted - 2004-10-22 : 08:21:41
Thank's so much.
But can I pass also some parameters to the report in this way?
For exemple can i do:
Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://myServer/reports/pages/myreport.aspx?myparam="+myparamvalue)
and then use the parameter myparam to generate the report?

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-10-22 : 08:25:17
Absolutely, just construct the entire command line in a string variable:

Dim cmd$
cmd="C:\Program Files\Internet Explorer\IEXPLORE.EXE http://myServer/reports/pages/myreport.aspx?myparam="
cmd=cmd & myparamvalue
Shell(cmd)
Go to Top of Page
   

- Advertisement -