FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Use Barlib on Treport
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Use Barlib on Treport
Posted: Tue Jan 24, 2017 09:39 AM

How we can use Barlib function on a Report ? ( Treport class) ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use Barlib on Treport
Posted: Tue Jan 24, 2017 01:28 PM
Just use

Code (fw): Select all Collapse
OF oRpt:oDevice


instead of

Code (fw): Select all Collapse
OF oPrn


in the barlib commands.

EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 01:53 PM

I not Understood
Can you make a minimal sample Please ?

I mean to modify satdata method of Pdreport.prg and Insert ( as the parameter IMAGE or GRAPHICS) the parameters BARCODE to print barcode on line on each record
sample :


cod. descr barcode

oo1 product1 |||||||||||

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 02:01 PM
Use something like this:

Code (fw): Select all Collapse
@ nRow, nCol EAN13 cCod;
             OF oRpt:oDevice;
             WIDTH 0.035;
             SIZE 0.8;
             BANNER


EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 02:05 PM
Sorry I have a report command with columns where I must use that line you wrote

sample :

#include "FiveWin.ch"
#include "report.ch"

STATIC oReport

Function Rep06()

USE articoli NEW VIA "DBFCDX"

REPORT oReport TITLE "*** My First Report ***" ;
CAPTION "The Firm - Salary Report" ;
PREVIEW

COLUMN TITLE "cod" DATA Test->cod
COLUMN TITLE "desc" DATA Test->desc
COLUMN TITLE "Barcode" DATA ??????????


END REPORT

ACTIVATE REPORT oReport

CLOSE TEST

RETURN NIL




I mean to modify METHOD SayData(nRow, nCol, nLine) CLASS TRColumn and insert BARCODE parameter
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 02:37 PM
Use the following values for nRow and nCol (or something similar):

Code (fw): Select all Collapse
nRow = oRpt:nRow - oRpt:nStdLineHeight + oRpt:nStdLineHeight / 2
nCol = oRpt:oDevice:nHorzRes() / 5


EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 03:11 PM
Sorry
I have
Code (fw): Select all Collapse
#xcommand COLUMN [ <oRptCol> ] ;
                [ TITLE <bTitle, ...> ] ;
                [ AT <nCol> ] ;
                [ DATA <bData, ...> ] ;
                [ SIZE <nSize> ] ;
                [ <pict: PICT, PICTURE> <cPicture, ...> ] ;
                [ FONT <uFont> ] ;
                [ [ <lCum: CUMULATIVE> ] <total: TOTAL> [ FOR <bTotalExpr> ]  ] ;
                [ <ColFmt:LEFT,CENTER,CENTERED,RIGHT> ] ;
                [ <lShadow:SHADOW> ] ;
                [ <lGrid:GRID> [ <nPen> ] ] ;
                [ <memo: MEMO, MULTILINE> ] ;
                [<img:IMAGE> [ IMGDATA <bimg> ] [HEIGHT <h> [<imgpix:PIXEL>] ] [ ALPHALEVEL <nAlpha>] ] ;
                [ [<styl:LINE,BAR>] CHARTDATA <chdata> [HEIGHT <h2> [<chtpix:PIXEL>] ] ;
                [ MAXVAL <chtmax>] [COLOR <clr,...>] ] ;
                [ <valign:TOP,VCENTER,BOTTOM> ] ;
        => ;
         [ <oRptCol> := ] RptAddColumn( {<{bTitle}>}, <nCol> ,;
                {<{bData}>}, <nSize>, {<cPicture>} ,;
                <{uFont}>, <.total.>, <{bTotalExpr}> ,;
                [UPPER(<(ColFmt)>)], <.lShadow.>, <.lGrid.>, <nPen>, <.memo.>, ;
                <.img.>, [<{bimg}>], [<h>], <.imgpix.>, [<nAlpha>], <.lCum.>, ;
                [<chdata>], [<h2>], <.chtpix.>, [<chtmax>], {<clr>}, [Upper(<(styl)>)], ;
                [ Upper( <(valign)> ) ] )



I wish add BARCODE STYLE EAN13 ( FOR A SAMPLE) ON FUNCTION RptAddColumn OF PDREPORT.PRG
lBarcode .t. or .f.
BarcStyle from 1 to 17 ( ean,code_3_9 ecc.)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 05:21 PM

You can't use COLUMN command to print barcodes. You have to use barlib commands instead, as I've tried to explain. You can freely mixed COLUMN and barlib commands.

EMG

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 06:25 PM
Please I explain you

If I use this command ( for a sample : )

COLUMN TITLE "Tipo" DATA "" SIZE 5 IMAGE IMGDATA aLabBitmap[IIF(MV->APTIPO="E",1,2) ] HEIGHT 1.2 ALPHALEVEL 128

I can print on column an Image with height and alpha style as you can see here



I wish print a barcode instead of Image on column
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use Barlib on Treport
Posted: Wed Jan 25, 2017 06:34 PM

I already gave you all the infos you need.

EMG

Continue the discussion