Visual Basic (Declaration) | |
---|---|
Public Property ResourceLocator As ResourceLocator |
C# | |
---|---|
public ResourceLocator ResourceLocator {get; set;} |
Resolve a ReportDefinition for a subreport referenced in an RDLX file by using the resolver returned by this property. In the case of a subreport, the RDLX Subreport element's ReportName value is used as the resource identifier. For example, the code below demonstrates how to use the ResourceResolver property to specify a ReportDefinition for a subreport with the value "vendorssub.rdlx" for its ReportName element.
VB.NET | Copy Code |
---|---|
Private Sub ShowReport() Dim reportData As Stream = [GetType]().Assembly.GetManifestResourceStream("GrapeCity.ActiveReports.Samples.CustomResourceLocator.DemoReport.rdlx") reportData.Position = 0 Dim reader As New StreamReader(reportData) Dim def As New PageReport(reader) def.ResourceLocator = New MyPicturesLocator() Dim runtime As New PageDocument(def) runtime.Parameters("PictureName").CurrentValue = listView.SelectedItems(0).Text runtime.Parameters("MimeType").CurrentValue = String.Format("image/{0}", listView.SelectedItems(0).Tag) End Sub |
C# | Copy Code |
---|---|
private void ShowReport() { Stream reportData = GetType().Assembly.GetManifestResourceStream( "GrapeCity.ActiveReports.Samples.CustomResourceLocator.DemoReport.rdlx"); reportData.Position = 0; StreamReader reader = new StreamReader(reportData); PageReport def = new PageReport(reader); def.ResourceLocator = new MyPicturesLocator(); PageDocument runtime = new PageDocument(def); runtime.Parameters["PictureName"].CurrentValue = listView.SelectedItems[0].Text; runtime.Parameters["MimeType"].CurrentValue = string.Format("image/{0}", listView.SelectedItems[0].Tag); } |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2