Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing the data in Crystal Reports from a ADO record
Message
From
01/10/2002 11:43:34
 
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00659912
Message ID:
00706403
Views:
16
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform