CasewareDocs

Structure of .NET assembly

To build a Report Plug-in in SmartAnalyzer App SDK, you need to create an assembly which contains one class or more classes which implement Audicon.SmartAnalyzer.Common.Interfaces.IReport (assembly SA.Common.dll) and Audicon.SmartAnalyzer.Common.Interfaces.IExtension (assembly SA.Common.dll) interfaces.

These classes must also have the ReportAttribute applied. ReportAttribute is defined in Audicon.SmartAnalyzer.Common.Types namespace of assembly and has the following structure:

namespace Audicon.SmartAnalyzer.Common.Types

{

'Custom metadata attribute describing report extensions' capabilities. This attribute is conform with the contract

'Audicon.SmartAnalyzer.Common.Interfaces.IReportCapabilities

[MetadataAttribute]

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]

public class ReportAttribute: ExtensionAttribute

{

'Report extension's type

public ReportType ReportType { get; set; }

'The Limited To option means whether a report is limited for certain results.

'For instance we will have SoD reports which do not make sense for non-SoD results.

public string[] LimitedTo { get; set; }

'What is used to view the report.

public ReportTypeViewer Viewer { get; set; }

'Unique name of the report.

public string ReportId { get; set; }

'Order of the Plug-in in the list of all Plug-ins.

public int Sequence { get; set; }

*True if the report has an options dialog.

public bool HasOptionsDialog { get; set; }

}

}

For example the Audicon SoD report has the following definition:

namespace Audicon.SmartAnalyzer.Client.Reporting.SoDRisk

{

'SoDRiskReport Plug-in

[ReportAttribute(

ID = "B144CAE5-F5AF-46DF-9747-C1C7909B86E6",

NameResourceId = "Audicon.SmartAnalyzer.Client.Reporting.SoDRisk.Resources.Messages.IDS_SOD_REPORT",

ReportType = ReportType.Report,

LimitedTo = new string[] { SoDRiskReport.LimitedTo},

Viewer = ReportTypeViewer.TX,

ReportId = "SoDRiskReport",

Sequence = 11,

HasOptionsDialog = false,

ExtensionType = typeof(IReport)

)]

sealed public class SoDRiskReport : IReport, IExtension

{

}

}