Jump to content


Photo
- - - - -

Select Records From Database

.NET selected record query database sql multiselection

  • Please log in to reply
No replies to this topic

#1 TomasJ

TomasJ

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 29 August 2016 - 05:50 AM

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áš

Attached Thumbnails

  • Capture.PNG






Also tagged with one or more of these keywords: .NET, selected record, query, database, sql, multiselection

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users