Report Margins

Report Margins

Postby Silvio.Falconi » Sun Dec 24, 2017 8:08 pm

How set and draw margins into Rpreview ?
I wish have the vertical and Hozintal lines into rpreview
How we can draw it ?
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby ukoenig » Sat Dec 30, 2017 10:17 pm

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Report Margins

Postby Silvio.Falconi » Sun Dec 31, 2017 5:40 pm

Uwe,
I not seen margins lines on Report preview
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby Otto » Sun Dec 31, 2017 6:01 pm

Hello Silvio,
please can you post a screenshot of what you want.
Preview is an object. You can paint lines on it.
But I am not sure what you exactly need.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Report Margins

Postby Silvio.Falconi » Sun Dec 31, 2017 6:04 pm

I Mean to draw dotted lines as this test

Code: Select all  Expand view
#include <FiveWin.ch>
#include <Report.ch>
//test to draw lines margins

request DBFCDX

Function Test()
Local oReport
  LOCAL oPen1, oPen2

     DEFINE PEN oPen1 WIDTH 1
     DEFINE PEN oPen2 WIDTH 2

USE TEST NEW VIA "DBFCDX"

     REPORT oReport TITLE  "*** My First Report ***" PREVIEW ;
      PEN oPen1, oPen2

     COLUMN TITLE "St"         DATA Test->State
     COLUMN TITLE "First Name" DATA Test->First
     COLUMN TITLE "   Salary"  DATA Test->Salary

     END REPORT

      oReport:CellView()



    ACTIVATE REPORT oReport ;
    ON STARTPAGE  LinBox(oReport)


      CLOSE TEST
return nil
//------------------------------------------------------//



STATIC Function LinBox(oReport)

     LOCAL nInchWidth, nInchHeight


     nInchWidth  := oReport:PhyWidth(RPT_INCHES)
     nInchHeight := oReport:PhyHeight(RPT_INCHES)

     oReport:Box(.1                ,;            // nRow
                 .1                ,;            // nCol
                 nInchHeight-.1    ,;            // nBottom
                 nInchWidth-.1     ,;            // nRight
                 1       ,;                      // first pen created
                 RPT_INCHES)




RETURN NIL
 

this test use report class and draw line taking pen definitions from report class
but I need draw 4 lines ( 2 vertical and 2 Horizontal) dotted and it must be set from a menu fron RPreview for all print class ( report and print)
Any solution ?
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby Otto » Sun Dec 31, 2017 7:04 pm

Silvio,
this is the Report of your program. Where do you need the margines?
Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Report Margins

Postby Silvio.Falconi » Sun Dec 31, 2017 10:19 pm

sorry but you d see a box arround of apage

Image
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby ukoenig » Sun Dec 31, 2017 11:53 pm

Now I understand what You mean
a painted box as a border

Using pen 2 for lines I got a error, using pen 1 works.
I added 2 lines to the box as a test. One at left and one at bottom.

Image

Code: Select all  Expand view

FUNCTION MAIN()
LOCAL oReport, oPen[2]

DEFINE PEN oPen[1] WIDTH 3
DEFINE PEN oPen[2] WIDTH 2

USE TEST NEW VIA "DBFCDX"

REPORT oReport TITLE  "*** My First Report ***" PREVIEW PEN oPen[1], oPen[2]

    COLUMN TITLE "St"           DATA Test->State
    COLUMN TITLE "First Name"   DATA Test->First
    COLUMN TITLE "   Salary"        DATA Test->Salary

    END REPORT

    oReport:CellView()

ACTIVATE REPORT oReport ;
ON STARTPAGE LINBOX(oReport)

CLOSE TEST

RETURN NIL

// -------------

STATIC FUNCTION LINBOX(oReport)
LOCAL nInchWidth, nInchHeight

nInchWidth  := oReport:PhyWidth(RPT_INCHES)
nInchHeight := oReport:PhyHeight(RPT_INCHES)

oReport:Box( 0.3 ,;         // top
                    1.0  ,;         // left
                    nInchHeight -.3 ,;   // Bottom
                    nInchWidth  -.3 ,;   // Right
                    1       ,;          // first pen created
                    RPT_INCHES )

// vertical line
oReport:Line( 0.3    ,;                  // nTop
                     0.9   ,;                   // nLeft
                     nInchHeight -.2 ,;    // nBottom
                     0.9   ,;                   // nRight
                     2      ,;                   // second pen created
                     RPT_INCHES )

// horizontal line
// horizontal line
oReport:Line( nInchHeight -.2 ,;    // nTop
                     0.9   ,;                   // nLeft
                     nInchHeight -.2 ,;  // nBottom
                     nInchWidth  -.3 ,;    // nRight
                     2      ,;                   // second pen created
                     RPT_INCHES )

RETURN NIL
 


regards
Uwe :D
Last edited by ukoenig on Mon Jan 01, 2018 9:45 am, edited 3 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Report Margins

Postby Enrico Maria Giordano » Mon Jan 01, 2018 8:12 am

ukoenig wrote:Using pen 2 for lines I got a error, using pen 1 works.


Code: Select all  Expand view
REPORT oReport TITLE  "*** My First Report ***" PREVIEW PEN oPen[1], oPen[2]


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

Re: Report Margins

Postby ukoenig » Mon Jan 01, 2018 9:38 am

Enrico,

thank You it is working now ( using 2 pensizes ).
I updated the example shown above.

Image

happy new year :D

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Report Margins

Postby Silvio.Falconi » Mon Jan 01, 2018 10:51 am

but it is not that I searching
the lines must be dotted and it must run on Report class and printer class only on Rpreview . the user can show it from rpreview menu or not
I hope someone understand the problem ( do you use winword ?)
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby Enrico Maria Giordano » Mon Jan 01, 2018 11:11 am

If you want to change the report left margin then try this:

Code: Select all  Expand view
oReport:Margin( nNewValue, RPT_LEFT, RPT_CMETERS )


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

Re: Report Margins

Postby Silvio.Falconi » Mon Jan 01, 2018 11:17 am

and on printer 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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report Margins

Postby ukoenig » Mon Jan 01, 2018 11:19 am

I tested changing the STYLE expecting maybe to show lines dotted
but there are only solid lines, COLOR works

DEFINE PEN oPen[1] STYLE 0 WIDTH 3 COLOR CLR_RED
DEFINE PEN oPen[2] STYLE 1 WIDTH 2 COLOR CLR_BLUE

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Report Margins

Postby Enrico Maria Giordano » Mon Jan 01, 2018 11:24 am

Silvio.Falconi wrote:and on printer class ?


TPrinter has no margins. You have to change the print column.

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 106 guests