Result is different between print to paper & print to Excel

billhwang2008billhwang2008 Member Posts: 32
Hi Experts,

I designed a report with follow 2 dataitems:
first: Item Ledger Entry
second: Item

for Item Ledger Entry, need to read the fields: Item No.,Posting Date,Remaining Qty.

for Item, need to read the fields: Standard Roll Length,Standard Roll Width
set DataItemLinkReference property: Item Ledger Entry; DataItemLink property: No.=FIELD(Item No.)

click Print or Preview, all results are correct.

but I also designed a request form for choose Print to Excel, if I selected it, the results of fields: Standard Roll Length and Standard Roll Width do not correspond to current Item No., but correspond to previous one.

I cannot find similar topics, could you please give a solution for it? thanks a lot.

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Do you use the Excel Buffer table? In which trigger did you type in your code to export Item."Standard Roll Length" (and width)?
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • billhwang2008billhwang2008 Member Posts: 32
    Do you use the Excel Buffer table? In which trigger did you type in your code to export Item."Standard Roll Length" (and width)?

    Hi, einsTeIn.NET, thanks a lot for your reply.

    Yes, I use the Excel Buffer table, in fact, I copied the codes from Report 108 and did some modifications, there are 4 functions: MakeExcelInfo, MakeExcelDataHeader, MakeExcelDataBody, CreateExcelbook. For Item."Standard Roll Length" (and width), I type the codes in MakeExcelDataBody just after the codes to export other fields.
  • billhwang2008billhwang2008 Member Posts: 32
    After added following code before reading the Item."Standard Roll Length" and "Standard Roll Width", I think it is working now.
    Item.GET("Item Ledger Entry"."Item No.");
    
Sign In or Register to comment.