Filtering to achieve seperate results in report

achach Member Posts: 16
edited 2004-07-08 in Navision Attain
Hi There,

Wonder if you could help, I am writing a report and wish to calculate the sum of values within a date range for a period of time for example

January February March April

2000 9088 43434 4555

The above is an example of the report layout and the values shown beneath the headings will come from same table, so the question is how do I calculate the values as shown from the same table.

Thanks :wink:

Comments

  • RobertMoRobertMo Member Posts: 484
    1. If you want to make the number of columns dynamicaly it won't go. At least not the way the matrix forms act. What you can do is to put max columns you expect in the design stage and then hide some of them (or use BlankZero, etc.)

    2. How to calculate. Define a decimal array. (dcMonthSum). Use it as source expression in One Body Section field (dcMonthSum[1] .. dcMonthSum[12]).
    In OnAfterGetRecord Calculate all 12 sums.

    Remember! The table you use as source to calculate monthly sums should not be used as data item.

    Think the data item as one dimension of report (vertical), months as second dimension of report (horizontal) and the data that is used for sums is defined as global record.

    For example. To show monthly sales for each customers, set the Data Item = Customer (Vertical Dim), months would be horizontal dimension and "Customer Ledger Entry" is the global that you use for summing dcMonthSum[1] .. dcMonthSum[12].

    If you need to know how to accomplish summing, just ask...
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Sign In or Register to comment.