Please help me in remote connection of the crystal reports

naresh

Active member
Joined
Jul 4, 2006
Messages
38
Programming Experience
1-3
Thanks David, I think , i posted the thread with the different meaning. besides that here is my Question again. I am working with the database suppose "MARKET" and i prepared the crystal reports accoring to that database. but my client system has "SHOPPING" database which is identical , Every thing is same eccept name of the database and the servername is systemName\Shopping in the client system. Now my problem is the reports should connnect to the client database when i deploy my project. I think my problem is clear.

I came with one solution :
In my system :
Dim obj As New Properties
Dim ser As String = My.Computer.Name
obj.DataSourceConnections.Item(0).SetConnection(se r, "Market", True)

I will change the ser name and database name when i give to the client system
Dim obj As New Properties
Dim ser As String = My.Computer.Name & "\shopping"
obj.DataSourceConnections.Item(0).SetConnection(se r, "shopping", True)

It worked fine when i checked in the side by system will it give any errors in future or any other solution for this problem.
Thanks for any help.
Naresh
 
I will offer up a possible solution. You will need to research how to do it for your specific database. I would investigate using stored procedures to query the database to return the table names. Once you have the tablenames you can search them and determine which name you should be using in your code. Sorry, I don't have any magic code that will do all that for you. Your situation is difficult, since you need to know what name to search for and if you already know that you could just hardcode the names in. Perhaps the really simple solution is to use "TRY/CATCH" statements and try the other table name if one gives you an error.

I hope someone comes up with something better, this is an interesting dilema.
 
Back
Top