FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oBrw:report() how can you control fonts etc. in the print.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
oBrw:report() how can you control fonts etc. in the print.
Posted: Thu Sep 04, 2008 04:03 PM

NageswaraRao,

>The contents of oRep:aFont are not just pointers to the font objects provided by us.

OK, I see what you mean. In that case I think we need to end both font objects.

oFont:end()
oRep:aFont[ 1 ]:End()
DEFINE FONT oFont NAME 'ARIAL NARROW' SIZE 0,-9 OF oRep:oDevice
oRep:aFont[ 1 ] := oFont

And, as you stated before, the we need to add oBold:end() to the end of the txbrowse:Report method.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
oBrw:report() how can you control fonts etc. in the print.
Posted: Thu Sep 04, 2008 04:13 PM

>
oFont:end()
?
where from are you getting thsi oFont?

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
oBrw:report() how can you control fonts etc. in the print.
Posted: Thu Sep 04, 2008 06:38 PM
NageswaraRao,

Well, I admit I was a bit confused by your code:

  DEFINE BUTTON OF oBar PROMPT 'Print' ; 
      ACTION oBrw:Report( 'TestReport', , , ; 
      { |oRep, oBrw, oFont| MySetUp( oRep, oBrw, @oPrnFont ) } )


You specified oFont as the third parameter to be passed to the codeblock, but txbrowse only passes oRep and self (oBrw), so you can't pass oFont.

I thought that you were passing the oFont from the Report method and then defining it again. This would have increased the font object counter by one more, and oFont:end() would have only been called once.

Since I was mistaken, you don't need to call oFont:end(), but your code should read:

{ |oRep, oBrw| MySetUp( oRep, oBrw, @oPrnFont ) } )

You code as is, works, but the oFont parameter is not of any value and is confusing.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
oBrw:report() how can you control fonts etc. in the print.
Posted: Fri Sep 05, 2008 12:42 AM

Yes. You are right. Thanks

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion