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.
How Custom Views fits into Custom Reporting
The Custom Reporting workflow has three layers:
| Layer | Responsibility |
|---|---|
| Database administrator | Creates and maintains the base PostgreSQL reporting view that exposes the approved data set. |
| Tools → Custom Views | Registers that database view in IMS, gives it a business-friendly Display Name, controls whether it is active and classifies its fields. |
| Tools → Custom Reports | Uses 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.
vw_ naming convention. A clear database name and a clear IMS Display Name make future report administration much easier.Custom View information
| Field | Purpose |
|---|---|
| ID | IMS internal Custom View identifier. |
| Display Name | Business-friendly name shown when users and report administrators select the reporting source. |
| Report View | The underlying vw_... database view created by the database administrator. |
| Is Active | Controls whether the Custom View is available when creating normal Custom Reports. |
| Report Fields | The columns exposed by the selected base database view, together with the IMS Field Type assigned to each column. |
Register a new Custom View
- Ask the database administrator to create and validate the required base reporting view in PostgreSQL using the
vw_naming convention. - Open Tools → Custom Views and click New.
- Enter a unique business-friendly Display Name.
- Select the required Report View from the database-view list.
- Review the columns automatically loaded from that database view.
- Assign the correct Field Type to every column.
- Leave Is Active enabled when the source should be available for new Custom Reports.
- 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 Type | Typical use |
|---|---|
| Date | General date value. |
| TransDate | Transaction-date field used where report scheduling/period selection needs a transaction date. |
| TransTime | Transaction time value. |
| LocalCurrency | Monetary value formatted in the IMS local currency style. |
| Numeric0 | Numeric value displayed without decimal places. |
| Numeric1 | Numeric value with one decimal place. |
| Numeric2 | Numeric value with two decimal places. |
| Numeric3 | Numeric value with three decimal places. |
| Percent | Percentage value. |
| StoreID | Store identifier. This also enables store-related selection and Custom Attribute support in downstream report configuration. |
| SupplierID | Supplier identifier. This also enables supplier-related selection and Custom Attribute support in downstream report configuration. |
| Text | General 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.
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.