Class ReportCriteriaHelper
A helper class for reports, favorite reports, temporary favorite reports and criteria.
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
[SoInject("Database")]
public class ReportCriteriaHelper
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(int, 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 |
---|---|---|
int | 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(int, 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 |
---|---|---|
int | originalId | |
ArchiveRestrictionInfo[] | additionalRestrictions |
Returns
Type | Description |
---|---|
SORPublishRow |
DeleteTemporarySelectionReport(int)
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 |
---|---|---|
int | tempPublishId | The report returned by CreateTemporarySelectionReport(int, ArchiveRestrictionInfo[]) |
GetAvailableCriteria(int, bool)
Gets the criteria for a given report id
Declaration
public List<CriteriaInfo> GetAvailableCriteria(int reportId, bool GetInUseOnly)
Parameters
Type | Name | Description |
---|---|---|
int | reportId | |
bool | 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(int)
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 |
---|---|---|
int | originalId | The id of the report from which the temporary favorite originates |
Returns
Type | Description |
---|---|
int | The id of the new or existant temporary favorite |
GetId(int)
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 |
---|---|---|
int | originalId | The report id from which the temporary favorite report originates |
Returns
Type | Description |
---|---|
int | 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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
IsTemporaryFavorite(int)
Determines if a report is a temporary favorite or not
Declaration
public bool IsTemporaryFavorite(int reportId)
Parameters
Type | Name | Description |
---|---|---|
int | reportId | The report id for the report in question |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
IsUdefField(string, out int)
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 |
int | id | UDeffield row primary key if this is a user-defined field |
Returns
Type | Description |
---|---|
bool | true if this is a user-defined field |