Last post Aug 02, 2011 11:31 AM by FileFoundException
Aug 01, 2011 02:04 PM|MyronCope|LINK
using report builder 2.0
I have a dataset and I want to include 2 queries. In the first query I am only assigning a value into a variable which is the value result from a query.
In the second query I am returning several fields using a query however I also want to return a value that is the value of the variable from the first query.
how to do this?
Aug 02, 2011 07:33 AM|Gayomard Mehta|LINK
Better way is to use SubReports and not multiple queries as that is more modular and parameter driven. It also allows reusability!
Aug 02, 2011 11:31 AM|FileFoundException|LINK
If the value retrieved from the first value is singluar is singular. Then use another query. And in your designer (in a table or a text field), you can get the value like : Sum(Fields!MyField.Value,"FirstQuery")
The Other option is you can add the mentioned above sigular value to your second query SELECT list
so: SELECT a,b,c , firstQueryValue FROM SecondQuery
If your first query produces a list of values, then look into joining the first and second query by some common key between the two queries. In essence you'll have one query in this case.