IMS Documentation

Custom Views

Custom Views registers database reporting views with the IMS Custom Reports framework and defines how each available field should be interpreted. It is the technical bridge between a database view prepared by the database administrator and the report definitions created later in Tools → Custom Reports.

Open the screenTools → Custom Views.
Database prerequisiteThe base reporting view must be created in the IMS database by the database administrator first. Custom Views does not design the SQL query or create the database view. It registers an approved database view with IMS and adds reporting metadata to its fields.

How Custom Views fits into Custom Reporting

The Custom Reporting workflow has three layers:

LayerResponsibility
Database administratorCreates and maintains the base PostgreSQL reporting view that exposes the approved data set.
Tools → Custom ViewsRegisters that database view in IMS, gives it a business-friendly Display Name, controls whether it is active and classifies its fields.
Tools → Custom ReportsUses an active Custom View to select fields, headers, formats, calculations, grouping and sorting for a user-facing report.

Reporting Scheduler and Reports → User-Defined Reports then consume the Custom Reports created on top of this structure.

Available database views

IMS searches the PostgreSQL public schema for database objects whose names begin with vw_. Only those base reporting views are offered for selection in Custom Views.

If IMS cannot find any matching base views, the screen instructs the user to contact the database administrator. This is intentional: defining the SQL and deciding which database data should be exposed is an administrator responsibility.

Recommended namingKeep custom-report base views under the established vw_ naming convention. A clear database name and a clear IMS Display Name make future report administration much easier.

Custom View information

FieldPurpose
IDIMS internal Custom View identifier.
Display NameBusiness-friendly name shown when users and report administrators select the reporting source.
Report ViewThe underlying vw_... database view created by the database administrator.
Is ActiveControls whether the Custom View is available when creating normal Custom Reports.
Report FieldsThe columns exposed by the selected base database view, together with the IMS Field Type assigned to each column.

Register a new Custom View

  1. Ask the database administrator to create and validate the required base reporting view in PostgreSQL using the vw_ naming convention.
  2. Open Tools → Custom Views and click New.
  3. Enter a unique business-friendly Display Name.
  4. Select the required Report View from the database-view list.
  5. Review the columns automatically loaded from that database view.
  6. Assign the correct Field Type to every column.
  7. Leave Is Active enabled when the source should be available for new Custom Reports.
  8. Click Save.

When a different base database view is selected, IMS reads its columns from PostgreSQL automatically. New fields initially receive the Text classification until the administrator assigns the appropriate field type.

Field Types

Field Type is metadata used by the Custom Reports framework to decide how a column can be formatted, calculated, grouped or used as report/scheduler criteria.

Field TypeTypical use
DateGeneral date value.
TransDateTransaction-date field used where report scheduling/period selection needs a transaction date.
TransTimeTransaction time value.
LocalCurrencyMonetary value formatted in the IMS local currency style.
Numeric0Numeric value displayed without decimal places.
Numeric1Numeric value with one decimal place.
Numeric2Numeric value with two decimal places.
Numeric3Numeric value with three decimal places.
PercentPercentage value.
StoreIDStore identifier. This also enables store-related selection and Custom Attribute support in downstream report configuration.
SupplierIDSupplier identifier. This also enables supplier-related selection and Custom Attribute support in downstream report configuration.
TextGeneral text/dimension field.

For example, Custom Reports does not apply numeric aggregation functions to Text, StoreID or SupplierID fields. StoreID and SupplierID also let the report framework expose the related Store/Supplier Custom Attributes as additional available report fields.

Edit a Custom View

Select the Custom View and click Edit. You can change the Display Name, Active state, selected base Report View and field classifications.

If the same base database view remains selected, IMS reloads its current database columns and keeps the previously assigned field type where that field still exists. This is useful when the DBA has extended the base view with new columns: existing classifications can be retained while new columns are classified.

Coordinate structural changesA Custom View can be used by multiple reports. Changing the underlying database view or its column structure should be coordinated with the database administrator and the Custom Report owners so dependent report definitions can be reviewed afterward.

Active and inactive views

Only active Custom Views are normally offered when a new Custom Report is created. This allows an old reporting source to be retired without immediately deleting its definition. Existing reports can retain their current view reference while the source is being reviewed or phased out.

Delete a Custom View

IMS does not allow a Custom View to be deleted while one or more Custom Reports still use it. The screen lists the dependent report names and requires those dependencies to be removed first.

Once the Custom View is unused, Delete permanently removes its IMS Custom View registration and field metadata. It does not replace the database administrator's responsibility for the underlying PostgreSQL view.

Audit history

Creating, modifying or deleting a Custom View is written to the IMS activity log with the Custom View ID and Display Name.