4670 Barcodes in Fastreport » Historie » Version 2
[X] Marcus F, 21.06.2023 11:54
| 1 | 1 | [S] Philipp K | h1. 4670 Barcodes in Fastreport |
|---|---|---|---|
| 2 | |||
| 3 | 2 | [X] Marcus F | h2. Verwendung |
| 4 | |||
| 5 | * in Standard ABK Druck |
||
| 6 | * im Zentraldokument |
||
| 7 | |||
| 8 | h2. Funktion zur Steuerung des Barcodes |
||
| 9 | |||
| 10 | 1 | [S] Philipp K | <pre><code class="sql"> |
| 11 | CREATE OR REPLACE FUNCTION treporting.barcode_type() RETURNS INTEGER AS $$ |
||
| 12 | BEGIN |
||
| 13 | /*In Fastreport ist bartype ein INTEGER |
||
| 14 | bcCode128 = 5 |
||
| 15 | bcCode39 = 3 |
||
| 16 | */ |
||
| 17 | RETURN CASE WHEN (prodatversion()).versionstring > '18.04.01' THEN 5 ELSE 3 END; |
||
| 18 | |||
| 19 | END $$ LANGUAGE plpgsql; |
||
| 20 | |||
| 21 | SELECT treporting.barcode_type(); |
||
| 22 | </code></pre> |
||
| 23 | |||
| 24 | 2 | [X] Marcus F | h2. Im Report |
| 25 | |||
| 26 | * Im neuen Sub-Sql Settings |
||
| 27 | 1 | [S] Philipp K | <pre><code class="sql"> |
| 28 | SELECT |
||
| 29 | treporting.barcode_type() AS bartype -- Zur Barcodesteuerung als Integer: |
||
| 30 | </code></pre> |
||
| 31 | |||
| 32 | 2 | [X] Marcus F | * Im Report, je nach dem wieviele Barcodes enthalten sind |
| 33 | 1 | [S] Philipp K | <pre><code class="delphi"> |
| 34 | procedure BarCode1OnBeforePrint(Sender: TfrxComponent); |
||
| 35 | begin |
||
| 36 | barcode1.bartype:=<settings."bartype">; |
||
| 37 | barcode2.bartype:=<settings."bartype">; |
||
| 38 | barcode3.bartype:=<settings."bartype">; |
||
| 39 | end; |
||
| 40 | </code></pre> |