I am working on an AL report that is working with the Production Order table and Prod. Order Comment Line table. I have linked these 2 tables together by Prod. Order No. For any production order a comment does not exist the excel report outputs a NULL value. I understand why it would output a NULL value but I want to replace the value with blank or another value. I have tried the following methods to remove NULL:
1. Within Dataitem(/Prod. Order Comment Line/; /Prod. Order Comment Line/) I have added
Layout File
report 51001 /Work Center Report/{ ApplicationArea = All; Caption = 'Work Center Report'; UsageCategory = ReportsAndAnalysis; DefaultLayout = Excel; ExcelLayout = './Layout/WorkCenterReport.xlsx'; //RDLCLayout = './Layout/WorkCenterReport.RDLC'; UseRequestPage = true; dataset { dataitem(/Production Order/; /Production Order/) { DataItemTableView = sorting(/Due Date/, Status) where(Status = const(Released)); column(Prod_Order; /No./) { } column(Item_No; /Source No./) { } column(Description; Description) { } column(Qty; Quantity) { } column(Due_Date; /Due Date/) { } column(Work_Center_No; /Work Center No/) { } dataitem(/Prod. Order Comment Line/; /Prod. Order Comment Line/) { DataItemLink = /Prod. Order No./ = field(/No./); column(Comment; Comment) { } trigger OnAfterGetRecord() begin if Comment = '' then Comment := ' ' // Set comment to empty if the record is empty end; } } } trigger OnPreReport() begin Codeunit.Run(51003); // Run the /Status Logic/ codeunit end;}

Report
All responses (
Answers (