Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
peitech
Starting Member
10 Posts |
Posted - 2011-01-26 : 10:00:51
|
Here's my logic:Main reportA simple query to return a list of firms based in a specific country, the user selects the country.Sub reportA simple query to return the contact names for contacts located in the universe of firms above.In practice the main report will be more complicated, allowing the user to specify quite a number of parameter values.It's my understanding and thinking that since the contact table contains the Firm ID that's all I'd need to link the main and sub report? - i.e. the main report has done all the hard work then the Sub Report just has to fetch contacts meeting the universe of Firm IDs in the main report.So, is this a correct understanding of main and sub report linkage?I've created a simple contact report - just pulling off the first and last name and said where firm_id = @Firm_IDWhen I add this report as a sub report into my main firm level report I then go to the parameters of the subreport. There's nothing in the dropdown box for me to choose! - The value field has things I'd expect - =First(Fields!firm_id.Value, "DataSet1") for example, but the name box is blank and there's nothing in the dropdown.Typing in the parameter and trying the report it throws an error on the subreport... An attempt was made to set a report parameter 'Firm_ID' that is not defined in this report.Not really sure where I'm going wrong, any ideas anyone? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-26 : 12:15:15
|
you need to add the Firm_ID as a parameter in sub report and then from first report call the subreport passing the value of parameter from the field values in main report------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|