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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Enterprise Security Issues

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I am calling viewreport.cwr from my asp page. I am able to view the source code of the viewreport.cwr by right clicking on the report output window, and see the user ID, password and all the selection criteria passed to the report. One of the main requirement from the users is, they want this report part to be more secured. Does anybody knows how to restrict the users from viewing the parameter information. I am herewith posting my source code.

Myreport.csp

<%@ Language=VBScript %>
<script language=Javascript>
function init()
{
var doc = window.opener.document.frmReportSearch ;
window.redirForm.id.value= doc.HidReport_ID.value;
window.redirForm.apstoken.value = doc.HidToken.value ;
window.redirForm.SF.value= doc.SF.value ;
window.redirForm.elements(&quot;user0&quot;).value= doc.HidDBUser.value ;
window.redirForm.elements(&quot;password0&quot;).value= doc.HidDBPassword.value;
window.redirForm.elements(&quot;promptex-TITLE&quot;).value = '&quot;' + doc.HidFacility_Name.value + ', ' + doc.HidPeriod.value ; doc.HidFooter6.value ;
document.forms[&quot;redirForm&quot;].submit();
}
</script>
<body onload=init()>
<Form form name=&quot;redirForm&quot; method=&quot;POST&quot; Action=&quot;viewrpt.cwr&quot;>
<Input Type=Hidden Name=&quot;user0&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;password0&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;id&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;apstoken&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;init&quot; Value=&quot;:connect&quot;>
<Input Type=Hidden Name=&quot;PromptOnRefresh&quot; Value=&quot;0&quot;>
<Input Type=Hidden Name=&quot;promptex-TITLE&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer1&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer2&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer3&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer4&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer5&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;promptex-Footer6&quot; Value=&quot;&quot;>
<Input Type=Hidden Name=&quot;SF&quot; Value=&quot;&quot;>
</Form>
</body>


Here is the source I found from the Viewreport.cwr by right clicking on the viewer window.


<html>
<head>
<TITLE>Crystal Report Viewer</TITLE>
</head>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
</SCRIPT>
<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript topmargin=0 leftmargin=0>

<OBJECT ID=&quot;CRViewer&quot;
CLASSID=&quot;CLSID:C4847596-972C-11D0-9567-00A0C9273C2A&quot;
WIDTH=100% HEIGHT=99%
CODEBASE=&quot;/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217&quot;>
<PARAM NAME=&quot;EnableDrillDown&quot; VALUE=1>
<PARAM NAME=&quot;EnableExportButton&quot; VALUE=1>
<PARAM NAME=&quot;DisplayGroupTree&quot; VALUE=0>
<PARAM NAME=&quot;EnableGroupTree&quot; VALUE=0>
<PARAM NAME=&quot;EnableAnimationControl&quot; VALUE=1>
<PARAM NAME=&quot;EnablePrintButton&quot; VALUE=1>
<PARAM NAME=&quot;EnableRefreshButton&quot; VALUE=1>
<PARAM NAME=&quot;EnableSearchControl&quot; VALUE=1>
<PARAM NAME=&quot;EnableZoomControl&quot; VALUE=1>
<PARAM NAME=&quot;EnableSearchExpertButton&quot; VALUE=0>
<PARAM NAME=&quot;EnableSelectExpertButton&quot; VALUE=0>
</OBJECT>


<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 Crystal ActiveX Viewer is unable to create it's resource objects.&quot;
CRViewer.ReportName = &quot;/myweb/Reports/viewrpt.cwr?id=528&quot;
else
Dim webSource0
Set webSource0 = CreateObject(&quot;WebReportSource.WebReportSource&quot;)
webSource0.ReportSource = webBroker
webSource0.URL = &quot;/tracitdc/Reports/viewrpt.cwr?id=528&quot;
webSource0.PromptOnRefresh = False
webSource0.AddParameter &quot;password0&quot;, &quot;test&quot;
webSource0.AddParameter &quot;promptex-Footer1&quot;, &quot;&quot;&quot;Date Range: Jan 01 2000 - Dec 31 2000&quot;&quot;&quot;
webSource0.AddParameter &quot;promptex-Footer2&quot;, &quot;&quot;&quot;Age Range: All Age&quot;&quot;&quot;
webSource0.AddParameter &quot;promptex-Footer4&quot;, &quot;&quot;&quot;Sex: Both Sexes&quot;&quot;&quot;
webSource0.AddParameter &quot;promptex-Footer5&quot;, &quot;&quot;&quot;Race: All Races&quot;&quot;&quot;
webSource0.AddParameter &quot;promptex-Footer6&quot;, &quot;&quot;&quot;Month: All Months&quot;&quot;&quot;
webSource0.AddParameter &quot;promptex-TITLE&quot;, &quot;&quot;&quot;TITLE, Jan 01 2000 - Dec 31 2000&quot;&quot;&quot;
webSource0.AddParameter &quot;user0&quot;, &quot;test&quot;
webSource0.AddParameter &quot;sf&quot;, &quot;{TABLE.FIELD1}=1780735 AND {TABLE.BEGIN_DATE}>=Date('01/01/2000') AND {TABLE.END_DATE}<=Date('12/31/2000')&quot;

CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub

-->
</SCRIPT>
<OBJECT ID=&quot;ReportSource&quot;
CLASSID=&quot;CLSID:F2CA2115-C8D2-11D1-BEBD-00A0C95A6A5C&quot;
HEIGHT=1% WIDTH=1%
CODEBASE=&quot;/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217&quot;>
</OBJECT>
<OBJECT ID=&quot;ViewHelp&quot;
CLASSID=&quot;CLSID:BD10A9C1-07CC-11D2-BEFF-00A0C95A6A5C&quot;
HEIGHT=1% WIDTH=1%
CODEBASE=&quot;/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217&quot;>
</OBJECT>
<OBJECT ID=&quot;ReportParameter&quot;
CLASSID=&quot;CLSID:71C140F3-1A84-430b-9035-68815582DC79&quot;
HEIGHT=1% WIDTH=1%
CODEBASE=&quot;/viewer/activeXViewer/reportparameterdialog.cab#Version=8,0,2,672&quot;>
</OBJECT>
<div>
<!-- this empty div prevents IE from showing a bunch of empty space for the controls above.. I don't know why though. -->
</div>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top