Class ReportCriteriaHelper
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Namespace: SuperOffice.CRM.ArchiveLists
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
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public const char SaintStatusDelimiter = '_'
Field Value
| Type | Description |
|---|---|
| Char |
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
| Type | Description |
|---|---|
| SORPublishRow | A SORPublishRow object that is the new favorite report |
CreateTemporarySelectionReport(Int32, ArchiveRestrictionInfo[])
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public SORPublishRow CreateTemporarySelectionReport(int originalId, ArchiveRestrictionInfo[] additionalRestrictions)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | originalId | |
| ArchiveRestrictionInfo[] | additionalRestrictions |
Returns
| Type | Description |
|---|---|
| SORPublishRow |
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
| Type | Name | Description |
|---|---|---|
| Int32 | tempPublishId | The report returned by CreateTemporarySelectionReport(Int32, ArchiveRestrictionInfo[]) |
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
| Type | Description |
|---|---|
| List<CriteriaInfo> | A list of criteria |
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)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public string GetRealSaintKeyName(string reporterName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | reporterName |
Returns
| Type | Description |
|---|---|
| String |
GetReporterSaintKeyName(String)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public string GetReporterSaintKeyName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Returns
| Type | Description |
|---|---|
| String |
IsSaintCounter(String)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public bool IsSaintCounter(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Returns
| Type | Description |
|---|---|
| Boolean |
IsSaintCounter(String, out SaintCounterType)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public bool IsSaintCounter(string name, out SaintCounterType type)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | |
| SaintCounterType | type |
Returns
| Type | Description |
|---|---|
| Boolean |
IsSaintStatus(String)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public bool IsSaintStatus(string fieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fieldName |
Returns
| Type | Description |
|---|---|
| Boolean |
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
| Type | Name | Description |
|---|---|---|
| String | fieldName | |
| SaintTarget | target |
Returns
| Type | Description |
|---|---|
| Boolean |
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
| Type | Description |
|---|---|
| Boolean |
IsUdefField(String)
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Declaration
public bool IsUdefField(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Returns
| Type | Description |
|---|---|
| Boolean |
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 |