Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_discuss thread: I need to filter the reports viewed on my web page


Message #1 by "Marisabel LEon" <marisabel_leon@y...> on Thu, 8 Aug 2002 16:37:45
I'm developing a Web Site that lets clients view a series of reports that 
are already created using Crystal Reports 8. 
Initially I was using them only through an application developed in VB 
6.0. Now I need to view then through the web. 
MY PROBLEM is I need to "filter" the reports to be viewed according to a 
selection on a combo box from previous form. By doing these I would be 
able to only see the reports related to this selection.

The code I currently manage is this:
------------------------------------------------------------------------
<%
	Dim URLline
	Dim SqlQry
%>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=JavaScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>VER REPORTE</TITLE>
</HEAD>
<BODY>

<P>
<OBJECT id=CRViewer align= Left valign= top style="LEFT: 0px; WIDTH: 
1105px; TOP: 0px; HEIGHT: 1200px" 
	classid="clsid:C4847596-972C-11D0-9567-00A0C9273C2A" 
	WIDTH=95% HEIGHT=75% VIEWASTEXT>
	
	<PARAM NAME="EnableGroupTree" VALUE=1>
	<PARAM NAME="DisplayGroupTree" VALUE=1>
	<PARAM NAME="EnableNavigationControls" VALUE="1">
	<PARAM NAME="EnablePrintButton" VALUE=1>
	<PARAM NAME="EnableRefreshButton" VALUE="0">
	<PARAM NAME="EnableDrillDown" VALUE=1>
	<PARAM NAME="EnableSearchControl" VALUE=1>
	<PARAM NAME="EnableAnimationControl" VALUE=1>
	<PARAM NAME="EnableZoomControl" VALUE=1>
	
</OBJECT>

<%	
	If Request.Form("ListaReportes")= "RDist" Then%>
	 
	<SCRIPT LANGUAGE="VBScript">	
	<!-- 
	URLline = "Reportes\Resumen de Distribucion.rpt?prompt0=" & time()
	-->
	</SCRIPT>
				
		
	<%	
		
	Else%>
	 
	<SCRIPT LANGUAGE="VBScript">	
	<!-- 
	window.alert ("Hubo un error. Vuelva a Intentar la seleccion")
	-->
	</SCRIPT>
		
	<%End If%>

<SCRIPT LANGUAGE="VBScript">
<!--
	On Error Resume Next
		Dim webBroker
			
	if ScriptEngineMajorVersion < 2 then
	window.alert "You need to update VB and/or IE"
	CRViewer.ReportName = Location.Href
	
        else
	Set webBroker = CreateObject("WebReportBroker.WebReportBroker")	
	Dim webSource
	Set webSource = CreateObject("WebReportSource.WebReportSource")
	webSource.ReportSource = webBroker
	webSource.URL = URLline
	webSource.PromptOnRefresh = False
	CRViewer.ReportSource = webSource
' HERE I'D NEED TO INSERT A SQL QUERY TO FILTER THE REPORTS		
		
	end if
	CRViewer.ViewReport
-->
</SCRIPT>

</BODY>
</HTML>

------------------------------------------------------------------------
PLEASE, I've been stuck on this for a WHILE now... any help will be TRULY 
appreaciated!
Thanks a lot

Marisabel

  Return to Index