IF "Sales Invoice Line".Type = 3 THEN IF "Sales Invoice Line"."No." = '' THEN BEGIN CurrReport.SHOWOUTPUT(FALSE); END ELSE IF "Sales Invoice Line"."No." = 'TRACKINGNUMBER' THEN BEGIN CurrReport.SHOWOUTPUT(FALSE); END ELSE IF "Sales Invoice Line"."No." = 'CODISC' THEN BEGIN TotalCODISC := TotalCODISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'DSC' THEN BEGIN TotalDSC := TotalDSC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'FDISC' THEN BEGIN TotalFDISC := TotalFDISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'FREIGHT CHARGE' THEN BEGIN TotalFREIGHTCHARGE := TotalFREIGHTCHARGE + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'LIDISC' THEN BEGIN TotalLIDISC := TotalLIDISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'LTDISC' THEN BEGIN TotalLTDISC := TotalLTDISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'NDISC' THEN BEGIN TotalNDISC := TotalNDISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'PKDISC' THEN BEGIN TotalPKDISC := TotalPKDISC + "Sales Invoice Line".Amount; END ELSE IF "Sales Invoice Line"."No." = 'WIRE TRANSFER' THEN BEGIN TotalWIRETRANSFER := TotalWIRETRANSFER + "Sales Invoice Line".Amount; END ELSE CurrReport.SHOWOUTPUT(TRUE) ELSE CurrReport.SHOWOUTPUT(FALSE);
Comments
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
do you just really need to list them in a report or do you really need the invoice?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Here is the logic I am going for:
:arrow: Use the Sales Invoice form.
:arrow: Only show for PREVIEW or PRINT those Posted Sales Invoices that contain those RESOURCE codes in the Sales Lines.
That's it.
Thanks.
OK, the simple way....
Create a Batch (non printing report) based on Sales Line.
You will run this filters by Doc Typ Order, Typ Res, No. (your resources).
Create a Temp record of Sales Header.
In the onaftergetrec section in the report add code like:
Teh in the onpostrecord section, run through the temp records, and send them as paramaters to your report to print.
It probably took me longer to write this post that it will to write the code.
I know the following:
*Create a report using TABLE 'Sales Line'.
*The DataItem should be 'Sales Line'.
*I should set ProcessingOnly to 'Yes'.
*The user should see a Request Form where they can choose a
Date Filter and Salesperson Code.
*I should somehow write code to loop through the filtered Sales Lines
(the code I already wrote for a previous report) and if I get a TRUE I
should then call the REPORT.RUNMODAL function for each instance of
TRUE using the SalesInvoiceHeader."No."
:? What I am not sure of:
*How I get there? ](*,)
*Will the user have a Request Form to input a Salesperson Code and
Date Filter?
*If I use REPORT.RUNMODAL function will the user get to select a
printer?
:-k Can't I use or modify, create a copy of the Navision report 'Sales Invoice' to do the same thing that the ProcessingOnly report does? I feel this is the best option (users like to preview and print) because my understanding is that I can run this report using the Request Form and just hard code in one of the sections (OnPre?) to do a CurrReport.SHOWOUTPUT(TRUE) when I get a Sales Line that is one of the RESOURCES I am looking for?
Thanks.
Thanks.