Last post Jul 14, 2010 12:53 PM by ghardy
Mar 29, 2010 09:01 AM|ghardy|LINK
I wrote a crystal web server using asp.net security. i have multibple reports in a few different directories, and i have a report viewer form in each secured directory. when i load a particlular report on one machine's web browser, if i go to
another machine and launch that report, the report instantly shows up with the parameters selected from the other machine. it's like after the report launches, the next request for that report just dishes out the previously built page.
I have not experienced this before, and makes my report site kinda useless. Can anyone help me figure out why these reports aren't treated as separate sessions?
*here is the markup for the frmReportViewer.aspx page:*
<form id="form1" runat="server">
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="true" BestFitPage="False" Width="1100" Height="680"
BorderStyle="Inset" PrintMode="ActiveX" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
*here is the vb code for the frmReportViewer.aspx page:*
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.CrystalReportViewer1.HasCrystalLogo = False
If Not IsPostBack Then
ReportName = Request.QueryString("reportname") & ".rpt"
Me.CrystalReportSource1.Report.FileName = ReportName
Public Function DBConnectionForReports(ByRef rpt As ReportDocument) As Boolean
Dim logonInfo As New TableLogOnInfo
'Dim table As System.Web.UI.WebControls.Table
Dim srptServer As String
Dim srptUN As String
Dim srptPass As String
Dim crConnInfo As New ConnectionInfo
Dim subRepDoc As New ReportDocument
Dim table As Table
For Each table In rpt.Database.Tables
srptServer = "calp"
srptUN = "cdiappsro"
srptPass = System.Configuration.ConfigurationManager.AppSettings.Item("OraclePassword").ToString
logonInfo = table.LogOnInfo
logonInfo.ConnectionInfo.ServerName = srptServer
logonInfo.ConnectionInfo.UserID = srptUN
logonInfo.ConnectionInfo.Password = srptPass
logonInfo.TableName = table.Name
Mar 30, 2010 10:46 AM|FileFoundException|LINK
I am not really very familiar with crystal report but when I saw crossing sessions, I thought
caching. Are you doing any caching?
Mar 30, 2010 12:08 PM|ghardy|LINK
that is my thought as well. persistent caching seems to be the problem.
so when asp.net runs a page, it has a compiled version in the .net temp files directory. i see a report in the temp directory with a name like salaryinfobyjob.rpt.compiled.
this says to me that when a page is requesting that report, it sees one all ready to go, and dishes out the one that is already compiled instead of handing out a fresh one.
so how would i turn this off?
Mar 30, 2010 12:13 PM|ghardy|LINK
Mar 31, 2010 10:36 AM|FileFoundException|LINK
That's one way to set instruct the client to no cache.
Do you have OutputCache set in your aspx?
For example, <%@ OutputCache NoStore="true" Duration="1" VaryByParam="*" %> has the same effect as the line of code you posted. But do you have configured differently?
Jul 14, 2010 12:53 PM|ghardy|LINK
my solution to this whole problem was to have a different page for each report. no more issues at all.