Dont print shipment after Post&Print

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

Solution (Verified) This post has 2 verified solutions | 3 Replies | 2 Followers

17 Posts
155 Points
Joined: 2011-1-24
Last Online:
2013-2-22 11:03
Location: Riga, Latvia
Kaspars posted on 2012-8-31 15:26

Hi,

at the moment after Posting a Sales Order using option Post&Print -> Ship and Invoice. System prints Sales Shipment and Sales Invoice.

How can I change no to print Sales Shipment?

In code? Or it can be done with setup?

 

Thanks in advance

Solution (Verified) Verified Solution

Male
864 Posts
18,000 Points
Joined: 2003-3-16
Last Online:
2013-5-22 19:53
Location: New York
DynamicsNAVMVP
Solution (Verified) Savatage replied on 2012-8-31 18:44
Verified by Kaspars

For us I simply commented out the line in CU82..since we NEVER use that report EVER.
I didn't try it but what if you simply removed the report number from the report selections?

below is where i commented out the code.
I guess I could have added a field to the S&R setup table to turn it on & off easier!

CASE "Document Type" OF "Document Type"::Order: BEGIN
 IF Ship THEN BEGIN
  SalesShptHeader."No." := "Last Shipping No.";
  SalesShptHeader.SETRECFILTER;
 //PrintReport(ReportSelection.Usage::"S.Shipment"); << I killed the command!
END;
 IF Invoice THEN BEGIN
  SalesInvHeader."No." := "Last Posting No.";
  SalesInvHeader.SETRECFILTER;
  PrintReport(ReportSelection.Usage::"S.Invoice");
 END;
END;

Harry Ruiz  - Dynamics NAV MVP
www.CosmeticSolutions.com
www.AutismSpeaks.org

Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
Verified by Kaspars

Savatage:
I guess I could have added a field to the S&R setup table to turn it on & off easier!

 

This is a bug in Navision, been there as long as I can remember:

ReportSelection.SETFILTER("Report ID",'<>0');
ReportSelection.FIND('-');

Should be

// ReportSelection.SETFILTER("Report ID",'<>0');
ReportSelection.FIND('-');

That way you can put a blank report entry in the table to mean not print anything.

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

All Replies

Male
864 Posts
18,000 Points
Joined: 2003-3-16
Last Online:
2013-5-22 19:53
Location: New York
DynamicsNAVMVP
Solution (Verified) Savatage replied on 2012-8-31 18:44
Verified by Kaspars

For us I simply commented out the line in CU82..since we NEVER use that report EVER.
I didn't try it but what if you simply removed the report number from the report selections?

below is where i commented out the code.
I guess I could have added a field to the S&R setup table to turn it on & off easier!

CASE "Document Type" OF "Document Type"::Order: BEGIN
 IF Ship THEN BEGIN
  SalesShptHeader."No." := "Last Shipping No.";
  SalesShptHeader.SETRECFILTER;
 //PrintReport(ReportSelection.Usage::"S.Shipment"); << I killed the command!
END;
 IF Invoice THEN BEGIN
  SalesInvHeader."No." := "Last Posting No.";
  SalesInvHeader.SETRECFILTER;
  PrintReport(ReportSelection.Usage::"S.Invoice");
 END;
END;

Harry Ruiz  - Dynamics NAV MVP
www.CosmeticSolutions.com
www.AutismSpeaks.org

Male
6,597 Posts
65,173 Points
Joined: 2001-4-12
Last Online:
2013-5-3 10:20
Location: Prague, Czech Republic
DynamicsNAVMVP
SystemAdministrator
Verified by Kaspars

Savatage:
I guess I could have added a field to the S&R setup table to turn it on & off easier!

 

This is a bug in Navision, been there as long as I can remember:

ReportSelection.SETFILTER("Report ID",'<>0');
ReportSelection.FIND('-');

Should be

// ReportSelection.SETFILTER("Report ID",'<>0');
ReportSelection.FIND('-');

That way you can put a blank report entry in the table to mean not print anything.

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

17 Posts
155 Points
Joined: 2011-1-24
Last Online:
2013-2-22 11:03
Location: Riga, Latvia
Kaspars replied on 2012-9-3 11:05

Thank you both.

Page 1 of 1 (4 items) | Get this RSS feed | Bookmark and Share