Query Prompt Vb.net
I have a datagrid in vb.net which contains the label name, the quantity and the size.
In VB.Net I am using this code to display a preview:
Private Sub Preview(ByVal Label as String, ByVal Quantity as Integer, Optional ByVal size as String = "0")
Dim btApp As Bartender.Application = Nothing
Dim btFormat As New bartender.Format
btApp = New Bartender.Application
btApp.VisibleWindows = Bartender.BtVisisbleWindows.btInteractiveDialogs
btFormat = btApp.Formats.Open(rPath & label, False, "")
btFormat.PrintSetup.IdenticalCopiesOfLabel = Cint(Quantity)
btFormat.PrintPreview.ShowDialog()
End Sub
The label FE269011.btw contains a query prompt. How can I populate the query prompt in VB.Net?
I have tried btFormat.Databases.QueryPrompts("Maat").value = Size but VB.Net displays an error: Interface 'Bartender.Queryprompts' cannot be indexed because it has no default property.
-
This example from the BarTender Help system should set you on the right track:
Dim btEngine As New Engine() ' Start a BarTender Engine process btEngine.Start() ' Open a label format Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("c:\MyLabel.btw") ' Set the QueryPrompt btFormat.DatabaseConnections.QueryPrompts("Nutrition Calorie Data").Value = "40 Calories" ' Print the label format Dim result As Result = btFormat.Print()
0
Please sign in to leave a comment.
Comments
1 comment