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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmatically setting data source using "Database File"

Status
Not open for further replies.

huckfinn19

Programmer
May 16, 2003
90
CA
Hi, I'm using a C++ crystal report viewer to view my reports...

At first, with CR 8.5 I was using file DSN as my database source for ".csv" source files. To change the source of my files programmaticaly in my viewer, I just had to call :

m_Report->Database->Tables->GetItem(i+1)->
SetTableLocation(NewLocation.AllocSysString(),"","");

NewLocation being something like :
c:\wrk\newsource.csv
and everything worked fine.

Now, I am using CR 9 and I'd like to do the same with the "Database File" type in Crystal Report. Still with .csv source files. I thought the function call would be the same, but its not working. I also tried

m_Report->Database->Tables->GetItem(i+1)->
SetTableLocation(NewPath.AllocSysString
() ,NewLocation.AllocSysString(),"");

ans it still isn't working... Any ideas?

Thanks

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top