Bartender 10: Label Design Containing Columns From Several Records To Be Retrieved From Oracle Db Won't Print Correctly 追蹤
I have to adapt a label report designed with SAP crystal reports to Seagull BarTender. The report contains data that must be retrieved from 5 records in an oracle database table to be printed on one label in 5 subsequent lines.
The records all have the same ID (in field: BEWNR) and are distinguished by a counter (in field: LFDNR).
The problem: The 5 lines are printed with the same data, obviously stemming from one of the 5 database records
Here is the query I put together using SQL:
SELECT "MAT_BEZEICHNUNG", "BC_MAT_BEZEICHNUNG", "BREITE_CHAR", "PRESENTATION", "KUNDENNR", "WELD_COUNT" FROM "PES_IS"."R_LABELS" WHERE "BEWNR" = ?PARAMETER01_BewNr ORDER BY "LFDNR" ASC
Using sqlplus (and replacing the parameter field ?PARAMETER01_BewNr by a valid ID ) I get the 5 expected records.
I experimented with VB scripting trying to get the right field values according to the counter field but it didn't work. An example (OnProcessData):
saveValue = Value
Value = Field("R_LABELS.LFDNR")
If Value = 1 Then
Value = Field("R_LABELS.MAT_BEZEICHNUNG")
Value = saveValue
Any idea to get a solution would be highly appreciated!