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
oBrw:report() how can you control fonts etc. in the print.
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
NageswaraRao,
Well, I admit I was a bit confused by your code:
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
Well, I admit I was a bit confused by your code:
Code: Select all | Expand
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
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact: