Sections Question

mickukmickuk Member Posts: 47
edited 2005-04-12 in Navision Financials
Hi,

Im currently working with a system that has been setup within the company that im new too. They run version 2.60.B. Being quite new to C\AL I keep getting a bit confused.

I have managed to figure a few things out with the language with reading the C\AL ref library and application designers guide, however looking through some of the different parts of the application still leave me at a blank.

The problem that I'm having at the moment is with the section designer. One of the system users has created a report which has 11 sections within it. Each section appears to use the same variable name but display a different value (this is where I'm lost). How does this work as when I have created a log file that simply takes the value of the variable thats displayed in the section i get a break down of the information instead of the total value that im looking for.

For example the system stores products into groups and sub groups. What I would expect to obtain from the report is the group total which is displayed on the report as storesales.

so.... say i have the following items in the first group...

010115, 34.456
010115, 23.457
010115, 67.999
010115, 14.989

where the value after the comma is the store sales value for that item. Now the report displays the overall total of this set of items within the group as the correct figure under the variable name storesales, however i have inserted code within the OnPostSection() method of the section that this storesales variable displays the correct value.

my code being...
storefile.write("group number" + ',' + FORMAT(storesales));

instead of getting...

010115, 140.90

i get the same figures as shown above (34.456 to 14.989)

If anyone has any suggestions on what i'm doing wrong or could explain how the system works with the same variable but gives different values under each section it would be appreciated.

Thanks in advance

(hope i was clear with my explanation!) :-k

Comments

  • csimoneauxcsimoneaux Member Posts: 168
    If you are confused with the flow of data and you have a developers license, then run the debugger and watch what happens to your variable.
    If you are getting details and no totals then you need to either create TotalVariables or use the GroupTotalFields & TotalFields in the properties of the Dataitems and then use the GroupFooter in the sections.
  • kinekine Member Posts: 12,562
    You putted the code into which PostSection? Body? GroupFooter? It depend... if you put it into GroupFooter PostSection you will get right values...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.