Skip to Content
author's profile photo Former Member
Former Member

How can I manipulate a parameter value after user input

Post Author: fsu304

CA Forum: Crystal Reports

I have a parameter that is used in my sql command and I want to be able to change the value of it if it reach a certian criteria. For example the user enters the string "FDT" i want to change the parameter to equal "7" before it gets sent to the database to gather the records. How can I accomplish this??

Any help would be awesome.

Heath

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:18 PM

    Post Author: yangster

    CA Forum: Crystal Reports

    the easiest way to achieve this would be to create a lookup table that represents the value you have entered to mean something else in your primary selectionso your table would be a simple value, descriptionthe parameter the user enters 'FDT' = 7 in the table, it is then joined back to your initial queary and will only return you results for 7you can't create if statements with a commandand you cannot use a case statement with a parameterthe other alternative would be to write a procedure that takes in your value and converts it then runs your sql

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:26 PM

    Post Author: fsu304

    CA Forum: Crystal Reports

    Thanks for your quick response yangster. So there is no way to create a formula that would be run that would manipulate the value of the parameter before it is applied to the database.

    I am converting all of our reports to crystal from a program called Actuate and in actuate you can manipulate the parameters before they are sent to the database for record selection.

    Heath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:41 PM

    Post Author: yangster

    CA Forum: Crystal Reports

    no you can not massage a paramter before and pass it back without doing it within a procedureyou can however do this within crystal in the select expertif = 'FTD' then field1 = 7 elseif = 'ABC' then field1 = 2but because this is done post sql you take a performance hit as nothing is pushed down to the sql level

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.