sql - Store dataset count as a variable in a report to use in other tables - SSRS -


we have 2 queries on ssrs report .

one query returns single number total record count. other query returns single column we'd divide total returned in first query.

so

query 1 dataset (this return single value)

total   100 

query 2 dataset (this return list of values we'd divide q1 answer)

col 1 20 3 49 

what want show on report

ratio (a/total) 1/100 20/100 3/100 49/100 

not show how marry these 2 datasets in single ssrs tablix. 100 not aggregate of value in table set 2, totally different number don't know of way write query bring out these values ins single dataset.

ideas?

thanks,.

mc

if don't want combine datasets, can following achieve end result.

for dataset returns single value, create report parameter (@myparam) hidden , populated dataset query1. dataset query2 can remain was. can use following expression populate textbox in report

=cstring(fields!cola.value) &"/"& cstring(parameters!myparam.value)  

if put in list or table, go through each value in cola , produce desired result.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -