Setting Report Parameters
Just working on my first report and am having trouble get the report paraments set up.
When I try to set a parameter on the Data tab such as @Zipcode it treats it as a string and surround it with quotes.
Also it does not automatically create a parameter in the Report Parameters collection on the Layout tab.
Even if I manually create the parameter it does not tie back to the query.
Any ideas of what I should be doing?
Thanks,
Paul Hammond
Richmond, VA
The problem seems to have been that I am running against an Oracle data source which requires the use of a colon : instead of the ampersand @.
Problem solved,
Thanks,
Paul
I am having a similar problem using a ODBC connection. From what I have found I can only use a ? for a parameter. Also, can not set them to multivalue. Anyone, know anything about this.
Thanks
Depending on the implementation of the ODBC provider, it may not support named parameters but only unnamed parameters (i.e. '?').
Multi value parameter support is only available for SQL Server, Oracle, and Analysis Services data sources. Note: multi value query parameters are generally not supported by any data provider - RS 2005 provides multi value query parameter rewrite functionality that works specifically with the SQL dialects used by SQL Server and Oracle.
You could implement your own a custom data extension wrapper around the ODBC provider and implement the IDataMultiValueParameter interface and then on IDbCommand.ExecuteReader you would need to rewrite the original command text to integrate the multi value parameter information directly into the query command text. If you want to go that way, check MSDN / RS Books Online for information on those interfaces and implementing custom data extensions.
-- Robert
hi Robert,
if my parameter has be set to default value from the query to collect last week monday.
when i view the report, is that anyway for me to reload the data for other date? example maybe default value is on 27 Feb 2006, but now i want the report reload with the data set from 20 Feb 2006.
regards
terence
In Visual Studio 2005 I am making a nice report.I have an odbc connection to an Access database (system DSN).
Unfortunately I cannot use named parameters, only unnamed (=?), but it works.
Now I want to use something like: isnull(?,[Field_name])
In other words: if the parameters is left blank or null then show all records (so the parameter becomes optional).
I want to give a criteria/parameter for status, but if nothing is filled in, show all records.
Is there a way to get this to work?
I have tried a linked server to the same Access database, but I don't see this server/database in the list while creating a new datasource.
Thanks,
Frans