Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want Summary Band at bottom of page.
Message
From
11/09/2008 12:39:04
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345297
Message ID:
01346692
Views:
66
WOW! That's looks simple and exactly what I want to achieve. I can't to get some time to test it it,.

So all I need to do is set nSummaryHeight to the height that my summary band is, and it will work in one pass? I already have a multi-pass solution, and I am really wanting to avoid even 2 passes.



>Hi Matt,
>
>> It sounds complicated, but I'll see if I can find some code samples.
>
>It's not. Here's a sample that prints the summary band at the end of the page. You need to change the value for nSummaryHeight to specify how far down from the button of the page the summary band should start.You could get these values automatically by using two passes and recording the positions and dimensions of the summary band in the first pass.
>
>ox = CreateObject("Demo")
>ox.ListenerType = 1
>Report Form test object ox
>
>Define Class demo as ReportListener
>	lInSummary = .F.
>	nSummaryHeight = 600 && 960th inch
>	nSummaryStart = NULL
>
>Procedure BeforeBand( nBandObjCode, nFRXRecNo	)
>	This.lInSummary = nBandObjCode = 8
>	This.nSummaryStart = NULL
>EndProc
>
>Procedure AfterBand( nBandObjCode, nFRXRecNo	)
>	This.lInSummary = .F.
>EndProc
>
>Procedure render(nFRXRecNo,nLeft,nTop,nWidth,nHeight,;
>	nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
>	Local lnNewTop
>	If This.lInSummary
>		If IsNull(This.nSummaryStart)
>			This.nSummaryStart = m.nTop
>		EndIf
>		lnNewTop = m.nTop - This.nSummaryStart + ;
>			This.GetPageHeight() - This.nSummaryHeight
>		DoDefault( nFRXRecNo, nLeft, m.lnNewTop, nWidth,nHeight,;
>			nObjectContinuationType, cContentsToBeRendered, GDIPlusImage ;
>		)
>		NoDefault
>	EndIf
>EndProc                        
>
>EndDefine 
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform