Skip to Content
Former Member
Dec 11, 2008 at 06:58 PM

drilldown parameters not changing..


I have a report with drilldown in the detail.

When I initially select the parameters the report displays and the drill down works.

If I change a parameter and re-run the report, the drill down still shows the previous parameter selection.

What would be cuasing this?

Here is my code... using vs2008

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

Partial Public Class CRStatusExceptions

Inherits System.Web.UI.Page

Dim oTable As CrystalDecisions.CrystalReports.Engine.Table

Dim oLogon As CrystalDecisions.Shared.TableLogOnInfo

Dim oDB As CrystalDecisions.CrystalReports.Engine.Database

Dim oConnInfo As CrystalDecisions.Shared.ConnectionInfo

Dim rptdoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument

Private Sub CRStatusExceptions_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

WebDateEnd.Value = Now()

WebDateStart.Value = DateAdd(DateInterval.Day, -7, Now())


CRV1.Visible = True

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

End If

End Sub

Private Sub bindreport()

Dim sReportName As String = Nothing

'Get report and write it out to the stream...

sReportName = GetReport(SCLSession.SearchString)


oConnInfo = New CrystalDecisions.Shared.ConnectionInfo()

oConnInfo.DatabaseName = My.Settings.crDB

oConnInfo.ServerName = My.Settings.crDBS

oConnInfo.UserID = My.Settings.crUID

oConnInfo.Password = My.Settings.crPW

For Each Me.oTable In rptdoc.Database.Tables

oLogon = oTable.LogOnInfo

oLogon.ConnectionInfo = oConnInfo



rptdoc.SetParameterValue("profileid", SCLSession.ProfileID)

rptdoc.SetParameterValue("startDate", WebDateStart.Value)

rptdoc.SetParameterValue("endDate", WebDateEnd.Value)

rptdoc.SetParameterValue("FirstStatus", DropDownList1.SelectedValue.ToString)

rptdoc.SetParameterValue("SecondExceptionStatus", IIf(txtStatus2.Text.Length = 0, "", txtStatus2.Text.ToString))

rptdoc.SetParameterValue("ThirdExceptionStatus", IIf(txtStatus3.Text.Length = 0, "", txtStatus3.Text.ToString))

Me.CRV1.ReportSource = rptdoc


End Sub

Private Function GetReport(ByVal sReportName As String) As String

Dim websvc As New SCLIntraWebService.SCLIntraService

Dim b As Byte()

Dim oFilestream As System.IO.FileStream

If System.IO.File.Exists(Server.MapPath(SCLSession.UserName & "tempReport.rpt")) = True Then

System.IO.File.Delete(Server.MapPath(SCLSession.UserName & "tempReport.rpt"))

End If

b = websvc.GetReportbyName(sReportName)

oFilestream = New System.IO.FileStream(Server.MapPath(SCLSession.UserName & "tempReport.rpt"), System.IO.FileMode.Create, IO.FileAccess.Write)

oFilestream.Write(b, 0, b.Length)


Return Server.MapPath(SCLSession.UserName & "tempReport.rpt")

End Function

Protected Sub btnItemSearch_Click(ByVal sender As Object, ByVal e As Infragistics.WebUI.WebDataInput.ButtonEventArgs) Handles btnItemSearch.Click


CRV1.Visible = True

End Sub

Private Sub CRStatusExceptions_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload


End Sub

End Class