In the report designer, uncheck Files | Save Data With Report.
Then, save your report again.
>Okay. I have tried this and the report is still coming up with the data it was created from. Any ideas on what I have not done correct.
>
>Here is the code I am running:
>
>with thisform
> .oCrystalReports = createobject("CrystalRuntime.Application")
> .oReport = .oCrystalReports.OpenReport( m.pcReport )
>
> for each dbtable in .oReport.database.tables
> dbtable.setlogoninfo( "NewDSN" )
> next
>
> .oReport.ReadRecords()
>
> .addobject("oleCRViewer", "oleControl", "crViewer.crViewer")
>
> with .oleCRViewer
> * set report viewer properties
> .top = 1
> .left = 1
> .height = thisform.height - 2
> .width = thisform.width - 2
>
> .ReportSource = thisform.oReport
> .ViewReport()
> endwith
>endwith
>
>
>Thanks.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer