Scenario:-
Report:
Sales Order
Data Items:
Sales Header,
Sales Line
In my Sales Order form, when I click Print Sales Order, above report will be previewed and printed.
This is the coding i use to just pass the Sales Order No. to my report.
SalesHeader.SETRANGE("No.","No.");
REPORT.RUN(REPORT::"Sales Order",TRUE,TRUE,SalesHeader);
I think you all know right that above coding will fill in the value of "No." under Sales Header tab in your request form.
NOW.. what i need is to pass another value "Type" for my dataitem Sales Line in the request form.
Help anyone? I hope my enquiry is explained to your understanding. Thanks.
Comments
SalesHeader.SETRANGE("Document Type", "Document Type");
SalesHeader.SETRANGE("No.","No.");
REPORT.RUNMODAL(REPORT::"Sales Order",TRUE,TRUE,SalesHeader);
Unlike the posted sales invoice table with a key of just "No."
The sales Header Table needs two key
doc type & no.
Not sure I understand passing anything to the sales line table????
if it's a finished report..hopefully the report is built correctly that it shows what you want it to.
http://www.BiloBeauty.com
http://www.autismspeaks.org
If I understand correctly you want to print only a subset of sales invoice lines filtered by specific value of Type field ?
If so - there is no straight method - you need to modify report and create some function to pass all necessary filters in some C/AL function call prior to running the report. You will also need to use another syntax to run your report (ReportXXX.RUN where ReportXXX is a variable of type of your report).
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
=D>
I didn't know - didn't even try such a solution even when needed something similar.
This should go straight to Tips & Tricks.
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
[Topic moved from Navision forum to Navision Tips & Tricks forum]
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!