Aller au contenu principal

Recherche

Recherche

Parameters From Window / User

Commentaires

7 commentaires

  • Avatar
    Legacy Poster
    Hi,
    Do you want to print the name of the user from DB or else from the form itself.If you want to fetch the data from db you can handle it using vb script or else if you want to type the name in form textbox and print it on the lable then you have to pass the parameter.

    Thanks
    Phaneendra
    0
  • Avatar
    Legacy Poster
    Hi,
    I have an idea but i'm not sure will it works out well or not but, you write a coustom query here and access the textbox value by passing the parameter to the label.

    Thanks,
    Phaneendra
    0
  • Avatar
    Legacy Poster
    Do this in your code part,

    Dim btEngine As New Engine()
    btEngine.Start()
    Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("c:\LabelName.btw")

    ' Set the QueryPrompt

    btFormat.DatabaseConnections.QueryPrompts("UserName").Value = "cojayar"

    ' Print the label format

    Dim result As Result = btFormat.Print()

    Try to make an UserName field in your table, hope it will be usefull.

    Thanks,
    Phaneendra
    0
  • Avatar
    Shotaro Ito
    Hi Cojayar,

    On BarTender Label format, create a text and select datasource as VB Script (MultiLine).

    Set code as below:
    [code]
    Value = Application.SystemUserName
    [/code]
    Note that this only show user name, not domain name.

    and Thanks for Cool code sample, Phaneendra!
    0
  • Avatar
    Legacy Poster
    [quote name='Shotaro I -Seagull Support' timestamp='1324285982' post='1366']
    Hi Cojayar,

    On BarTender Label format, create a text and select datasource as VB Script (MultiLine).

    Set code as below:
    [code]
    Value = Application.SystemUserName
    [/code]
    Note that this only show user name, not domain name.

    and Thanks for Cool code sample, Phaneendra!
    [/quote]
    What if you would like to lookup the user's name in a database table based on the value of SystemUserName and then have that name print on the label along with the location (for example) of the user which would also be in a column of the database table?
    0
  • Avatar
    Legacy Poster
    [quote name='Shotaro I -Seagull Support' timestamp='1324285982' post='1366']
    Hi Cojayar,

    On BarTender Label format, create a text and select datasource as VB Script (MultiLine).

    Set code as below:
    [code]
    Value = Application.SystemUserName
    [/code]
    Note that this only show user name, not domain name.

    and Thanks for Cool code sample, Phaneendra!
    [/quote]
    What if you would like to lookup the user's name in a database table based on the value of SystemUserName and then have that name print on the label along with the location (for example) of the user which would also be in a column of the database table?
    0
  • Avatar
    Shotaro Ito
    [quote name='Craig McD' timestamp='1339693512' post='2623']
    What if you would like to lookup the user's name in a database table based on the value of SystemUserName and then have that name print on the label along with the location (for example) of the user which would also be in a column of the database table?
    [/quote]
    One idea is pull value from your own database connection by VB Script - after got an user name by script, query database by the user name.
    About how to get database value by VB Script, [url="http://seagullscientific.invisionzone.com/index.php?/topic/608-serial-number-with-letters-and-numbers-from-excel/page__p__1727__hl__adodb.recordset__fromsearch__1#entry1727"]This post[/url] might helps.
    0

Vous devez vous connecter pour laisser un commentaire.