Refreshing CR from VB 
Author Message
 Refreshing CR from VB

I have a VB program with code to launch a Crystal Report e.g.

frmReports.CrystalReport1.ReportFileName = "c:\Total.rpt"
frmReports.CrystalReport1.CopiesToPrinter = 1
frmReports.CrystalReport1.DataFiles(0) = "dbpath"
frmReports.CrystalReport1.Destination = 0
frmReports.CrystalReport1.Action = 1

The only problem with this code is that I am unable to refresh the
crystal report after new data is aded to the database.The old data
appears in the report. Is there a command that will force the report to
be refreshed each time it is generated.

Thanks

Kevin



Fri, 20 Aug 2004 15:46:27 GMT  
 Refreshing CR from VB
Hi Kevin,
    There is a "DiscardSavedData" property for the OCX that should be set to
True.  I think that this will force a refresh of the data.

Bob Holmes


Quote:
> I have a VB program with code to launch a crystal report e.g.

> frmReports.CrystalReport1.ReportFileName = "c:\Total.rpt"
> frmReports.CrystalReport1.CopiesToPrinter = 1
> frmReports.CrystalReport1.DataFiles(0) = "dbpath"
> frmReports.CrystalReport1.Destination = 0
> frmReports.CrystalReport1.Action = 1

> The only problem with this code is that I am unable to refresh the
> crystal report after new data is aded to the database.The old data
> appears in the report. Is there a command that will force the report to
> be refreshed each time it is generated.

> Thanks

> Kevin



Fri, 20 Aug 2004 20:49:55 GMT  
 Refreshing CR from VB
Thanks,

That works.

Kevin

Quote:

> Hi Kevin,
>     There is a "DiscardSavedData" property for the OCX that should be set to
> True.  I think that this will force a refresh of the data.

> Bob Holmes



> > I have a VB program with code to launch a crystal report e.g.

> > frmReports.CrystalReport1.ReportFileName = "c:\Total.rpt"
> > frmReports.CrystalReport1.CopiesToPrinter = 1
> > frmReports.CrystalReport1.DataFiles(0) = "dbpath"
> > frmReports.CrystalReport1.Destination = 0
> > frmReports.CrystalReport1.Action = 1

> > The only problem with this code is that I am unable to refresh the
> > crystal report after new data is aded to the database.The old data
> > appears in the report. Is there a command that will force the report to
> > be refreshed each time it is generated.

> > Thanks

> > Kevin



Fri, 20 Aug 2004 21:13:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CR Viewer In VB Refresh

2. Need help dynamically refreshing CR data reports in VB5

3. Data is not refreshed using CR 7

4. CR 7.0 form refresh problem

5. CR: Refresh data

6. VB 6.0 : CR 7.0 - [Cancel] CR

7. CR 8.5 and CR from VS.Net package

8. CR .Net or CR 9 Developer

9. Decimal Place problem after Upgrading from CR 6 to CR 8.5

10. CR 8 and CR 8.5

11. CR Enterprise 8.0 - Cannot login CR console

12. Download CR 6 or CR 7

 

 
Powered by phpBB® Forum Software