Jump to content


Photo
- - - - -

Variable In Query


  • Please log in to reply
2 replies to this topic

#1 Diederd

Diederd

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 30 September 2011 - 04:16 AM

Is it possible to make a query in Bartender with the value , which you selected in a listbox or combobox, instead of using a the query-prompt.
The reason is the contents of the fields are to long too enter it every time you need a label. So I thought to make a list- or combobox in the prompt-view. And with this selection I can select the database record.

Is this possible ?

#2 Shotaro Ito

Shotaro Ito

    Member

  • Members
  • PipPipPipPip
  • 360 posts
  • LocationJapan

Posted 02 October 2011 - 06:48 PM

Hi Diederd,
Unfortunately current record selection in BarTender UI is only Text input box on query prompt, and/or record selection dialog.
Since that is reasonable and well wanted request, I'll add that to BarTender's feature request.

Often used solution is use BarTender Automation edition and create an application to filter value.
BarTender automation edition has command line option
/?"QueryPromptName"="QueryPromptValue"

So you can create any application to give command line or Commander script to print format with filtered value.
You can use this command line like this:
"C:\Program Files\Seagull\BarTender Suite\bartend.exe" /F="c:\format.btw" /P /?"QueryPrompt1"="0001" /X

or commander script trigger like this
%BTW% /AF="c:\format.btw" /P /?"QueryPrompt1"="0001"

Query prompt value can be specified from ActiveX, .NET SDK and BarTender XML Script too.

Another option is not using BarTender's database connection, manually create database connection via VBScript.
Use user prompt's dropdown box to select a condition by OnFillList VBScript (like this) then retrieve data by OnPostPrompt VBScript from database to fill label values.
This is a tedious approach so I don't recommend it.

#3 Diederd

Diederd

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 October 2011 - 11:38 PM

Dear,

Thanks for the quick answer.

I have solved it like you suggest below

Another option is not using BarTender's database connection, manually create database connection via VBScript.
Use user prompt's dropdown box to select a condition by OnFillList VBScript (like this) then retrieve data by OnPostPrompt VBScript from database to fill label values.

Because the total quantity of fields ,what must printed, was not much, it could be solved with this approach. But it would be nice if it was possible to manage this in query selection in the future.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users