Quantcast
Viewing all articles
Browse latest Browse all 3636

Change data source programatically

I am using CR for VS2012.

I am creating an imbedded report that will pull data from a single table. Using the database expert I created a connection to my SQL Server and table. When I select the View SQL Query it shows the fully qualified path to my database & table ("databasename"."owner"."Table"). Having done similar reports with older version of CR (9 & XI) I was able to edit the SQL Query and or pass the server name, database name, & logon information to the report.

In CRXI it was (crReport.Database.Tables(1).SetLogOnInfo Server, Database, UserID, Password)  however the SQL Query was not fully qualified. (I don't recall how I was able to do that but I did).  In my current version of CR I can not find how to send Server & Database info to the report.

So my questions are:

1) how do I pass variable server, database & logon info to the report?

2) how do i ensure that the fully qualified SQL Query is representative of the Server & DB my customer has set up?

2a) Is there a way to edit the SQL Query so that it is not fully qualified pointing to my specific development DB?

 

Thanks in advance

Gary


Viewing all articles
Browse latest Browse all 3636

Trending Articles