Full text string in report going to Excel
Shaz73
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,
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
-
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 buffer0 -
Hi,
You would also have to put similar coding in the Work Order Reporting Line - OnAfterGetRecord
Hope this helps
Albert0 -
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
.
Shaz0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions