0

I have a report that uses data from several datasets. I chose to do it this way because the alternative would be to join about 12 tables.

From what I can gather, I have to use the dataset name to define the scope of the variable when using it in expressions. I have tried to do this, but I still get an error.

The expression I'm using is:

=(Fields!PropertyDescription.Value, "Application")

And the error I get is:

System.Web.Services.Protocols.SoapException: The Value expression for the text box ‘Textbox11’ refers directly to the field ‘PropertyDescription’ without specifying a dataset aggregate. When the report contains multiple datasets, field references outside of a data region must be contained within aggregate functions which specify a dataset scope.

Even if I use an expression such as

=First(Fields!PropertyDescription.Value, "Application")

I get the same error.

Can someone perhaps help me with this error or suggest another way of combining the data?

  • Do you have the option of creating a stored procedure that can produce a single dataset? – Steve Mangiameli Mar 6 '15 at 19:32
  • I'm not sure I haven't worked with stored procedures before. As long as it can run when the report needs to run, I guess it should be fine. The RDL will be converted to RDLC by a developer, don't know if that is a consideration. – Hanlie Mar 9 '15 at 5:36
  • The error says it all. Your Application dataset is not, I am assuming, the main dataset. The report will allow you to use it if it is part of an aggregate function - like SUM. FIRST isn't an aggregate. If you have the option of creating a stored proc, that would be your best option. It get's the code out of the report, providing for better maintenance and a stored proc is much more powerful and flexible. As long as it produces a single dataset, your report should be happy. – Steve Mangiameli Mar 9 '15 at 14:33
  • I'm gathering that one can't have multiple datasets at the same 'level' in SSRS. I will investigate the stored procedure option. – Hanlie Mar 10 '15 at 7:23
  • After some more research I realised that what I wanted was data regions. I'm now using different lists and tablixes to bind to different datasets. – Hanlie Mar 10 '15 at 15:05
1

After some more research I realised that what I wanted was data regions. I'm now using different lists and tablixes to bind to the different datasets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.