I'm getting an "A parameter or data source credential is missing a value. Prompting for this value has been disabled. Supply a value or enable prompting." error when I try to show a report in a Windows Form with Local Processing.
The "ShowParametersPrompt" and "ShowCredentialsPrompt" are turned on, but maybe the problem is I don't have a way to "link" the datasource parameters (its a stored procedure tableadapter) with Report Parameters in the report designer, as there is no DataSource pane in the .rdlc designer
Also, I had to change to a filesystem path for the LocalReport property instead of using the ReportEmbeddedResource property, as it didnt seem to work (I get a "the definition for asdf.rdlc has not been provided" or a similar error msg).
So the question is: How should I provide the parameter values or enable prompting for them when doing Local Processing
I've tried the following with no luck:
InformeListaPrecios1TableAdapter ta = new InformeListaPrecios1TableAdapter();
ta.Fill(this.precios1.InformeListaPrecios1, null, 5, null);
this.reportViewer1.ProcessingMode = ProcessingMode.Local;
this.reportViewer1.LocalReport.DisplayName = "<ns>.Report1.rdlc";
this.reportViewer1.LocalReport.ReportEmbeddedResource = "<ns>.Report1.rdlc";
this.reportViewer1.LocalReport.ReportPath = @"<fullpath>\Report1.rdlc";
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("asdf215ConnectionString", this.precios1.InformeListaPrecios1));
//this.reportViewer1.LocalReport.SetParameters( ); I don't have ReportParams defined.
this.reportViewer1.RefreshReport();
Parameters / credentials?
Yuko
Rajeev,
Thanks. I wasn't aware of the new 'DataSources' menu item in the Report designer and I had looked into the raw xml of the rdlc file, and I thought the datasource name was "dbname215ConnectionString" (I edited the name in the code I posted for security reasons).
Anyway, looking in the DataSources dialog gave me the correct name and that was it.
Cheers,
Juan
Piyush K. Singh
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("asdf215ConnectionString", this.precios1.InformeListaPrecios1));
rickyrock
Perry Ismangil
-Chris
One Eyed Phil
Hey.. I've had a play with the reports thing, it looks promising.
One thing I can't get to work is having the thing show a report for each row in the datatable. It's supposed to do that right I'd have 4 Rows in a DS, I pass it and it'll only show the first one.
Am I missing something
Mezoni
When I look into .rdl file, I see all necessary information to get data from data datasource (connection string, select clause, etc.) Why do I need to specify the datasource programmatically, or in other words, is it possible to say the reportviewer this is your rdl file, do everything necessary and show me data
Thx...
Phoenix5096
You can use the ReportViewer control in two modes: Local processing mode and remote processing mode.
In local mode, the ReportViewer control is designed to integrate well with Visual Studio data wizards and generated classes such as TableAdapter that connect to data sources, execute queries and fetch data. Such functionality is not duplicated in ReportViewer, so ReportViewer does not have the ability to connect to data sources, execute queries, or fetch data. (Building in such functionality would have limited ReportViewer's flexibility by limiting it to a known set of data providers.)
In remote mode, ReportViewer connects to a Report Server, and displays reports that are processed and rendered by the Report Server. Report Server does have the ability to connect to data sources, execute queries, and fetch data. Once you deploy a report to Report Server, all you have to do is supply the URL of the Report Server and the path to the report to ReportViewer. So you can indeed say, "here is your rdl file, do everything necessary and show me data". Note that a free version of Report Server will be available in SQL Server Express.
MJD
I'm ok with that behavior, I even think its preferrable that you leave up to the user to fill the dataset. As you can see in the code I posted in the first message, I'm already doing that.
So the question becomes, why do I get an error stating that prompting hasn't been enabled when it is in fact enabled (the properties are set to true), and prompting isn't even used in that processing mode, and why does it say parameters haven't been provided when I already filled the datasource and no parameters are needed
invalid display name 3
I am newbie to VB 2005 and reportviewer. I have database driven application(ms access) with vb.net, and I want to generate report e.g monthly report (local mode)the user have to enter start/end date. so far what i know the there is no parameter prompting local mode, can you pls tell me how to do this. Its very urgent as i hav to sumbit a small project, only reporting is missing.
thnks
ritesh
FrankHsu
RNL Manager
In local processing mode, it is the host application's responsibility to execute queries, so it is the host application's responsibility to prompt for parameters, and set the parameter values during query execution. The ReportViewer control does not even need to know that you have query parameters. If the report has parameters that are not query parameters then you can supply the parameter values to the Report using the SetParameters method.
The same goes for credentials. When connected to a Report Server the ReportViewer control prompts for data source credentials. But in local processing mode since it is the host applications responsibility to execute queries the ReportViewer control does not prompt for credentials.