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.
-
Jeff Fabish
★ BarTender Hero ★
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;Thanks.
1
請登入寫評論。
評論
1 條評論