I have a situation using ASP.NET that i need from the main routine send same value to subreport variable. Ex. variable Titulo as String = "each user session changes it". All code works fine, but i dont know to send this value in variable Titulo.
Main Code
Code: Select all
With Report
Dim Titulo as String = "each user session changes it"
.Load(pSessionUser.ServerPath + "../Reports/" + pWebFormSelected.Report + ".mrt")
.Dictionary.Databases.Clear()
.Dictionary.Databases.Add(New StiSqlDatabase("Connection", pConnReport))
.ReportName = pWebFormSelected.Report
If Not IsNothing(pDataSet) Then
pDataSet.Tables(0).TableName = "DataSet"
.Dictionary.DataSources.Clear()
.RegData("DataSet", pDataSet)
.Dictionary.Synchronize()
End If
.Compile()
AddHandler .GetSubReport, AddressOf rep_GetSubReport
.Render()
End With
Code: Select all
Private Sub rep_GetSubReport(ByVal sender As Object, ByVal e As StiGetSubReportEventArgs)
Dim Report As New StiReport()
With Report
.LoadFromUrl("D:\TituloPortrait.mrt")
.Compile()
'Titulo do Relatorio
Report("Titulo") = Variable Titulo that i sad above. '<---- here
End With
e.Report = Report
End Sub
Tnks for any help.