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 |
wreeves-its
Starting Member
2 Posts |
Posted - 2011-03-07 : 14:38:45
|
I have a SSRS report that operates using a text box run-time input parameter without any problem. I'm tying to change the text box to a pull-down selection list, and populate that list from a database query. To that, I'll need to create a second dataset where the query that will populate the pull-down selection list will reside.This is something I've done numerous times, but this time, I've get the following error a soon as I define the second dataset and attempt to preview my report."the value expression for the text box 'Labor_Cost' refers to the field 'Labor_Cost'. Report item expressions can only refer to fields within the current dataset scope or, if an aggregate, the specified dataset scope". As soon as I delete the second data set, te error goes away. Even if I leave the paraeter as a text box input, I get the same error each time I define the second data set.The field in question (Labor_Cost) is only in the first data set, and the query I'm using in the second data set is quite simple. It is as follows[select sr_service_recid, summaryfrom sr_service]Hope I've given you enought to work from.wreeves |
|
wreeves-its
Starting Member
2 Posts |
Posted - 2011-03-07 : 17:09:40
|
A little further testing:Within the project that is using the first shared dataset, there are several reports. In trying to create a second dataset on any number of the other reports, I'm not getting the error mentioned above. So, there's something within the report that is accessing the first dataset.If I remove the "Labor_Cost" field (which is constructed by a subquery) from the report, the error goes to another subqery field. Here's the subquery that creates the "Labor_Cost" field.(select sum(time_entry.hours_actual * (member.hourly_rate * .6667)) from time_entryleft outer join member on time_entry.member_id = member.member_idwhere time_entry.sr_service_recid = iv_product.sr_service_recid) as Labor_Cost,Any suggestions? The Labor_Cost field is critical to the report. So, that's not an option.wreeveswreeves |
 |
|
|
|
|
|
|