Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to refresh report preview container
Message
From
07/10/2005 10:32:58
 
 
To
06/10/2005 23:14:40
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01056320
Message ID:
01057181
Views:
22
>>>Mark -
>>>
>>>I am showing my report in the container control.
>>>When I change data and run report again data is not changed in report preview. How can I refresh the preview container?

>>>
>>>Without more information I don't know what your problem might be. If you are doing a custom report preview UI then its a little tricky but once you get the hang of it, it's fine.
>>>
>>>Have you read my article on building a custom report preview? If you work through that example perhaps you can see what you need to do in your own code.
>>>
>>>- Colin
>>I looked into your article but dont see how to refresh the preview container.
>
>Dear Mark
>
>You can refresh your preview container as follows:
>
>OutputPage Method
>
>LPARAMETERS nPageNo, eDevice, nDeviceType, nLeft, nTop, nWidth, nHeight, nClipLeft, nClipTop, nClipWidth, nClipHeight
>
>with THIS
>if not isnull(.Listener) and .Listener.PageTotal > 0
>
>    .Listener.OutputPage( ;
>        .PageNo, .Frame.Canvas, 2, ;
>        0, 0 , 0 , 0 , ;
>        .Frame.Left   +2, ;
>        .Frame.Top    +2, ;
>        .Frame.Width  -4, ;
>        .Frame.Height -4 )
>
>	this.backCMD.Enabled = IIF(.listener.pagetotal<=1 or .listener.pageno = 1,.F.,.T.)
>	this.nextCMD.Enabled = IIF(.listener.pagetotal<=1 or .listener.pageno = .listener.pagetotal,.F.,.T.)
>
>endif
>endwith
>
>
>Next Page of the report
>
>with THISFORM
>	.PageNo = min(.Listener.PageTotal,.PageNo+1)
>	.OutputPage()
>	.caption = LEFT(ALLTRIM(.caption),AT('- Page',ALLTRIM(.caption))+6)+TRANSFORM(.pageno)+' of '+TRANSFORM(.listener.pagetotal)
>endwith
>
>
>All of these are originated from Colin. I think you should take more time to look into his code... however, i still wait how to output to printer, rather than the container... :D

But let me ask you this.
*!* Data condition #1
REPORT FORM (tcReport) OBJECT .poListener NOCONSOLE
*!* Data condition #2
REPORT FORM (tcReport) OBJECT .poListener NOCONSOLE
When I run report preview for the second time why I dont see data changes?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform