I did not create this report but trying to modify it to show more data from a different table.
I have a work order header table and workorder reporting line table.
I linked them as data item link with the document number. I have multiple reporting lines on the reporting table and I need them all on my report. My problem is that it is only showing the last line. I have the following code. Can someone suggest a solution to accomplish that throug excel buffer. This report only outputs to excel.
LastFieldNo := FIELDNO("No.");
dia.OPEN('#1##############');
HeaderRowNo:=1;
Work Order Header - OnAfterGetRecord()
dia.UPDATE(1,"No.");
C:=1;
HeaderRowNo+=1;
C+=1;
entcel(HeaderRowNo,C,FORMAT("No."),FIELDCAPTION("No."),m_bold,FALSE,0);
C+=1;
entcel(HeaderRowNo,C,FORMAT("Fleet Code"),FIELDCAPTION("Fleet Code"),m_bold,FALSE,0);
C+=1 ;
entcel(HeaderRowNo,C,FORMAT("Serial No."),FIELDCAPTION("Serial No."),m_bold,FALSE,0);
C+=1 ;
entcel(HeaderRowNo,C,FORMAT(recReporting.Description),recReporting.FIELDCAPTION(Description),FALSE,FALSE,0); C+=1; entcel(HeaderRowNo,C,FORMAT("Posting Status"),FIELDCAPTION("Posting Status"),m_bold,FALSE,0);
C+=1 ;
entcel(HeaderRowNo,C,FORMAT(Status),FIELDCAPTION(Status),m_bold,FALSE,0);
C+=1;
Work Order Header - OnPostDataItem()
FinishSheets;
dia.CLOSE;
Thanks,
0
Comments
I think there's more code in your report than this...
The green line only adds another column (for the description), therefore only the FIRST line is printed.
You should ask the original developer to train you about the functions he used (that are a common practice when exporting something).
PS: i guess he have used excel buffer
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
You would also have to put similar coding in the Work Order Reporting Line - OnAfterGetRecord
Hope this helps
Albert
Thank you very much
Shaz