Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon through VBscript

Status
Not open for further replies.

KMU

Programmer
Jun 18, 2002
3
0
0
RU
Hi.
First of all, sorry for my English. I am from Russia. :)

I began used CR8 a few day ago. And now I have some problem.
The CRViewer have need to logon to the SQL database everyone, when I make a report. But I want do connect through VBscript. How can I do it?
What code shoild I write or change? Now I used this:
<SCRIPT LANGUAGE=&quot;VBScript&quot;>
<!--

Sub window_onLoad()
Page_Initialize()
End Sub

Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject(&quot;WebReportBroker.WebReportBroker&quot;)
if err.number <> 0 then
window.alert &quot;The Seagate Software ActiveX Viewer is unable to create it's resource objects. To rectify this problem, please install Internet Explorer 4.0 or install DCOM for Windows 95 and the latest Microsoft Scripting Engine. These files are available at Microsoft's web site.&quot;
CRViewer.ReportName = &quot; else
Dim webSource0
Set webSource0 = CreateObject(&quot;WebReportSource.WebReportSource&quot;)
webSource0.ReportSource = webBroker
webSource0.URL = &quot; webSource0.PromptOnRefresh = True
CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub

-->
</SCRIPT>

Thank to all.
Maxim.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top