Exago .NET API Documentation
LoadFromRepository(Guid,Boolean,String,Boolean) Method
Example 
WebReports.Api.Reports Namespace > ReportObjectFactory Class > LoadFromRepository Method : LoadFromRepository(Guid,Boolean,String,Boolean) Method
The content ID of the report to retrieve.
When True, the report will be checked for errors. Any errors, such as missing data objects will be available in the ValidationErrors Property of the returned ReportObject Class.

Optional user-defined data string to pass along with the report.

This feature is deprecated.
Whether or not to set the returned report as the active report. If not provided, will pass True by default.
Retrieve a report item from the Storage Management system with its content ID.
Syntax
public ReportObject LoadFromRepository( 
   System.Guid reportId,
   System.bool validate,
   System.string udfData,
   System.bool setActive
)

Parameters

reportId
The content ID of the report to retrieve.
validate
When True, the report will be checked for errors. Any errors, such as missing data objects will be available in the ValidationErrors Property of the returned ReportObject Class.
udfData

Optional user-defined data string to pass along with the report.

This feature is deprecated.
setActive
Whether or not to set the returned report as the active report. If not provided, will pass True by default.

Return Value

A ReportObject representing the requested report.
Exceptions
ExceptionDescription
An exception is thrown if the reportId is Guid.Empty; or if there was a problem opening/pasing the report's defintion (e.g. an invalid report defintion or one with XML errors)
System.InvalidCastException is thrown if attempting to cast the returned object to the wrong type (e.g. casting an ExpressView to a Report object)
Example
Directly load a report and apply changes if needed
if (reportName != null)
{
	Report ro = (Report)api.ReportObjectFactory.LoadFromRepository(api.ReportObjectFactory.GetReportId(reportName));
	ro.ExportType = wrExportType.Html;      	// Select Export Type for report execution (PDF is default for non-Dashboard reports
	api.ReportObjectFactory.SaveToApi(ro);  // Save Changes back to the api object
}
See Also

Reference

ReportObjectFactory Class
ReportObjectFactory Members
Overload List