Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2895

Re: Display numeric parameter results in Report Header with condition

$
0
0

Hi Mary,

 

Please see if this works:

 

1) Go to the Field Explorer > Right click SQL Expression Fields > New > use this code:

 

(

Select Count(Distinct "T.EmployeeID") From Table T

)

 

The SQL needs to be enclosed in round braces and the database field needs to be surrounded by double quotes.

 

2) Edit the formula on the header and add this part to the existing code:

 

If {%Sql expression name} = ubound({?Prompt}) then

'ALL'

Else

(

<your existing code here>

)

 

Another way to do this is to create a SQL query via the add command option that only returns the distinct count of employees as its result. You'd then leave the command sql unjoined to the other tables and replace the SQL expression field with the field from the SQL in the formula above.

 

-Abhilash


Viewing all articles
Browse latest Browse all 2895

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>