on 03-01-2019 5:09 PM
I'm using Crystal Reports 2016. I have a report in which I created multiple parameters that successfully link to various fields. However, my current requirement is to link a parameter to a formula that I created but Crystal does not allow me to select this formula as the basis for this parameter. I tried creating a sub-report with a shared variable & linking this to my main report but Crystal does not allow me to select this shared variable either. Please advise. Thanks!
You can't link a formula to a parameter - the formulas don't process until after the parameters have been read. Can you post the formula here? Depending on what the formula does, there may be a way around this.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How does this need to link to a parameter? Do you need to filter this sum based on the parameter? If that's the case and you're linking tables together in the report instead of using a command or a stored procedure, you could create a SQL Expression that does this using a case statement and link that to the parameter.
SQL Expressions use the syntax of your database, not Crystal syntax. So, it might look like this:
case
when "item"."onorder" > 0 or "item"."onhand" > 0 then "item"."onorder" + "item"."onhand"
else 0
end
Because SQL Expressions become part of the select part of the query that Crystal generates, you can filter them based on parameters.
-Dell
You can use case statement based on parameter in your query to sum two fields as its simple sum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.