Class NSReportAgent

Run reports, set favorites, labels.

Examples

NSReportAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSReportAgent()

Run reports, set favorites, labels.

Declaration

NSReportAgent

Examples

NSReportAgent agent;
agent.callMethod(arg1, arg2);

Methods

CreateDefaultReportEntity()

Sets default values into a new NSReportEntity.

Declaration

NSReportEntity CreateDefaultReportEntity()

Examples

NSReportAgent agent;
NSReportEntity thing = agent.CreateDefaultReportEntity();
thing = agent.SaveReportEntity(thing);

Returns

Type Description
NSReportEntity

CreateDefaultReportLabelLayoutEntity()

Sets default values into a new NSReportLabelLayoutEntity.

Declaration

NSReportLabelLayoutEntity CreateDefaultReportLabelLayoutEntity()

Examples

NSReportAgent agent;
NSReportLabelLayoutEntity thing = agent.CreateDefaultReportLabelLayoutEntity();
thing = agent.SaveReportLabelLayoutEntity(thing);

Returns

Type Description
NSReportLabelLayoutEntity

CreateFavorite(Integer,String,String)

Creates the report as favorite.

Declaration

NSReportEntity CreateFavorite(Integer sourceId, String name, String description)

Examples

NSReportAgent agent;
Integer sourceId;
String name;
String description;
NSReportEntity res = agent.CreateFavorite(sourceId, name, description);

Parameters

Type Name Description
Integer sourceId The key to the report that the favorite is based on.
String name
String description

Returns

Type Description
NSReportEntity

DeleteFavorite(Integer)

Deletes the report favorite.

Declaration

Void DeleteFavorite(Integer reportEntityId)

Parameters

Type Name Description
Integer reportEntityId

Returns

Type Description
Void

DeleteReport(Integer)

Deletes the report with the given ID.

Declaration

Bool DeleteReport(Integer reportId)

Examples

NSReportAgent agent;
Integer reportId;
Bool res = agent.DeleteReport(reportId);

Parameters

Type Name Description
Integer reportId The ID of the report to delete.

Returns

Type Description
Bool

DeleteReportLabelLayoutEntity(Integer)

Deletes the NSReportLabelLayoutEntity

Declaration

DeleteReportLabelLayoutEntity(Integer reportLabelLayoutEntity)

Examples

NSReportAgent agent;
agent.DeleteReportLabelLayoutEntity(123);

Parameters

Type Name Description
Integer reportLabelLayoutEntity The identity of the ReportLabelLayoutEntity to delete.

Returns

Type Description
Void

GenerateReport(Integer,Integer,String,String,String,NSArchiveRestrictionInfo[])

Generates the report in PDF format.

Declaration

String GenerateReport(Integer reportId, Integer labelLayoutId, String filename, String language, String fileType, NSArchiveRestrictionInfo[] restrictions)

Examples

NSReportAgent agent;
Integer reportId;
Integer labelLayoutId;
String filename;
String language;
String fileType;
NSArchiveRestrictionInfo[] restrictions;
String res = agent.GenerateReport(reportId, labelLayoutId, filename, language, fileType, restrictions);

Parameters

Type Name Description
Integer reportId The ID of the report.
Integer labelLayoutId The ID of the label layout. Use 0 if the report isn't of type label.
String filename Filename of the report.
String language Language to use when generating the report.
String fileType
restrictions Use restrictions to provide additional restrictions when generating the report.

Returns

Type Description
String

GetReportEntity(Integer)

Gets an NSReportEntity object.

Declaration

NSReportEntity GetReportEntity(Integer reportEntityId)

Examples

NSReportAgent agent;
NSReportEntity thing = agent.GetReportEntity(123);

Parameters

Type Name Description
Integer reportEntityId The identifier of the NSReportEntity object.

Returns

Type Description
NSReportEntity

GetReportLabelLayoutEntity(Integer)

Gets an NSReportLabelLayoutEntity object.

Declaration

NSReportLabelLayoutEntity GetReportLabelLayoutEntity(Integer reportLabelLayoutEntityId)

Examples

NSReportAgent agent;
NSReportLabelLayoutEntity thing = agent.GetReportLabelLayoutEntity(123);

Parameters

Type Name Description
Integer reportLabelLayoutEntityId The identifier of the NSReportLabelLayoutEntity object.

Returns

Type Description
NSReportLabelLayoutEntity

ImportReport(String)

Takes the input stream and create a report. This stream must be on a valid XML format.

Declaration

Integer ImportReport(String report)

Examples

NSReportAgent agent;
String report;
Integer res = agent.ImportReport(report);

Parameters

Type Name Description
String report The report to import in a correct XML format.

Returns

Type Description
Integer

SaveReportEntity(NSReportEntity)

Updates the existing NSReportEntity or creates a new NSReportEntity if the id parameter is 0

Declaration

NSReportEntity SaveReportEntity(NSReportEntity reportEntity)

Examples

NSReport  agent;
NSReportEntity thing = agent.CreateDefaultReportEntity();
thing = agent.SaveReportEntity(thing);

Parameters

Type Name Description
NSReportEntity reportEntity The NSReportEntity to save.

Returns

Type Description
NSReportEntity

SaveReportLabelLayoutEntity(NSReportLabelLayoutEntity)

Updates the existing NSReportLabelLayoutEntity or creates a new NSReportLabelLayoutEntity if the ID parameter is 0.

Declaration

NSReportLabelLayoutEntity SaveReportLabelLayoutEntity(NSReportLabelLayoutEntity reportLabelLayoutEntity)

Examples

NSReport  agent;
NSReportLabelLayoutEntity thing = agent.CreateDefaultReportLabelLayoutEntity();
thing = agent.SaveReportLabelLayoutEntity(thing);

Parameters

Type Name Description
NSReportLabelLayoutEntity reportLabelLayoutEntity

Returns

Type Description
NSReportLabelLayoutEntity The new or updated NSReportLabelLayoutEntity.

UpdateFavorite(NSReportEntity)

Updates the favorite.

Declaration

NSReportEntity UpdateFavorite(NSReportEntity reportEntity)

Examples

NSReportAgent agent;
NSReportEntity reportEntity;
NSReportEntity res = agent.UpdateFavorite(reportEntity);

Parameters

Type Name Description
NSReportEntity reportEntity ReportEntity carrier containing updated data.

Returns

Type Description
NSReportEntity