Jump to content
Sign in to follow this  
TomasJ

Select Records From Database

Recommended Posts

TomasJ

Hello,

 

i'm struggling to find a solution how to programmatically select more than one record from database and print it in one print job.

 

Scenario:

I have DGW where one row represents one record from database.

The user can select more than one record (multiselection) and print them.

 

The approach I use and it's working is:

I'm going through each record in for loop and everytime call method btFormat.DatabaseConnections.QueryPrompts["QueryPrompt1"].Value = id

And then after prompting I call method btformat.Print().

 

As I said this is working fine, but for every record I generate new print job. That means even if I want to print just one label of each selected record, I'll print each label to the new paper. That's a hell of a waste of material.

 

Question:

Is there some way how to select more than one records and prompt them with data from database and then print them with a single print job?

Something like "Select/querried records" within a BarTender software (see attached picture). But I don't know how to approach than in .NET and which method is responsible for that.

 

I'm using Bartender 2016 and working with .NET C#

 

 

 

Any help is appreciated,

 

Tomáš

post-40623-0-25764700-1472478270_thumb.png

  • Like 3

Share this post


Link to post
Share on other sites
Sign in to follow this  

×