oBrw:report() how can you control fonts etc. in the print.

Postby James Bott » Thu Sep 04, 2008 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Thu Sep 04, 2008 4:13 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Thu Sep 04, 2008 6:38 pm

NageswaraRao,

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

Code: Select all  Expand view  RUN
  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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Fri Sep 05, 2008 12:42 am

Yes. You are right. Thanks
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests