Programatically Select Records From Database 追蹤


We are using BarTender Designer 2016 R3 Automation with C# .NET. I have followed built-in .NET SDK help documentation as well as the example projects provided. It is still unclear to me how to programmatically select a record from our SQL database/Bartender to print on a custom amount of copies for a  label. Could someone assist me, what it is that I'm missing here? To walk you through what I am attempting to accomplish:

User opens my program -> Selects a button corresponding to which label type they would like to print -> A new window is display and the user selects which records to print via check boxes (can be multiple) and how many copies of those records to print (dynamic value) -> Prints selected records with X copies to select printer

In our current system, we have a custom program that will launch Bartender with custom command line arguments, specifically /F <label.btw> /PD /X which will open that label as well as a print dialog box. The user will select the records from the print dialog box (see below).

Thank you for your time.

1 意見

Jeff Fabish
評論操作 永久連結

Solved. In case anyone has questions regarding this, to be able to retrieve records you must select "Selected at Print Time" on the print dialog box (shown above) for "Queried Records". Then, in your code (C# .Net) after you initialize the Bartender engine, you'll need to set the Window Visibility field on the engine to VisibileWindows.InteractiveWindows AFTER you set the visibility of the window to true. For example:

m_engine.Window.Visible = true;
m_engine.Window.VisibleWindows = VisibleWindows.InteractiveDialogs;