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