changing pivot table funtion ie sum, count etc...

MatStephensSandAMatStephensSandA Member Posts: 74
Hi all..

I have managed to cobble together a report that will export a Nav report and create a Pivot table in Excel.

Trouble is the Pivot table is performing a 'count' rather than a 'sum'.

Does anyone know the command to automate this from navision.

Thanks in advance.
Matty
M@
I have seen the future and it's egg shaped.

Answers

  • kinekine Member Posts: 12,562
    try to record macro in excel and do it manually, than look into the macro and try to do same code in NAV...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MatStephensSandAMatStephensSandA Member Posts: 74
    Probelm has been solved.

    The solution is :

    xlPivotField.Orientation := 4; //xlDataField
    xlPivotField.Position := 1;
    xlPivotField."Function" := 0;//sum

    You can change the Function from 0 to 1,2,....
    Hope it can help others..
    M@
    I have seen the future and it's egg shaped.
Sign In or Register to comment.