Class ReportCriteriaHelper
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Inheritance
ReportCriteriaHelper
Assembly: SoDataBase.dll
Syntax
[SoInject("Database")]
public class ReportCriteriaHelper : Object
Constructors
ReportCriteriaHelper()
Creates rows for foreignapp and foreign device if they are not present.
This constructor also sets up the table info objects for the tables involved
Declaration
public ReportCriteriaHelper()
Fields
SaintStatusDelimiter
Declaration
public const char SaintStatusDelimiter = '_'
Field Value
Methods
CreateFavorite(Int32, String, String)
Creates a favorite report from a an existing report. You are able to change the name and description
of the report.
Declaration
public SORPublishRow CreateFavorite(int reportId, string name, string description)
Parameters
| Type |
Name |
Description |
| Int32 |
reportId |
The report id you want to create a favorite report from
|
| String |
name |
The new name for the favorite report. If the string is null or empty, the original name is used.
|
| String |
description |
The new description for the favorite report. If the string is null or empty, the original description is used.
|
Returns
CreateTemporarySelectionReport(Int32, ArchiveRestrictionInfo[])
Declaration
public SORPublishRow CreateTemporarySelectionReport(int originalId, ArchiveRestrictionInfo[] additionalRestrictions)
Parameters
Returns
DeleteTemporarySelectionReport(Int32)
Remove the temporary report from sorpublish, sortemplate and criteria. Remember to clean up after we are done using it.
Declaration
public void DeleteTemporarySelectionReport(int tempPublishId)
Parameters
GetAvailableCriteria(Int32, Boolean)
Gets the criteria for a given report id
Declaration
public List<CriteriaInfo> GetAvailableCriteria(int reportId, bool GetInUseOnly)
Parameters
| Type |
Name |
Description |
| Int32 |
reportId |
|
| Boolean |
GetInUseOnly |
This parameter lets you select if you want only the criteria that are in use or ALL available criteria
|
Returns
GetEditableId(Int32)
Gets the id of a temporary favorite report if one exists. If one does not exist, a new temporary favorite is created
Declaration
public int GetEditableId(int originalId)
Parameters
| Type |
Name |
Description |
| Int32 |
originalId |
The id of the report from which the temporary favorite originates
|
Returns
| Type |
Description |
| Int32 |
The id of the new or existant temporary favorite
|
GetId(Int32)
This get method will try to find a temporary favorite report and return it's id
Declaration
public int GetId(int originalId)
Parameters
| Type |
Name |
Description |
| Int32 |
originalId |
The report id from which the temporary favorite report originates
|
Returns
| Type |
Description |
| Int32 |
If found, the temporary report id is returned. If not, the original report id is returned
|
GetRealSaintKeyName(String)
Declaration
public string GetRealSaintKeyName(string reporterName)
Parameters
| Type |
Name |
Description |
| String |
reporterName |
|
Returns
GetReporterSaintKeyName(String)
Declaration
public string GetReporterSaintKeyName(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
IsSaintCounter(String)
Declaration
public bool IsSaintCounter(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
IsSaintCounter(String, out SaintCounterType)
Declaration
public bool IsSaintCounter(string name, out SaintCounterType type)
Parameters
Returns
IsSaintStatus(String)
Declaration
public bool IsSaintStatus(string fieldName)
Parameters
| Type |
Name |
Description |
| String |
fieldName |
|
Returns
IsSaintStatus(String, out SaintTarget)
This method checks to see if a field is actually a saint status monitor. It also
Declaration
public bool IsSaintStatus(string fieldName, out SaintTarget target)
Parameters
Returns
IsTemporaryFavorite(Int32)
Determines if a report is a temporary favorite or not
Declaration
public bool IsTemporaryFavorite(int reportId)
Parameters
| Type |
Name |
Description |
| Int32 |
reportId |
The report id for the report in question
|
Returns
IsUdefField(String)
Declaration
public bool IsUdefField(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
IsUdefField(String, out Int32)
Determine if a report field is a user-defined field; and if so, its definition ID
Declaration
public bool IsUdefField(string name, out int id)
Parameters
| Type |
Name |
Description |
| String |
name |
Field id
|
| Int32 |
id |
UDeffield row primary key if this is a user-defined field
|
Returns
| Type |
Description |
| Boolean |
true if this is a user-defined field
|
Extension Methods