Get Databasefield Value Follow

0
Avatar
Legacy Poster

Hi there,

 

I have problems to get an DataBaseField value.

I want to set this Value on a Label in my program.The SetSubString Method is good, but I need something like GETSUBSTRING.

 Artikel = textBoxArtikel.Text;
            anzahl = Convert.ToInt32(textBoxStueckzahl.Text);
            using (Engine btEngine = new Engine())
            {
                btEngine.Start();
                LabelFormatDocument btFormat = btEngine.Documents.Open("C://Users//Carsten//Desktop//MarcoPolo38x68.btw");
                btFormat.DatabaseConnections.QueryPrompts["Abfrage-Eingabe1"].Value = Artikel;              
                LABEL.TEXT= ?????????
                btFormat.PrintSetup.IdenticalCopiesOfLabel = anzahl;
                comboBoxDrucker.SelectedItem = btFormat.PrintSetup.PrinterName;
                btFormat.Print();

 

4 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

You use the .Value property of the SubString class.

 

LABEL.TEXT = btFormat.SubStrings("SubString1").Value
0
Avatar
Legacy Poster
Comment actions Permalink

it is not working. The Compiler said:

"Fehler1 Der nicht aufrufbare Member "Seagull.BarTender.Print.LabelFormat.SubStrings" kann nicht wie eine Methode verwendet werden.    C:\Users\Carsten\documents\visual studio 2010\Projects\LabelPrint\LabelPrint\Form1.cs    62    40    LabelPrint"
 

this can not be used like an Method.

 

regards Carsten B

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

As you seem to be using C#.Net use the following instead:

 

  1.  
    1. LABEL.TEXT = btFormat.SubStrings["SubString1"].Value

     

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

Opps, yes you're using C#.  Sorry I missed that as I gave you the VB.NET equivalent.

Please sign in to leave a comment.