Bartender 10: Label Design Containing Columns From Several Records To Be Retrieved From Oracle Db Won't Print Correctly 追蹤

0
Avatar
Legacy Poster

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:

[code]
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
[/code]

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):

[code]
saveValue = Value
Value = Field("R_LABELS.LFDNR")
If Value = 1 Then
Value = Field("R_LABELS.MAT_BEZEICHNUNG")
Else
Value = saveValue
End If
[/code]


Any idea to get a solution would be highly appreciated!

:-) Bernhard

3 意見

0
Avatar
Domingo Rodriguez
版主
評論操作 永久連結

From your question, it seems that you're after printing data from multiple records from your database, something which is not directly supported in BarTender.

There is a concept in our world of “multiple records per page/label” and as well ”Multiple Pages Documents”. This is generally the world of forms/reports. So, an application like Crystal Reports is set up to do this kind of multiple records per page printing. BarTender was originally not set up for this world. We may well add this functionality in the future, but it is difficult, because we would then get into some rather deep page dimension issues (variable length pages), how to graphically handle the header versus the body versus the footer, etc.

1.- At the moment we don’t support such a thing directly, but it can be achieved through the use of a VB script to data source a paragraph text object with your record data. As it happens we recently had such a question on our forum and one of the forum members created an example which you can modify for your own needs.

http://seagullscientific.invisionzone.com/index.php?/topic/73-designing-labels-with-1many-relationships/


2.- We also have a small ActiveX sample which is kind of similar, but this time automating BarTender externally. This sample will help you to indirectly support "Multiple Records per Label + headers and footers (if requested)" on your label / page.

If you're interested in this example, you can contact our technical support department via Email at http://www.seagullscientific.com/aspx/technical-support.aspx#contact and make reference to this forum question.
0
Avatar
Legacy Poster
評論操作 永久連結

Hello Domingo,
thank you very much for your reply. I was out of office for some days but I'll test the proposed vba method in the next days and let you know.
:-) Bernhard
0
Avatar
Legacy Poster
評論操作 永久連結

Hello again,
meanwhile I found another solution. I defined a "flat" oracle view which is designed for max amount of table records. This view will be used instead of the oracle table to get my data. Important: as the view collects data from the table, BOTH of them must be defined in the ODBC database connection settings.

Nevertheless another problem showed up. Unfortunately there may be more record content to be printed than there is space on one label. That means the surplus data fields must be printed on one or even two subsequent labels. How could I achive this ? Is there a way to use VBscripting to keep track of the already printed data and send a kind of FormFeed to the printer?

Thanks for your help!

:-) Bernhard

登入寫評論。