public wrApiAction Action {get; set;}
The startup action for the Web Application to take when accessed via the GetUrlParamString Method. It may indicate to execute a report or open Exago directly in to the Report Designer or Report Wizard. The main menu in the user interface is disabled for all wrApiActions except Home.
public wrApiAction Action {get; set;}
Exception | Description |
---|---|
System.Exception | System.Exception will be thrown if attempting to perform an action that requires a report, but there is no active report. (For example, if api.Action is wrApiAction.EditReport but there is no currently loaded active report) |
using WebReports.Api; public class Example { string appPath = "http://localhost/exago/"; string configFn = "WebReports.xml"; string reportName = "Development Operations\\Failed Builds\\Fail Reasons"; public static void Main() { // Instantiate the Api object and set the action Api api = new Api(appPath, "WebReports.xml") { Action = wrApiAction.ExecuteReport, }; // Load a report for execution api.ReportObjectFactory.SaveToApi(api.ReportObjectFactory.LoadFromRepository(api.ReportObjectFactory.GetReportId(reportName))); // Redirect the browser to the UrlParamString Frame.Redirect(appPath + api.GetUrlParamString(homePage)); } }