views:

9

answers:

1

HI,

Can you upload a file as part of sql server reporting service 2008 parameter?

I would like to be able to upload a text file list contract ids and produce a report based on those contracts. e.g for these 100 contracts what date were they entered into the system.

I could have a parameter field which takes a list of comma separated contract id's. But that will be a very hard sell.

Thanks for your help

A: 

Hmmmmmm I wouldn't / haven't done it, but what you might be able to do is set the report source to a sql clr table valued function, which takes as a parameter a full path and file name, then parses out the data?

  • Looks like this can be done.

  • Here is an article I used when learning clr tvfs.


Then, according to your comments, what I would do is take the csv of ints and pass it to a sproc. The sproc would then turn the csv into a temporary table using a table valued function. The table produced by the table valued function would then be used in your query. I would avoid this entire scenario if I could. If you can provide the user with list of valid parameter choices, so much the better. Or if that csv is a regular, slowly changing list, perhaps it is better to make it a separate report. SSRS allows you to 'copy' or 'link' ( i forget the term ) to base/master reports. All you're really doing is changing the set of input parameters. The basics of the report remain the same.

See:

Good LUCK!

MaasSql
Thanks for the answer. This would require users placing the file in network share. I think the preferred option will be have a parameter field which takes comma separated contract id's and split it. Thanks again
Dan Black