Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing the data in Crystal Reports from a ADO record
Message
From
23/05/2002 03:01:00
 
 
To
22/05/2002 11:23:19
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00659912
Message ID:
00660294
Views:
17
I'm using COM-objects for both Crystal Reports and ADO RecordSets. Here is the code the loads the ADO RecordSet into Crystal:
FUNCTION SetDataSource
LPARAMETERS lnPosition
LOCAL llRetValue, lnCount, i

lnCount 	= THIS.oReport.Database.Tables.Count
llRetValue	= .F.

IF VARTYPE(lnPosition) = 'N' AND BETWEEN(lnPosition, 1, ALEN(THIS.aRecordSet, 1)) AND VARTYPE(THIS.aRecordSet[lnPosition]) = 'O'
	llRetValue	= .T.
	FOR i = 1 TO lnCount
		THIS.oReport.Database.Tables.Item(i).SetDataSource(THIS.aRecordSet[lnPosition])
	ENDFOR
ENDIF

RETURN llRetValue
ENDFUNC
>What integration method are you using?
>
>>I have a problem with Crystal Reports and ADO RecordSets, the first recordset I submit to a report is correctly shown when printed or previewed. But if I do some changes and submits the new recordset, the report is not updated with the new data, instead it shows the old data.
>>
>>What I found out in the Preview control is a Refresh button, if I press this button I get the latest recordset. But how do I do a refresh in code?
>>
>>Thanks in advance!
---( Mårten Törnquist )---
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform