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!

Select report's data source at runtime 1

Status
Not open for further replies.

BasilBear

Programmer
Feb 27, 2006
4
My scenario is that I want to use CRXI to link to 1 of many identically structured CSV files (via ODBC). (Each one is a list of invoice details.)

I would be interested to hear from anyone who knows whether it is possible to pass a parameter to CRXI indicating the name of the datasource (a CSV file) to be read for a particular instance of the report.

I have considered that I can rename the desired file to a fixed name that that the report will always reference, however, I would prefer to be able to pass a parameter instead, if possible.

Thank you for taking the time to read this.

BasilBear.

 
It can be done.

Create an ODBC connection (text driver) to the CSV file.

Now in the Database Expert select ODBC and point to the Add Command instead of pointing at the file directly.

In the SQL use:

select * from c:\

Create a parameter of type string and then double click it and it will insert it into the SQL statement.

I just tested and it worked fine.

I'd never tried it with an ODBC Text Driver, but it works...

-k

 
Bullseye!

Well, I've spent all day telling people that it probably can't be done .... hmm.

Thanks a million!

BasilBear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top