
Crystal 7.0 & MSS 7.0 stored procedures
Hi!
You can change the sp location dynamically by doing the following
1. crTestiRapsa.ReportFileName = "W:\Wallstreet\sp_rTiliote.rpt"
2.crTestiRapsa.Connect = goADOCN
3. crTestiRapsa.DataFiles(0) = "WintraderTesti.dbo.spWS_repTiliote"
where
2. goADOCN is a global ADO connection object which is open and active
3. This method tells the cr object where the sp is, basically you can
use this syntax on any legal object on sql
cr.datafile(<index>)="DBNAME.OWNER.OBJECTNAME"
At least it did it for me I am now able to change my reporting database
and sp on fly when ever needed.
ps. If you are using sp_s you can avoid the awkward cr datehandling by
sending the date parameter to the sp as char(8) string and
doing whatever you like with it at the db level.
Quote:
> All,
> We are developing an application using VB 6.0,
> Crystal Reports 7.0 and MS SQL Server 7.0. All
> of our reports are tied to MSS via stored
> procedures using the native SQL Server driver.
> Our application can access one of three databases
> depending on where they are located. The reports
> need to be executed on whichever db they are
> connected to. How can we dynamically set the
> database name for these reports ?
> Scott.....
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
--
To reply to me remove the NoSpam from my address
All opinions on this message are mine and mine alone'