passing a parameter with a value to be excluded from the search

I'm writing a sub report to display statistics for a particular region but I also need to show the same statistics for every region EXCEPT that region.

Eg if the region ID parameter is 30  and is added as a parameter the where statement is  "where regionid = 30"  but I'd also like to be able to provide the region ID as, for example  "-30" to result in a  where statement of "where regionid != 30"

The plan is to use one sub report repeated multiple times in the main report (to keep it easier to update the design) but edit the dataset query for each sub report to show different regions.

Or is it just going to be easier to create a "in region" and "out of region" sub report?

...

 

Chris

 
cjohnsonuk's picture
Joined: May 20 2010 - 1:41pm
Last seen: 7 years 12 months ago

1 Answer:

Have you tried using $P! parameters to pass SQL to your subreport?

hozawa's picture
177937
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 12 months ago
Feedback