Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional title page on a report
Message
De
24/10/2001 13:47:57
 
 
À
24/10/2001 13:27:52
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00572248
Message ID:
00572775
Vues:
50
Dragan et al,

The solution that I've settled on is to hack a copy of the frx. No amount of experimenting resulted in satisfactory solution with report groups and headers.

When I started trying to hack the frx, I was trying to conditionally add the title page. This also produced very poor results. The solution was just the opposite: conditionally REMOVE/CHANGE items already in the frx. For those interested here is the code:
If lprintheader
	cHeadText=v_reports.titlepage
Else
	cHeadText=''
	* since user can preview and return, don't do this more than once!
	If lcRepName<>'temprpth'
		Local lcOldWorkArea
		lcOldWorkArea=Select()
		Sele 0
		* copy report
		Use (lcRepName)
		Copy To temprpth.frx
		Use temprpth.frx
		* fix page break
		Locate For objtype=9 And objcode=0
		IF FOUND()
			Replace pagebreak With .F.
		ELSE
			DEBUGOUT 'pagebreak not found in: '+lcrepname
		ENDIF
		Use
		Select (lcOldWorkArea)
		lcRepName='temprpth.frx'
	Endif
Endif
Report has title band with page break and "cHeadText" field that only displays when lprintheader=.t.

>Actually I think we're close... What I had in mind was to move the front page objects into group's header, and create yet another group inside this group with grouping on _pageno, and then moving the page header stuff into this group's header. Or should this group be the outer group? I'd probably get into several rounds of trial and error if I was doing this, but I've got a feeling we're really close.
Timothy D. Yeaney
MCSD, Charter Member
President, PAFOX (Potomac Area Fox User Group)
mailto:tim@eagleeyeinc.com
Vice President
Eagle Eye Publishers, Inc
Broaden Your Vision, Sharpen Your Focus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform