Click or drag to resize

ReportModel Class

A ReportModel defines how to generate the Result Set (Data Table) and Series from the database.
Inheritance Hierarchy
SystemObject
  Seal.ModelRootEditor
    Seal.ModelRootComponent
      Seal.ModelReportComponent
        Seal.ModelReportModel

Namespace: Seal.Model
Assembly: SealLibrary (in SealLibrary.dll) Version: 8.0.0.0+c5a14bc14715399f60fcf611201a5e8ad953fbc3
Syntax
C#
public class ReportModel : ReportComponent

The ReportModel type exposes the following members.

Constructors
 NameDescription
Public methodReportModelInitializes a new instance of the ReportModel class
Top
Properties
 NameDescription
Public propertyAggregateRestriction The aggregate restriction text of the model
Public propertyAggregateRestrictions List of aggregate restrictions of the model
Public propertyAlias Alias name used for the table defining the select
Public propertyAllExecutionRestrictions List of all restrictions of the model (including aggregate and common restrictions)
Public propertyBuildTimeout Timeout in milliseconds to set the maximum duration used to build the SQL (may be used if many joins are defined)
Public propertyCommandTimeout "Default Timeout in seconds for the SQL Statements executed to load the model. -1 means the use of the Timeout defined in the connection. 0 means no Timeout.
Public propertyCommonRestrictions List of common restrictions and values involved in the model. Common Restrictions or Values are defined in the SQL (Pre, Post, Table SQL, Where Clause, etc.) with the '{CommonRestriction_' or '{CommonValue_' keywords (e.g. {CommonRestriction_Amount} to create a common restriction named 'Amount')
Public propertyConnection The current MetaConnection of the model
Public propertyConnectionGUID The connection used to build the model
Public propertyElements Elements selected for the model
Public propertyExecutionAggregateRestrictions List of aggregate restrictions of the model
Public propertyExecutionCommonRestrictions List of Common Restrictions of the model
Public propertyExecutionRestrictions List of restrictions of the model
Public propertyExecutionSet During the models generation, the models of the same Set Number are generated in parallel at the same time. The models with Set 1 are executed first at the same time, then models with Set 2, etc. This can be used if models depends on other models.
Public propertyFinalScript Optional Razor Script to modify the model after its generation
Public propertyFromTables List of tables involved in the model
Public propertyGUID The unique identifier
(Inherited from RootComponent)
Public propertyHasCellScript True if the model has cell script defined for one of its element
Public propertyHasChartJSSerie True if the model has a Chart JS serie
Public propertyHasEmptyRepeated True if the model has elements with EmptyRepeated
Public propertyHasNVD3Serie True if the model has a NVD3 serie
Public propertyHasPlotlySerie True if the model has a Plotly serie
Public propertyHasPrimaryYAxis True if the model has a primary axis for a serie
Public propertyHasScottPlotSerie True if the model has a Chart ScottPlot serie
Public propertyHasSecondaryYAxis True if the model has a secondary axis for a serie
Public propertyHasSerie True if the model has series defined
Public propertyHasStandardAggregateRestrictions Return true if the aggregate restrictions are standards (simple list with AND)
Public propertyHasStandardRestrictions Return true if the restrictions are standards (simple list with AND)
Public propertyHasSubTotals True if the model has subtotals
Public propertyHasTotals True if the model has totals
Public propertyHelperViewJoins Helper to view joins evaluated for the model
Public propertyIgnorePrePostError If true, errors occuring during the Pre or Post SQL statements are ignored and the execution continues
Public propertyIsLINQ True is it is a Model based on a LINQ source
Public propertyIsSQLModel True is it is a SQL Model (not standard based on the metadata)
Public propertyIsSubModel True is it is a Sub-Model used for a LINQ Query
Public propertyJoinsToSelect Helper to select Join preferences
Public propertyJoinsToUse List of Joins used to perform the query and joins the tables involved. By default, all Joins available in the Data Source are used.
Public propertyKeepColNames If true, the column names of the source a kept when building the metadata columns
Public propertyLINQLoadScript Default LINQ Load Script used for the model
Public propertyLINQQueryScript If not empty, overwrites default query script template used to generate the LINQ query
Public propertyLINQSubModels List of SQL Sub-models involved in a LINQ Model
Public propertyLINQSubTables List of SQL Sub-tables involved in a LINQ Model
Public propertyLoadScript The Razor Script used to load the data in the table. If empty, the load script defined in the master table is used.
Public propertyName The name
(Inherited from RootComponent)
Public propertyPostSQL SQL Statement executed after the main query. The statement may contain Razor script if it starts with '@'.
Public propertyPreLoadScript Optional Razor Script to modify the result table of the model just before the database load
Public propertyPreSQL SQL Statement executed before the main query. The statement may contain Razor script if it starts with '@'.
Public propertyPrintQuery If true, the query is printed in the report messages (for debug purpose).
Public propertyReferenceModel Current reference model if any
Public propertyReferenceModelGUID If set, restrictions and elements from the referenced model are inserted to the current model. This enables the sharing of restrictions and elements among different models. The position of the element inserted can be specified in the element property 'Insert position' in the referenced model.
Public propertyReport The current report
(Inherited from ReportComponent)
Public propertyRestriction The restriction text of the model
Public propertyRestrictions List of restrictions of the model
Public propertyResultTableTranslated Result DataTable got from the SQL query with the original column names and without hidden columns
Public propertySerializedTag Custom string serialized (saved with the report definition)
Public propertySerializedTag2 Custom string serialized (saved with the report definition)
Public propertyShareResultTable If true and several models have the same SQL or Script definiton, one result table is generated and shared for those models (Optimization).
Public propertyShowFirstLine If true and the table has column values, the first line used for titles is generated in the table header
Public propertySource Current report source
Public propertySourceGUID The source used to build the model
Public propertySql SELECT Sql used for the model
Public propertySqlCTE If not empty, overwrite the CTE (Common Table Expressions) clause in the generated SQL statement
Public propertySqlFrom If not empty, overwrite the FROM clause in the generated SQL statement
Public propertySqlGroupBy If not empty, overwrite the GROUP BY clause in the generated SQL statement
Public propertySqlOrderBy If not empty, overwrite the ORDER BY clause in the generated SQL statement
Public propertySqlSelect If not empty, overwrite the SELECT clause in the generated SQL statement (e.g 'SELECT TOP 10', 'SELECT')
Public propertySubModelsSetAggr If true, aggregates are copied to sub-models elements, otherwise the sub-models elements have no aggregate. This may impact the final performances and results (especially for Count or Average aggregates).
Public propertySubModelsSetRestr If true, restrictions and theirs values defined for the LINQ model are automatically copied to the sub-models.
Public propertyTable Table definition for a SQL Model
Public propertyUseRawSQL If true, the raw source SQL is used to generate the result table instead of using a 'select * from (Source SQL) a' statement. In this case, aggregations, restrictions and custom SQL are not applied
Public propertyUseSelectDistinct If true, SELECT DISTINCT clause clause is used by default for the model if no aggregate is defined
Top
Methods
 NameDescription
Public methodBuildQuery Build the SQL for the model
Public methodCancelCommand Cancel the model execution
Public methodCheckChartJSIntegrity Check ChartJS and set the ExecChartJSType property
Public methodCheckNVD3ChartIntegrity Check NVD3 Chart and set the ExecNVD3ChartType property
Public methodCheckPlotlyChartIntegrity Check Plotly Chart and set the ExecPlotlyChartType property
Public methodCheckScottPlotChartIntegrity Check ScottPlot and set the ExecScottPlotChartType property
Public methodCheckSortOrders Force sort orders on Page elements
Public methodStatic memberClearCommonRestrictions Clear Common Restrictions from a SQL
Public methodClearLostElements Delete elements and restrictions with no source reference
Public methodStatic memberCreate Creates a default report model
Public methodEnumDisplayValue Translate the enum using the Enum context
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExecuteLoadScript Execute custom Razor script for the model: Pre Load, Post Load and Final
Public methodFillResultTableAsync Build the ResultTable for the model
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetElements List of elements per position
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetNavigation HTML Navigation for the report result
Public methodGetRestrictionByName Returns a model restriction from its name
Public methodGetResultTableValue Return a result table value from a column name
Public methodGetSplitterElements List of splitter elements per axis type
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetXElements List of elements per type of axis
Public methodInit Init the editor objects
(Inherited from RootEditor)
Public methodInitCommonRestrictions Init all Common Restrictions of the model and build the CommonRestrictions property
Public methodInitDefaultValues Init the default values
(Inherited from RootEditor)
Public methodInitEditor Init the editor objects and the default values
(Inherited from RootEditor)
Public methodInitFromReferenceModel Initializes the model its reference model
Public methodInitReferences Init all model references: Elements, Restrictions, etc.
Public methodInvertDataTables Invert the rows and the columns of all DataTables of the pages generated
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodParseCommonRestrictions Parse and replace Common Restrictions in SQL by their values
Public methodRefreshMetaTable Initialize the MetaTable for a SQL Model
Public methodSetColumnsName Set column names for the elements before building the SQL
Public methodSetReadOnly Set all properties to readonly
(Inherited from RootEditor)
Public methodShouldSerializeCommandTimeout 
Public methodShouldSerializeLINQSubModels 
Public methodShouldSerializeLINQSubTables 
Public methodShouldSerializePrintQuery 
Public methodShouldSerializeReferenceModelGUID 
Public methodShouldSerializeShareResultTable 
Public methodShouldSerializeShowFirstLine 
Public methodShouldSerializeSubModelsSetAggr 
Public methodShouldSerializeSubModelsSetRestr 
Public methodShouldSerializeUseSelectDistinct 
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpdateEditor Update editor attributes
(Inherited from RootEditor)
Protected methodUpdateEditorAttributes Refresh properties attrivutes
(Inherited from RootEditor)
Public methodUpdateFinalSortOrders Update the final sort orders
Top
Fields
 NameDescription
