简体   繁体   中英

Multiple Queries in one Report (Visual Studio 2005)

So I'm using Visual Studio 2005 and trying to create ONE report with MULTIPLE queries in the report.

All queries have the same number of columns (and column names) but slight tweaks, etc. within each query (so they're basically all different).

I'm not entirely sure how I can get these multiple queries to appear in one report

Would really appreciate all and any help!

You can combine multiple result sets with UNION into one single result set.

For using UNION you need to cover two basic rules

  1. The number and the order of the columns must be the same in all queries.
  2. The data types must be compatible.

The query you are going to have is something like this

{Query 1}

UNION [ALL]

{Query 2} 

UNION [ALL]

{Query 3}

You can add multiple Tables to a report, each pointing to a different Dataset . Just make sure the DataSetName property of the Table points right Dataset.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM