Location 
Author Message
 Location

I have a report that uses a stored procedure on a SQL server source. I
change the Logon Info at runtime from my VB code to try and connect to the
desired database at run-time. Unfortunately crystal always connects to the
database used in the designer inspite of setting the logon info. In the
report I have got rid of the database prefix and retained just the stored
procedure name for Database Location.


Sat, 21 Aug 2004 01:44:02 GMT  
 Location
I'm also having trubble with this. The code below seems to work if (in
my case a big if) you use a report created in the RDC-designer. If you
got a .rpt file (change first row in code-example)   it doesn't seem
to work.

Is there something I'm missing here?

////////////////////////////
 'Set CRReport = CRapp.OpenReport(REPORT_PATH & "\Notes.rpt", 1)
    Set CRReport = New CR_Notes

    Set crxDatabase = CRReport.Database
    Set crxdatabaseTables = crxDatabase.Tables

    For Each crxdatabaseTable In crxdatabaseTables
        strServer = "ServerName"
        strDataBase = "DB"
        strUserName = "sa"
        strPassWord = ""

        Call crxdatabaseTable.SetLogOnInfo(strDSN, strDataBase,
strUserName, strPassWord)
        strLocation =
"Database.dbo.Proc(sp_GetInformationRowReport;1)"
        Call crxdatabaseTable.SetTableLocation(strLocation, "", "")
    Next

///////////////////////



Sun, 12 Sep 2004 03:24:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. document.location or window.location Question

2. Run Time Change of DB Location, Setting Passwords, and Rpt Location

3. Connection cursor location vs. Recordset cursor location

4. Copying files from different locations to different locations

5. Could you close a window who has done: onload="if (self != top) top.location = self.location

6. File Location

7. References and their file location

8. Copying Dir from one location to another

9. Location of a Message Box

10. Location of Office temporary files

11. How to change column locations/widths via VBA

12. File locations

 

 
Powered by phpBB® Forum Software