I am now working on BOXI R2 and have decided to apply the VBA in desktop intelligence to build the dynamic report as below requirement.
Actually, Im using WEBI but since WEBI could not use VBA ,so I have moved to DESKI. ( If you have any recommendation , please be welcome)
Requirement :
Lets say that the report has 15 columns
My user need to identify the sort order and subtotal by herself. The column that can be sorted or sub totaled will be within this 15 columns
-Users would enter numbers (beginning with 1) in the Sort Order column to identify the order.
-Users would enter Y in the Subtotals column to identify the fields to include subtotals.
I have no idea how to design VBA programming for above requirement. Does anyone help to guide me the way?
Is it possible to do this? Well, yes probably … but with a LOT of effort, and the result will be fragile … hand-coded VBA userforms, storing previous choices to be used again next time, changing variable formulas on the fly, etc.
My advice, teach the users how the built-in sorting and sub-totaling functionality works.
I have done reports on this using custom objects defined in the universe combined with drill filters. It can be a bit difficult at first but the results look very nice.
When set up, the users can select a sort order from the drill bar when the report is in drill mode.
To dynamically sort a report according to column number:
Create a "Sort Order"object in the universe using a column from a derived table that just holds as an example the values 1,2,3 or 4.
Create a new data provider in the report that just uses the “Sort Order” object
Create a variable in the report that uses the DrillFilters() function to get the value the user selected for the “Sort Order” in the drill bar.
Depending on the value the user selects, set the variable to the column to be sorted on.
Apply the primary sort on this column.
Put the report into drill mode.
I hope this helps, unfortunately do not have time to do the coding.