Please help TempExcelBuffer

vnprocvnproc Member Posts: 41
I Export To Excel from the report but did not understand TempExcelBuffer. It has the following problems:

TempExcelBuffer.Text_1 ..., TempExcelBuffer.Code_1 ..., TempExcelBuffer.Decimal_1 ...

I do not understand when to use Text_1 ..., Code_1 ..., Decimal_1 ...

Please do help explain. (I am using NAV 5.0 SP1)

Thank you.

Comments

  • geordiegeordie Member Posts: 655
    Hi, in order to export data you should fill "Cell Value as Text" field of Excel Buffer table, please take a look at standard reports (for instance 29 or 82).
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    I have these functions in all my reports:



    function:
    NewExcelLine()
    TempExcelBuffer.NewRow();
    

    function:
    Write(Value : Variant)
    IF FORMAT(Value) = '0'
       THEN Value := '';
    TempExcelBuffer.AddColumn(FORMAT(Value), FALSE,'',Bold,Italic,FALSE,'');
    

    Bold,Italic are global booleans.

    The the report is like:
    newexcelline;
    Bold := true;
    write(TxtColHeader1);
    write(TxtColHeader2);
    bold := false;
    repeat 
      newexcelline;
      write(val1);
      write(val2);
    until blahblahblah.next = 0;
    

    (I also use a customization to be able to set background color, making things 100% more usable. Bad records like over credit limit get red etc.)
  • vnprocvnproc Member Posts: 41
    Thanks everybody. I have successfully exported
Sign In or Register to comment.