Print Search Rate
    
   09-07-2005, 3:14 PM
HOWTO: Create a Public Property on a Report Class
Attachment: PassValue.zip

When you need to pass properties to a report, you can do so using Visual Basic's Property structure:

  
Dim m_someProperty As String
Public Property Let SomeProperty(myString As String)
Let m_someProperty = myString
End Property

The property can then be accessed by the calling code:

  
Private Sub Form_Load()
Dim rpt As New rptPublicProperty
rpt.SomeProperty = "This is the value that has been passed in from frmStartup"
rpt.Run
Me.ARViewer21.ReportSource = rpt
End Sub

This allows you to pass strings and other values in for use inside your report.

Note: You must have build 1253 or later in order to run the attached sample.



Applies To:
ActiveReports 2.0
GrapeCity » Knowledge Base » KnowledgeBase f... » HOWTO: Create a Public Property on a Report Class
Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.