I'm sure this is just my understanding but it's driving me crazy. I've reviewed all the documents I can find on page life, etc. but this is what I'm trying to do.
-Passing a value to the report via my website (working with a public property on the report).
-Based upon that passed value, set a string that renders to the header and footer (textbox).
I've tried doing this by:
Partial Public Class CustomerInvoice
Inherits Report
Public strCompanyName As String
...
but this doesn't work because of the lifecycle of the report (from what I've read it renders the header and footer after everything as a new report so that value is cleared/nothing)
So I tried ReportParameters to save the value (the OrderID is the one being passed and works):
Public WriteOnly Property OrderID() As Integer
Set(ByVal value As Integer)
Me.ReportParameters("CompanyName").Value = value
End Set
End Property
Private Sub tbxPayableTo_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbxPayableTo.ItemDataBound
Dim strCompanyName As String = Me.ReportParameters("CompanyName").Value
Dim tbxPayableTo As Telerik.Reporting.Processing.TextBox = DirectCast(sender, Telerik.Reporting.Processing.TextBox)
tbxPayableTo.Value = "Make all checks payable to " & strCompanyName
End Sub
But the value is blank.
So the question is, how can I save a value to make sure it's available over the life of the report to render in the header/footer? I have read other topics and examples and I must be missing something.
A quick example would be great.
Thanks.
-Passing a value to the report via my website (working with a public property on the report).
-Based upon that passed value, set a string that renders to the header and footer (textbox).
I've tried doing this by:
Partial Public Class CustomerInvoice
Inherits Report
Public strCompanyName As String
...
but this doesn't work because of the lifecycle of the report (from what I've read it renders the header and footer after everything as a new report so that value is cleared/nothing)
So I tried ReportParameters to save the value (the OrderID is the one being passed and works):
Public WriteOnly Property OrderID() As Integer
Set(ByVal value As Integer)
Me.ReportParameters("CompanyName").Value = value
End Set
End Property
Private Sub tbxPayableTo_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbxPayableTo.ItemDataBound
Dim strCompanyName As String = Me.ReportParameters("CompanyName").Value
Dim tbxPayableTo As Telerik.Reporting.Processing.TextBox = DirectCast(sender, Telerik.Reporting.Processing.TextBox)
tbxPayableTo.Value = "Make all checks payable to " & strCompanyName
End Sub
But the value is blank.
So the question is, how can I save a value to make sure it's available over the life of the report to render in the header/footer? I have read other topics and examples and I must be missing something.
A quick example would be great.
Thanks.