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

Setting Report Parameters
BHAB
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
Charlee Strong
Thanks
Chrisk23
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
marcjan
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
Gambrinus
If you write a query for a SQL Server data source, such as
SELECT FirstName, LastName FROM Employee WHERE EmployeeID = @EmpID
report designer will automatically detect the query parameter. Once you move to the Layout mode, it should also automatically create a report parameter and link the report parameter to the query parameter on the dataset dialog.
See also:
* http://msdn.microsoft.com/library/default.asp url=/library/en-us/rscreate/htm/rcr_creating_structure_data_v1_72uk.asp
* http://msdn.microsoft.com/library/default.asp url=/library/en-us/rscreate/htm/rcr_creating_interactive_v1_50fn.asp
-- Robert
Kiavash
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