Posted 4 August 2017, 2:42 pm ESTHi.
I have a mainreport and a subreport (which locates in the mainreport's detail section).
The mainreport have a ADO Data control and the datasource is: SELECT * FROM categories
The subreport have a ADO data control and the datasource is: SELECT * FROM products WHERE CategoryId = '<%CategoryId%>'
Everytime when I start the mainreport, there will pop up a window indicates to enter parameter value. when I input the correct CategoryId, the report works well. I had ever read a topic in this forum that the parameter should pass from mainreport to subreport by the above method automatically. but in my application it does not work. why? Even there is a field showing CategoryId in mainreport's detail section.
Any more, If there is not a field showing CategoryId, can the parameter pass correctly?
PS: type of field "CategoryId" in my database is integer.