Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReportNet: parameter decides column for filter

Status
Not open for further replies.

mybuddelm

IS-IT--Management
Oct 22, 2005
7
DE
Dear all,

my prob' is that a parameter value decides on which column the filter has to apply.

In short:
The first query is used for my result list.

ID FROM TO MEASURE
-- ------ ------ -------
1 Paris Berlin 100
2 Oslo Vienna 150

The second query is the source of a parameter.
The column CITY is determining.

REGION COUNTRY CITY
------ ------- ------
West Germany Berlin
West France Paris
North Norway Oslo

In addition the user has the choice between FROM and TO by a seperate parameter with static values (1|2).

According to 1 or 2 the first query has to be filtered on the column FROM or TO.

As there is no way to implement a CASE-construct in a filter, I hope someone of has a pretty nice solution for me.

Thanks a lot in advance
budd

 
sorry but Case construct are working in Filter even so it s not documented , and maybe not supported.


Have you tried this :
( CASE ?From_or_To?
WHEN 'From' THEN [source].[From]
ELSE [Source].[To]
END ) = ?CitySelection?

The ?From_or_To? could be a Checkbox for selection From or To , create a String Parameter with 2 static choices.
The ?CitySelection? is the value selected in your query2
 
Brilliant!

This is working fine.
Haven't thought about changing the syntax the other way round.

Thanks a lot
budd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top