Use Barlib on Treport

Use Barlib on Treport

Postby Silvio.Falconi » Tue Jan 24, 2017 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6834
Joined: Thu Oct 18, 2012 7:17 pm

Re: Use Barlib on Treport

Postby Enrico Maria Giordano » Tue Jan 24, 2017 1:28 pm

Just use

Code: Select all  Expand view
OF oRpt:oDevice


instead of

Code: Select all  Expand view
OF oPrn


in the barlib commands.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use Barlib on Treport

Postby Silvio.Falconi » Wed Jan 25, 2017 1: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6834
Joined: Thu Oct 18, 2012 7:17 pm

Re: Use Barlib on Treport

Postby Enrico Maria Giordano » Wed Jan 25, 2017 2:01 pm

Use something like this:

Code: Select all  Expand view
@ nRow, nCol EAN13 cCod;
             OF oRpt:oDevice;
             WIDTH 0.035;
             SIZE 0.8;
             BANNER


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use Barlib on Treport

Postby Silvio.Falconi » Wed Jan 25, 2017 2: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6834
Joined: Thu Oct 18, 2012 7:17 pm

Re: Use Barlib on Treport

Postby Enrico Maria Giordano » Wed Jan 25, 2017 2:37 pm

Use the following values for nRow and nCol (or something similar):

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


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use Barlib on Treport

Postby Silvio.Falconi » Wed Jan 25, 2017 3:11 pm

Sorry
I have
Code: Select all  Expand view
#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6834
Joined: Thu Oct 18, 2012 7:17 pm

Re: Use Barlib on Treport

Postby Enrico Maria Giordano » Wed Jan 25, 2017 5: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
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use Barlib on Treport

Postby Silvio.Falconi » Wed Jan 25, 2017 6: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

Image

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6834
Joined: Thu Oct 18, 2012 7:17 pm

Re: Use Barlib on Treport

Postby Enrico Maria Giordano » Wed Jan 25, 2017 6:34 pm

I already gave you all the infos you need.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 26 guests