Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing the data in Crystal Reports from a ADO record
Message
De
24/05/2002 03:00:02
 
 
À
23/05/2002 08:40:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00659912
Message ID:
00660900
Vues:
21
Hi,

THIS.oReport.DiscardSavedData() did the trick, Thank you!

>Before you load the new data, try:
>
>
>IF This.oReport.HasSavedData
>  This.oReport.DiscardSavedData()
>ENDIF
>
>
>
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform