Tiny but very useful feature of FastCube OLAP tool
For decades, FastReports Inc. has been providing a very handy solution for analysis data in tables at client's side. Using FastCube is easy, crystal-clear and intuitive and as we often say to our customers, you need only two abilities to use it - to be familar with a computer mouse and to have so called common sense (so that you're able to specify what you expect from your analysis.
There's a plethora of useful functions, features and properties that allow the users to create practically unrestricted analysis scheme and display final data within. Main advantage of using this solution is that all calculations are performed at the client's side, i.e. the client application is responsible for this.
A commencing control how to start your work with analysis is list of fields available for a given dataset. Fields in list are sorted alphabetically and user can either scroll the list or use an inceremental search available through a simple typing of the field name or its part.
However, there's an exception related to date/time/datetime fields. As distinct from "simple" data types like string or integer, datetime type is a bit more complex. For instance, let's say that today is 7th of February, 2025. This information is valid but hardly useful for analysis purposes, maybe in the situation when we pursue for instance a detailed analysis of our data "day-by-day". More often, we'd welcome a different grouping of our data, e.g. on monthly or quarterly basis.
Back to our actual date, 7.2.2025. At first sight, we can identify three more so called date literals, it means day of the month (7), month of the year (2) and year itself (2025). Nevertheless we can extract many more date literals from the complex date:
- half-year
- quarter
- ordinal number of day within the year
- ordinal number of day within the month
- ordinal number of day within the week
- ordinal number of week within the year
- whether a given date is workday or weekday
In case of a time portion of the field, more date literals are available, such as hour, minute, second, milisecond etc. All date literals will be extremely useful for creating our next analysis but as you know, nothing in our life is solely black and white.
All available date literals are initially displayed in the list of fields in an expanded way, which needs a lot of space and makes navigation among field names in list a bit awkward.
The better option would be if nodes representing datetime fields are collapsed and user decides which one shall be expanded for further work - it would make using the list of fields more pleasureable and also searching field would be significantly easier. Happily, the component tfrxSliceGrid from FastCube package - responsible for a proper visualization of data in a grid form - is equipped with a property named AutoExpandPopups that is set to True by default. The way to have datetime field's nodes collapsed is very simple - set AutoExpandPopups to False in designtime or call
frxSliceGrid1.AutoExpandPopups:=False;
at runtime. The difference is clear - all concerned nodes are collapsed and you can concentrate only on those you'll need.>
About the Author
Ing. Karel Janecek, MBA, MSc.www.torry.net