I have some code that uses the activeX viewer to show crystal reports. When you try to refresh the report it asks for the sql db username and password of course. How can I code this with each asp page so it doesn't ask the user for it? Security isn't an issue here so I just want to make it as easy as possible for the users to view the reports. Hopefully this is something that can be done in the code. I'll include it here:
Crystal Reports Viewer
WIDTH=100% HEIGHT=100% CODEBASE="activexviewer.cab#Version=9,2,0,442" >
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>
<PARAM NAME="EnableSelectExpertButton" VALUE=1>
On Error Resume Next
Set webBroker = CreateObject("WebReportBroker9.WebReportBroker")
if err.number <> 0 then
window.alert "_LOC_The Crystal ActiveX Viewer is unable to create its resource objects_ENDLOC_."
Set webSource0 = CreateObject("WebReportSource9.WebReportSource")
webSource0.ReportSource = webBroker
webSource0.URL = "mistakes new detail2.rpt"
webSource0.PromptOnRefresh = True
CRViewer.ReportSource = webSource0
I've tried adding something like mistakes new detail2.rpt?init=activexl;username=blah blah
All that gave me was a blank window. Help!