Protected field_connectionGUID 
Protected field_dctd
(Inherited from RootEditor)
Protected field_GUID
(Inherited from RootComponent)
Protected field_name
(Inherited from RootComponent)
Protected field_report
(Inherited from ReportComponent)
Public fieldStatic memberDefaultLINQScriptTemplate 
Public fieldExecAxisPrimaryYIsDateTime True if chart primary axis is date time
Public fieldExecAxisSecondaryYIsDateTime True if chart secondary axis is date time
Public fieldExecChartIsDateTimeAxis True if chart is date time axis
Public fieldExecChartIsNumericAxis True if chart is numeric axis
Public fieldExecChartJSType Chart JS type
Public fieldexecCTEClause CTE Clause generated at execution
Public fieldExecD3PrimaryYAxisFormat Format for D3 primary chart axis
Public fieldExecD3SecondaryYAxisFormat Format for D3 secondary chart axis
Public fieldExecD3XAxisFormat Format for D3 chart X axis
Public fieldexecFromClause FROM Clause generated at execution
Public fieldexecGroupByClause GROUP BY Clause generated at execution
Public fieldexecHavingClause HAVING Clause generated at execution
Public fieldExecMomentJSXAxisFormat Format for Moment JS chart X axis
Public fieldExecNVD3ChartType NVD3 chart type
Public fieldexecOrderByClause ORDER BY Clause generated at execution
Public fieldexecOrderByNameClause ORDER BY NAME Clause generated at execution (used for No SQL Source)
Public fieldExecPlotlyChartType Plotly chart type
Public fieldExecResultPagesBuilt True if the result pages have been built
Public fieldExecResultTableLoaded True if the source result table has been loaded
Public fieldExecResultTables Current list of result tables for the model execution
Public fieldexecSelect Full SQL Select generated at execution
Public fieldexecSelectClause SELECT Clause generated at execution
Public fieldExecTableJoins Current list of tables used for the join
Public fieldExecutionDate Execution date of the model
Public fieldExecutionDuration Execution duration of the model
Public fieldExecutionError Error messages during execution
Public fieldexecWhereClause WHERE Clause generated at execution
Public fieldJoinPaths Description of the joins chosen to build the SQL
Public fieldLINQSelect LINQ SELECT used for the model
Public fieldMasterModel Master model if the model is a sub-model for LINQ source
Public fieldPages List of Pages generated after the model execution (one page per Page element values)
Public fieldProgression Progression in percentage of the model processing
Public fieldRestrictionText Display text for the restrictions of the model
Public fieldResultTable Result DataTable got from the SQL query
Public fieldSummaryTable Summary Table generated after the model execution (only if Page element are defined in the model)
Public fieldTag Custom Tag the can be used at execution time to store any object
Public fieldTag2 Custom Tag the can be used at execution time to store any object
Public fieldTag3 Custom Tag the can be used at execution time to store any object
Top
See Also