Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing the data in Crystal Reports from a ADO record
Message
De
01/10/2002 11:43:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00659912
Message ID:
00706403
Vues:
21
Bernhart,

Here's the code I use. In this case, I'm using DBFs for the data, but it should help. In my case, all the subreports are in the ReportFooter.
	PROTECTED PROCEDURE SetSubReportTables(tcHeaderDBF AS String) AS VOID
		LOCAL loAreas, loRF, loSections, loSection, loObject, ;
					loSubRpt, loCrData, loCrTables, loCrTable, loRO
		
	  * Get a reference to the Areas collection
	  loAreas = This.oReport.Areas() 
	  
	  * Get a reference to the Report Footer
	  loRF = loAreas.Item("RF")
	  
	  * Get a reference to the sections collection
	  loSections = loRF.Sections()
	  FOR EACH loSection IN loSections
	  	* Get a reference to the Report Objects collection
	    loRO = loSection.ReportObjects()
	    FOR EACH loObject IN loRO
	      IF loObject.Kind = 5
	      	* This object is a subreport (Kind = 5)
	        loSubRpt = loObject.OpenSubreport()
	        loCrData = loSubRpt.Database()
	        loCrTables = loCrData.Tables
	        loCrTable = loCrTables.Item(1)
	        loCrTable.Location = tcHeaderDBF
	        * Verify the database
	        loCRData.Verify()
	      ENDIF
	    ENDFOR
	  ENDFOR
	ENDPROC
>Hi craig,
>
>How then I to connect several views of a MainReport also containing a subreport containing several views ?
>( ADO connection )
>Thanks In advance craig
>
>bernhart
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform