Class ReportManager
ReportManager for creating, editing and deleting reports
Inheritance
Inherited Members
Namespace: Simplic.Reporting
Assembly: Simplic.Reporting.dll
Syntax
public class ReportManager
Fields
| Improve this Doc View SourcePRIVATE_REPORT_PREFIX
Prefex which will automatically placed in front of all private report names (reporitory). It is not allowed to create new reports which starts with the prefix in the name
Declaration
public const string PRIVATE_REPORT_PREFIX = "private."
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceSingleton
Singleton access for the ReportManager
Declaration
public static ReportManager Singleton { get; }
Property Value
Type | Description |
---|---|
ReportManager |
Methods
| Improve this Doc View SourceDeleteReport(Guid)
Delete report by it's unique id
Declaration
public void DeleteReport(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id of the report |
DeleteReport(String)
Delete report by it's unique name
Declaration
public void DeleteReport(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique name of the report |
GetConfiguration(Guid)
Get a report configuration by the report id without knowing any type
Declaration
public IReportConfiguration GetConfiguration(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id (Guid) of the report |
Returns
Type | Description |
---|---|
IReportConfiguration | Instance of report configuration. If the report does not exists, null will be returned |
GetConfiguration(String)
Get a report configuration by it's report name without knowing any type
Declaration
public IReportConfiguration GetConfiguration(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the report |
Returns
Type | Description |
---|---|
IReportConfiguration | Instance of report configuration. If the report does not exists, null will be returned |
GetConfiguration<T>(Guid)
Get configuration by the unique report id
Declaration
public T GetConfiguration<T>(Guid id)
where T : IReportConfiguration
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id of the report |
Returns
Type | Description |
---|---|
T | If found, instance of the specific report configuration |
Type Parameters
Name | Description |
---|---|
T | IReportConfiguration interface |
GetConfiguration<T>(String)
Get configuration by the unique report name
Declaration
public T GetConfiguration<T>(string name)
where T : IReportConfiguration
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique name of the report |
Returns
Type | Description |
---|---|
T | If found, instance of the specific report configuration |
Type Parameters
Name | Description |
---|---|
T | IReportConfiguration interface |
GetReport(IReportConfiguration)
Get new report by configuration moedl
Declaration
public IReport GetReport(IReportConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IReportConfiguration | configuration | Instance of a configuration model |
Returns
Type | Description |
---|---|
IReport |
GetReport(Guid)
Get an instance of a report by it's unique id
Declaration
public IReport GetReport(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id of the report |
Returns
Type | Description |
---|---|
IReport | If the report was found, an instance if a Report will be returned |
GetReport(String)
Get an instance of a report by the unique report name
Declaration
public IReport GetReport(string reportName)
Parameters
Type | Name | Description |
---|---|---|
System.String | reportName | Name of the report |
Returns
Type | Description |
---|---|
IReport | If the report was found, an instance of a Report will be returned |
GetReportConfiguration(Guid)
Gets the reportconfiguration by the report guid
Declaration
public IReportConfiguration GetReportConfiguration(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id |
Returns
Type | Description |
---|---|
IReportConfiguration |
GetReportConfiguration(String)
gets the reportconfiguration by report name
Declaration
public IReportConfiguration GetReportConfiguration(string reportName)
Parameters
Type | Name | Description |
---|---|---|
System.String | reportName |
Returns
Type | Description |
---|---|
IReportConfiguration |
GetReportFile(String)
Get the report binary by it's unique report name
Declaration
public byte[] GetReportFile(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique name of the report |
Returns
Type | Description |
---|---|
System.Byte[] | Report binaries (e.g. content of trdx) |
GetReportId(String)
Get the id of a report by the unique report name
Declaration
public Guid GetReportId(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique string(name) of the report |
Returns
Type | Description |
---|---|
System.Guid | Id of the report, if not found: Empty guid |
GetReportName(Guid)
Get the name of a report by the unique report id
Declaration
public string GetReportName(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique Guid(id) of the report |
Returns
Type | Description |
---|---|
System.String | Name of the report, if not found: null |
GetReportType(Guid)
Get the type of a report
Declaration
public ReportType GetReportType(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id of the report |
Returns
Type | Description |
---|---|
ReportType | Type of the report (Sql, KeyValue, ...) |
GetRpeortType(String)
Get the type of a report
Declaration
public ReportType GetRpeortType(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique name of the report |
Returns
Type | Description |
---|---|
ReportType | Type of the report (Sql, KeyValue, ...) |
Initialize(IReportConfigurationProvider)
Initialize the reporting system. Important things like configuration provider will be initialized
Declaration
public void Initialize(IReportConfigurationProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IReportConfigurationProvider | provider | Instance of a report provider |
ResolveConnectionString(String)
Resolve a conenction string
Declaration
public string ResolveConnectionString(string nameString)
Parameters
Type | Name | Description |
---|---|---|
System.String | nameString | Name or connection string |
Returns
Type | Description |
---|---|
System.String | Valid and complete connection string |
SaveConfiguration(IReportConfiguration)
Save configuration without knowing the report type. Report-Files will not be saved over this method! For this purpose please use SaveReportFile(String, Byte[])
Declaration
public void SaveConfiguration(IReportConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IReportConfiguration | configuration | Configuration model instance containing all report information |
SaveConfiguration<T>(T)
Save report configuration changes. Report-Files will not be saved over this method! For this purpose please use SaveReportFile(String, Byte[])
Declaration
public void SaveConfiguration<T>(T configuration)
where T : IReportConfiguration
Parameters
Type | Name | Description |
---|---|---|
T | configuration | Instance of the configuration model |
Type Parameters
Name | Description |
---|---|
T | IReportConfiguration interface |
SaveReportFile(String, Byte[])
Save the report binary by it's unique report name
Declaration
public void SaveReportFile(string name, byte[] report)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Unique name of the report |
System.Byte[] | report | Report binaries (e.g. content of trdx) |