Options

Full text string in report going to Excel

Shaz73Shaz73 Member Posts: 16
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,

Comments

  • Options
    BeliasBelias Member Posts: 2,998
    This code only prints an header line in excel with the captions of some fields of the "Work Order Header"...
    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
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    AlbertvhAlbertvh Member Posts: 516
    Hi,
    You would also have to put similar coding in the Work Order Reporting Line - OnAfterGetRecord

    Hope this helps

    Albert
  • Options
    Shaz73Shaz73 Member Posts: 16
    Albert and Belias, Thank you for pointing me into the right direction. I am learning the excel buffer so putting the coding into recReporting is giving me better results.

    Thank you very much :) .
    Shaz
Sign In or Register to comment.