Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing the data in Crystal Reports from a ADO record
Message
De
23/05/2002 03:01:00
 
 
À
22/05/2002 11:23:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00659912
Message ID:
00660294
Vues:
20
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 )---
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform