Master Detail parameter with SQL Server
Posted: Sat Jun 27, 2020 3:25 pm
Hi, I'm trying to make a simple Master Detail Report works with SQL Server.
I've copied the SQLMasterDetail.mrt that works with MSACCESS to run it with SQL Server.
But when I preview the report I get the error: scalar variable "@CategoryID" must be declared.
Master query datasource 'Categories' is:
Detail query 'Sales_By_Categories' datasource is:
I've declared the parameter in the detail datasource to match the PK column of the master datasource.
Any idea on how the master - detail link with parameter should be made to work with SQL Server?
Thank's for help.
Olivier
I've copied the SQLMasterDetail.mrt that works with MSACCESS to run it with SQL Server.
But when I preview the report I get the error: scalar variable "@CategoryID" must be declared.
Master query datasource 'Categories' is:
Code: Select all
SELECT * FROM Categories
Code: Select all
SELECT * FROM [Products] where CategoryID = @CategoryID
Code: Select all
@CategoryID int
Any idea on how the master - detail link with parameter should be made to work with SQL Server?
Thank's for help.
Olivier