Class ProjectReportsOperations
Use this class to manage the project reports operations
Inheritance
Inherited Members
Namespace: Sdl.ProjectAutomation.FileBased.Reports.Operations
Assembly: Sdl.ProjectAutomation.FileBased.dll
Syntax
public class ProjectReportsOperations
Constructors
ProjectReportsOperations(FileBasedProject)
Declaration
public ProjectReportsOperations(FileBasedProject fileBasedProject)
Parameters
| Type | Name | Description |
|---|---|---|
| FileBasedProject | fileBasedProject |
Methods
AddReport(String, String, String, String, String)
Add a report based on Studio report templates
Declaration
public Report AddReport(string templateId, string name, string description, string languageAbbreviation, string data)
Parameters
| Type | Name | Description |
|---|---|---|
| String | templateId | Report template Id |
| String | name | Report name |
| String | description | Report description |
| String | languageAbbreviation | ISO abbreviation for the report language |
| String | data | Report html data |
Returns
| Type | Description |
|---|---|
| Report | The newly generated report |
GetProjectReports()
Returns the project reports list
Declaration
public List<Report> GetProjectReports()
Returns
| Type | Description |
|---|---|
| List<Report> | List of reports |
GetReportDefinition(String)
Returns the report definition
Declaration
public ReportDefinition GetReportDefinition(string taskTemplateId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | taskTemplateId | Task template Id |
Returns
| Type | Description |
|---|---|
| ReportDefinition | The report definition |
GetReportRendering(Guid, String)
Returns the report rendering
Declaration
public byte[] GetReportRendering(Guid reportId, string fileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | reportId | Report Id |
| String | fileExtension | Report file extension |
Returns
| Type | Description |
|---|---|
| Byte[] | The report content in the specified format |
GetReportRendering(Guid, String, String)
Returns the report rendering based on custom report template
Declaration
public byte[] GetReportRendering(Guid reportId, string customTemplate, string fileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | reportId | Report Id |
| String | customTemplate | Custom report template |
| String | fileExtension | Report file extension |
Returns
| Type | Description |
|---|---|
| Byte[] | The report content in the specified format |
GetReportRenderingSupportedFileFormats(Guid)
Returns the list of supported file extensions by the report rendering engine
Declaration
public List<string> GetReportRenderingSupportedFileFormats(Guid reportId)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | reportId | Report Id |
Returns
| Type | Description |
|---|---|
| List<String> | The list with supported file extensions |
RemoveReports(List<Guid>)
Remove a set of reports
Declaration
public void RemoveReports(List<Guid> reportIds)
Parameters
| Type | Name | Description |
|---|---|---|
| List<Guid> | reportIds | List of report Ids |
UpdateReport(Guid, String, String, String)
Update a report
Declaration
public void UpdateReport(Guid reportId, string name, string description, string data)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | reportId | Report Id |
| String | name | Report name |
| String | description | Report description |
| String | data | Report html data |