![]() |
AW: FastReport Barcode
Zitat:
|
AW: FastReport Barcode
Zitat:
|
AW: FastReport Barcode
Jap da stimm ich dem oben zu.. also kanns am Barcodetyp nicht liegen, zudem hab ich einige andere auch ausprobiert und es kommt trotzdem der Fehler.
|
AW: FastReport Barcode
Hallo,
folgend ein Ausschnitt aus der Fastreport-Doku. Vielleicht hilfts:
Delphi-Quellcode:
Modifying the variable’s value
There are two ways to modify the value of a variable: frxReport1.Variables['My Variable 2'] := 10; or var Index: Integer; Variable: TfrxVariable; { search for the variable } Index := frxReport1.Variables.IndexOf('My Variable 2'); { if it is found, change a value } if Index <> -1 then begin Variable := frxReport1.Variables.Items[Index]; Variable.Value := 10; end; It should be noted, that when accessing a report variable its value is calculated if it is of string type. That means the variable which value is 'Table1."Field1"' will return a value of a DB field, but not the 'Table1."Field1"' string. You should be careful when assigning a string-type values to report variables. For example, the next code will raise exception "unknown variable 'test'" when running a report: frxReport1.Variables['My Variable'] := 'test'; because FastReport trying to calculate a value of such variable. The right way to pass a string values is: frxReport1.Variables['My Variable'] := '''' + 'test' + ''''; In this case the variable value - string 'test' will be shown without errors. But keep in mind that: - string should not contain single quotes. All single quotes must be doubled; - string should not contain #13#10 symbols. In some cases it is easier to pass variables using a script. |
AW: FastReport Barcode
Zitat:
Zitat:
|
AW: FastReport Barcode
Habs probiert aber er schreibt mir trotzdem Fehlerhafter Ausdruck...
hmm bei reinen Ziffern gehts nur wenn ich einen Buchstaben drinnen habe nicht. :( |
AW: FastReport Barcode
Ganz Dumm gefragt, hast Du Deine verwendete Variable varBarCode nur so in die Barcode-Komponente reingeschrieben oder im Report richtig deklariert und in der Barcode-Komponente ausgewählt. Hänge doch mal Deinen Fast-Report dran, wenn es nichts geheimes ist.
|
AW: FastReport Barcode
:zwinker: Beitrag #7
Zitat:
|
AW: FastReport Barcode
So hab das Problem gelöst, ich hab nicht so genau geschaut, da mein Report einiges an inhalt gehabt hat und ich den Barcode den ich übermittelt habe auch in ein Memofeld geschrieben habe und dort ist der Fehler dann auch erschienen.
Aber jetzt habe ich alle übergebenen Variablen mit ''''+Variable+'''' umprogrammiert. Danke für eure Hilfe. |
AW: FastReport Barcode
Zitat:
![]() Ok, es gibt einen, denn unter bestimmten Umständen bekommst du mit deiner Variante wieder einen Fehler. Deine Variante:
Code:
Mit QuotedStr
Test's => 'Test's'
Code:
Test's => 'Test''s'
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:23 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz