Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In general, this is how I finally solve the problem:</p> <pre><code>1. Define how many divisions (NumColumn) to be displayed in a single page. 2. Create a table to store the mapping of the division. The table has column that stores PageOffset and ColumnNo. PageOffset stores the number of page to be added when displaying a particular division. For example, if there are 15 divisions, and a page can only accommodate 10 divisions, then the first 10 divisions will have `PageOffset = 0` and the last 5 divisions will have `PageOffset = 1`. The ColumnNo is the position of a division in the report column. So first division will have value of 1, second division will have value of 2 and so on. 11th division will have the value of 1, etc. 3. Create a result table. For each column in the report, we have 2 database field, value and total. 4. Loop for each record, sorted by the group. Select the position of the division from the table in step 2. If `ColumnNo = 1` insert a row in the result table. E.g. for division 1 and 11 it will create rows in result table. After that update the row data, based on the position of the division. So for division 1-10 will update the row created by division 1, division 11-15 will update row created by division 11. 5. Count the number of items in each group and store it into a table. 6. Define how many rows (RowsInPage) to be displayed in a single page. 7. Set PageAdd = 0 and RowsLeft = RowsInPage 8. Loop for each group Retrieve the number of rows needed for this group Add the page number of each row with PageAdd Decrement RowsLeft If RowsLeft = 0 Increment PageAdd Set RowsLeft = RowsInPage End If 9. Loop for each group Loop from 1 to NumColumn Update the total field for each division. This total field value will be put in the report as the running group total for that particular division. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload