AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
Print Report withou...
 
Notifications
Clear all

Questions Print Report without showing Report Viewer

 
Acumatica Report Designer
Last Post by Tim Rodman 2 years ago
4 Posts
3 Users
0 Reactions
1,366 Views
RSS
SusanK17
Posts: 10
 SusanK17
Topic starter
September 1, 2023 9:21 am
(@susank17)
Active Member
Joined: 5 years ago

I am writing a custom program to do just in time Pick List printing.  The user will hit print and the program will create the shipment and print the oldest open orders up to x number of orders.  I want to leave the orders open as long as possible to allow for easy changes if the customer calls back to add, change or delete items from the order, which happens frequently in my business.

I want to print the pick list report without showing the report in the report viewer.  I don't want them to be able to back out from printing the report or emailing the report.  I want the print button to just print with no steps in between.  

Do any of you know if this is possible?  If so, do you know the command I need to use to launch the rpx file directly?

 

Thank-you.


Topic Tags
report designer report viewer report launcher
3 Replies
Melissa Lutrick
Posts: 5
 Melissa Lutrick
September 28, 2023 9:34 am
(@mlutrick)
Active Member
Joined: 3 years ago

Interested in this as well. 

Customer wants Production Tickets to automatically print upon Release of Production Orders.


Reply
SusanK17
Posts: 10
 SusanK17
Topic starter
September 28, 2023 9:56 am
(@susank17)
Active Member
Joined: 5 years ago

Here are the steps I took to get it all working.

Device Hub

Once you have installed Device Hub make sure you enter the program by right clicking on the app and selecting Run as Administrator.  It lets you setup the printer without that but it will not work.  Once in the app enter the Device ID under the General tab, enter the Url and credentials on the Connection tab, and enter Name and Select your printer under the Printer tab.

Setup Printer in Acumatica:  System Maintenance==>Printers (GI000100)

Use Update Printer List action, if your printer does not load with this action then it is not setup correctly in Device Hub.  Manually entering the printer information is a waste of time, the printer will not show as active when manually entered.

Setup Restriction Groups for Printer Access:  Configuration==>Printer Access (SM106000)

Setup Default Printer and or assign Printer to specific printer under the User’s Profile (SM203010)

Code:

[Serializable]

[PXCacheName("PrintPickTicketFilter")]

public class PrintPickTicketFilter : IBqlTable

{

     #region UsrBranchID  

     [PXDBInt()]

     [PXDefault(typeof(AccessInfo.branchID))]

     public virtual Int32? UsrBranchID { get; set; }

     public abstract class usrBranchID : PX.Data.BQL.BqlInt.Field<usrBranchID> { }

     #endregion

     #region PrintWithDeviceHub

     [PXDBBool]

     [PXDefault(typeof(FeatureInstalled<FeaturesSet.deviceHub>))]

     [PXUIField(DisplayName = "Print with DeviceHub")]

     public virtual bool? PrintWithDeviceHub { get; set; }

     public abstract class printWithDeviceHub : PX.Data.BQL.BqlBool.Field<printWithDeviceHub> { }

     #endregion

     #region DefinePrinterManually

     [PXDBBool]

     [PXDefault(true)]

     [PXUIField(DisplayName = "Define Printer Manually")]

     public virtual bool? DefinePrinterManually { get; set; }

     public abstract class definePrinterManually : PX.Data.BQL.BqlBool.Field<definePrinterManually> { }

     #endregion

     #region PrinterID

     [PXPrinterSelector]

     public virtual Guid? PrinterID { get; set; }

     public abstract class printerID : PX.Data.BQL.BqlGuid.Field<printerID> { }

     #endregion

     #region NumberOfCopies

     [PXDBInt(MinValue = 1)]

     [PXDefault(1)]

     [PXFormula(typeof(Selector<SOShipmentFilter.printerID, PX.SM.SMPrinter.defaultNumberOfCopies>))]

     [PXUIField(DisplayName = "Number of Copies", Visibility = PXUIVisibility.SelectorVisible)]

     public virtual int? NumberOfCopies { get; set; }

     public abstract class numberOfCopies : PX.Data.BQL.BqlInt.Field<numberOfCopies> { }

     #endregion

}

 

public PXFilter<PrintPickTicketFilter> Filter;

#region Print Pick Ticket

public void PrintPickTicketWithDeviceHub(string shipNbr)

{

     SOShipment ship = SOShipment.PK.Find(this, shipNbr);

     if (ship != null)

     {

           if (Filter.Current.PrinterID == null)
          {
               var usrPrefs = UserPreferences.PK.Find(this, base.Accessinfo.UserID);
               if (usrPrefs != null)
              {
                   Filter.Current.PrinterID = usrPrefs.DefaultPrinterID;
              }
          }

          var printSettings = new PrintSettings

          {

               PrintWithDeviceHub = Filter.Current.PrintWithDeviceHub,

               DefinePrinterManually = Filter.Current.DefinePrinterManually,

               PrinterID = Filter.Current.PrinterID,

               NumberOfCopies = Filter.Current.NumberOfCopies

          };

 

     Dictionary<string, string> parametersDictionary = new Dictionary<string, string>();

     parametersDictionary["Shipment Nbr"] = shipNbr;

 

     Object cstmr = Customer.PK.Find(this, ship.CustomerID);

     string actualReportID = new NotificationUtility(this).SearchReport(SONotificationSource.Customer, cstmr, SOReports.PrintPickList, Filter.Current.UsrBranchID);

 

     PXReportRequiredException ex = null;

     ex = PXReportRequiredException.CombineReport(ex, actualReportID, parametersDictionary);

     SMPrintJobMaint.CreatePrintJobGroup(printSettings, ex, actualReportID);

     }

}

#endregion


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
October 20, 2023 9:41 pm
(@timrodman)
Famed Member
Joined: 10 years ago

It looks like they added the ability to do this without code in Acumatica 2023 R2. You would add an Automation Schedule on the Print Production Orders (AM511000) screen using the Print with DeviceHub checkbox that's highlighted here:

image

 

Just make sure that you have DeviceHub enabled:

image

Reply
Forum Jump:
  Previous Topic
Next Topic  
Related Topics
  • Pick List report suddenly not splitting on Shipment
    2 weeks ago
  • QR Code Size
    8 months ago
  • Print multiple report at the same time on a single printer using device hub
    12 months ago
  • Long text truncated/cut off
    1 year ago
  • Latest Vendor for
    1 year ago
Topic Tags:  report designer (47) , report viewer (1) , report launcher (1) ,
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 34 Online
  • 2,338 Members
Our newest member: Shoaib Shafquat
Latest Post: Pick List report suddenly not splitting on Shipment
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • Tim Rodman Julian Schrenzel
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×