MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports Namespace / SectionReport Class / UserData Property
Example

UserData Property

Sets or returns a user-defined value.

Syntax
'Declaration
 
Public Property UserData As Object
 

Property Value

A System.Object value that refers to user string data.
Remarks

Values specified in this property are saved and loaded as part of the report layout.  You can use this property to store information beyond what the report properties offer, much like the Tag property in Visual Basic. This property is only persisted as a string if the RPX is saved or loaded to file.

Example
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
sectionReport.Document.Printer.PrinterName = String.Empty;
sectionReport.CompatibilityMode = GrapeCity.ActiveReports.Document.CompatibilityModes.CrossPlatform;
var ctl = new GrapeCity.ActiveReports.SectionReportModel.TextBox{Name = "text1"};
sectionReport.Sections.Add(new GrapeCity.ActiveReports.SectionReportModel.Detail{Name = "Details"});
sectionReport.Sections[0].Controls.Add(ctl);
sectionReport.ScriptLanguage = "C#";
sectionReport.Script = @"public void Detail_Format(){text1.Text = (string)rpt.UserData;}";
sectionReport.UserData = "Hello World!";
See Also