Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using SetDataSource

Status
Not open for further replies.

TysonLPrice

Programmer
Jan 8, 2003
859
US
Hi all,

I'm having a problem using Crystal 8.0 and Visual Basic 6.0. I'm selecting my data into a recordset but the Crystal continues to use the data from the database I used to design it before I imported it into the project. I can't seem to make it stop going to the database.

I populate a recordset called rsTempRecordSet.

Then I use:

If (CR_CustomReport.HasSavedData) Then
CR_CustomReport.DiscardSavedData
End If

Then I use:

CR_CustomReport.Database.SetDataSource rsTempRecordSet

It still uses the database though. Any suggestions.

 
Verify that the fields/datatypes in the recordset match exactly to the fields that are used by the report. If they aren't, then the report will usually either ignore the recordset (using its stored information about database/server location), or just display nothing.

It's been a while since I've used CR 8 vs. VB6, so I'm not even 100% sure you can send a recordset to a report that wasn't designed for it (i.e. using p2smon.dll - Active Data Driver - as the connectivity).

-dave
 
Well I did have a mis-match from the table I used to design the report and the table I was working with in SQL and I fixed that but it turned out I had the "Save data with report" option checked when I imported it into VB.

Thanks for trying to help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top