I\'ve done a asp.net application to generate reports over a particular data. Initially i created local reports (.rdlc) to generate reports. I created separate .xsd for each rdlc
What are you trying to do? I believe the datasource is mentioned within the .RDL file itself. For ex: When you create an Report using BIDS, you can specify the datasource. This gets added to the .RDL file. The same concept holds true here as well.
This is not impossible, but may take a little effort if this is what you want to do.
You have a couple of options:
If you create a shared datasource on your report server you can add it manually using the RDLObjectModel. Get the shared datasource name and guid from your reportserver and you can add it to your report.
Example:
'create the datasource for the report
Dim dataSrcRFoo = New RdlObjectModel.DataSource
dataSrcRFoo.Name = "DataSourceName"
dataSrcRFoo.DataSourceReference = "/path/to/DataSource"
dataSrcRFoo.IsShared = True
dataSrcRFoo.SecurityType = 2 ' RdlObjectModel.SecurityTypeEnum.DataBase
dataSrcRFoo.DataSourceID = New Guid("shareddatasourceguid")
'add data source to report
rdlRpt.DataSources.Add(dataSrcRFoo)
Another option is to use templates on the server that have the share (or report level) datasource built in.
This work is impossible. you should create your datasource in your rdl report. you must write needed queries for report data gathering. you can use this query as a text or stored procedure. You can pass parameters to this query and filter the output of the query. you can only pass the parameters to rdl report like this:
ReportParameter[] Params = new ReportParameter[1];
Params[0] = "Parameter Value";
ReportViewerControl.ServerReport.SetParameters(Params);