on the web form, the parameter holds, but on the reporting library, it does not. what am i dont wrong here?
CampRegistration.vb
Report.aspx.vb
CampRegistration.vb
Public Sub New()
InitializeComponent()
'Me.ReportParameters("campdateid").Value = 7 'default here
Me._campdateid = Me.ReportParameters("campdateid").Value
'Me.TextBox1.Value = Me.ReportParameters("campdateid").Value.ToString
Me.cdbll.connectionString = bo.Constants.ConnectionString
Me.rbll.connectionString = bo.Constants.ConnectionString
End Sub
Private _campdateid As Integer = 0
Private _contactlist As System.Data.DataTable = Nothing
Private cdbll As New dal.CampDate()
Private rbll As New dal.Registration
Private _registrations As DataTable = Nothing
'Private Sub SubReport1_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles SubReport1.NeedDataSource
' Dim subReportItem As Telerik.Reporting.Processing.SubReport = TryCast(sender, Telerik.Reporting.Processing.SubReport)
' subReportItem.InnerReport.DataSource = Me._contactlist
'End Sub
Private Sub CampRegistration_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.NeedDataSource
' Exit Sub
'---initial title of report
Dim cd As acmilan.bo.CampDate = cdbll.getCamp(Me._campdateid)
If cd IsNot Nothing Then
Me.TextBox1.Value = cd.name & " @ " & cd.city & ", " & cd.state
Me.TextBox3.Value = cd.start.ToLongDateString & " to " & cd.end.ToLongDateString
End If
Try
'---get registrations for campdate
Me._registrations = Me.rbll.getAllForCampDate(Me._campdateid)
TryCast(sender, Telerik.Reporting.Processing.Report).DataSource = Me._registrations
Catch ex As Exception
'Me.TextBox1.Value = ex.StackTrace & ex.Message
End Try
End Sub
Report.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim repReport As New thunder.apps.acmilan.reports.CampRegistration
Dim cdbll As New bll.CampDate(thunder.framework.dal.sql.DataAccess.rMethod.ObjectList)
Dim id As Integer = Convert.ToInt32(Request.QueryString("campdateid"))
Dim cd As bo.CampDate = cdbll.getCampdate(id)
If cd IsNot Nothing Then
Me.HyperLink1.NavigateUrl = "campprofile.aspx?campid=" & cd.campid.ToString
repReport.DocumentName = cd.name & "Camp_Registration_Report_" & id.ToString
repReport.ReportParameters("campdateid").Value = id
Me.ReportViewer1.Resources.ProcessingReportMessage = "Generating Camp Registration ID" & repReport.ReportParameters("campdateid").Value.ToString
Me.ReportViewer1.Report = repReport
Me.ReportViewer1.DataBind()
Me.ReportViewer1.RefreshReport()
Else
End If
End If
End Sub