Hi,
In Dynamics 365 business central, there is a option to define and select Customer reports layout. I could able to run the Report in Sales quote but in sales order I can not get custom report layout.It is using default layout.
Can anyone have an Idea?
Warm Regards
Kris
0
Answers
1. Open Report layout selection. Filter on the report and change Selected layout to custom layout.
2. Open Custom Report layout and insert your own layout. Or copy from the existing report (RDLC) and then export it and make changes. Then import it back.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have several report layouts (word) for one report example 1305. for example I have agreement (sales order) for prepaid contract and post paid contract. from the sale order I update layout code in 9657 table and I run report. It is okay working in Sales quote page but not in Sales order page.
on page action
Salesquote.CustomerReportLayout("Sell-to Customer No.","Document Type",Segment);
COMMIT;
DocPrint.PrintSalesOrder(Rec,Usage::"Order Confirmation");
External] CustomerReportLayout(CustNo : Code[20];Doctype : 'Quote,Order,Invoice';Segm : Code[10])
Segmas.RESET;
Segmas.SETFILTER("Segment Id",Segm);
IF Segmas.FINDSET THEN
BEGIN
IF (Segmas."Quote Report Layout"<>'') AND (Doctype=Doctype::Quote) THEN
BEGIN
custlay.RESET;
custlay.SETRANGE(Usage,18);
custlay.SETRANGE("Source No.",CustNo);
custlay.SETRANGE(Usage,custlay.Usage::"S.Quote");
custlay.SETRANGE("Report ID",1304);
IF custlay.FINDFIRST THEN
custlay.VALIDATE(custlay."Custom Report Layout Code",Segmas."Quote Report Layout")
ELSE BEGIN
custlay.INIT;
custlay.VALIDATE(custlay."Source Type",18);
custlay.VALIDATE(custlay."Source No.",CustNo);
custlay.VALIDATE(custlay.Usage,custlay.Usage::"S.Quote");
custlay.VALIDATE(custlay."Report ID",1304);
custlay.VALIDATE(custlay."Custom Report Layout Code",Segmas."Quote Report Layout");
custlay.INSERT;
END;
END;
IF (Segmas."Order Report Layout"<>'') AND (Doctype=Doctype::Order) THEN
BEGIN
custlay.RESET;
custlay.SETRANGE(Usage,18);
custlay.SETRANGE("Source No.",CustNo);
custlay.SETRANGE(Usage,custlay.Usage::"S.Order");
custlay.SETRANGE("Report ID",1305);
IF custlay.FINDFIRST THEN
custlay.VALIDATE(custlay."Custom Report Layout Code",Segmas."Order Report Layout")
ELSE BEGIN
custlay.INIT;
custlay.VALIDATE(custlay."Source Type",18);
custlay.VALIDATE(custlay."Source No.",CustNo);
custlay.VALIDATE(custlay.Usage,custlay.Usage::"S.Order");
custlay.VALIDATE(custlay."Report ID",1305);
custlay.VALIDATE(custlay."Custom Report Layout Code",Segmas."Order Report Layout");
custlay.INSERT;
END;
END;
END;
please??