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

Variable Data Sources w/ .DBF tables

Status
Not open for further replies.

brigmar

Programmer
Mar 21, 2006
414
US
Setting the stage:

Our corporation uses FoxPro / VFP .DBF tables to store data.
Each client has an assigned folder on our network.
Each client has the same list of tables in their hierarchy.
Our corporation also has mandated SQL Server Reporting Services for our reports.
I have written reports for a single client, each data source being an OLEDB connection to a .DBF file

The problem:

I need to make the reports available for all clients.
I don't want to create >200 reports that all do the same thing except reference identically structured .DBF files

I have created a data source and parameter for the lookups of each client, and what I'd like to do is something along the lines of the following pseudocode:

on_Client_Change:
datasource1.fullpath = newclientrootfolder + "table1.DBF"
datasource2.fullpath = newclientrootfolder + "table2.DBF"
datasource3.fullpath = newclientrootfolder + "table3.DBF"

I can't find any reference to doing such a thing; dynamically changing the datasource

..or perhaps there is another/better way to achieve the same ?


 
You should be able to do this in the report itself

The connection is a string that can be manipulated

As long as you can use logic to build the string you should be able to do this

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thanks for the response,
That is what I read.
However, my .rdl has a GUID for the connection, and no mention of a connection string.
Is this because I am using a Shared Data Source?
 
You would set the connection string in the shared datasource connection properties. Not sure what you mean by having a GUID as a connection...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top