• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Crystal Report Parameter

How do I enter a parameter, Fiscal Year, within the SQL?  See attached document.
How-do-I-enter-a-parameter.doc
0
garyjgs
Asked:
garyjgs
  • 2
  • 2
1 Solution
 
garyjgsAuthor Commented:
Need to know the best method of creating a parameter at the command with a SQL.
0
 
mlmccCommented:
Can't see the end of the SQL.

SELECT  
    List of Fields
FROM
    Tablelist appropriately joined
WHERE
     YourField = SELECT PARAMETER FROM THE LIST ON THE RIGHT

mlmcc
0
 
James0628Commented:
Basically, what mlmcc said.  You can position the cursor where you want the parameter and then double-click (I think) on the parameter and it should be inserted at that point.  If you do that, you will see the format that CR uses, but, FWIW, it's just {?parameter name}.

 If the parameter is a year, then it probably won't include string values, but if it could be a string, you should put the parameter in quotes (whatever you your db uses for string literals).  CR just replaces the parameter with its value, so if you had something like table.column = {?parameter} and entered "abc" (without the quotes) for the parameter value, you'd end up with table.column = abc, which would probably give you an error.

 James
0
 
garyjgsAuthor Commented:
Worked.  Thanks.
0
 
James0628Commented:
FWIW, mlmcc probably deserves some points here.  He posted first and he did give you the basics.  I just included a lot more details (because that's what I do :-).

 If you like, you can ask to have the question re-opened and split the points between us.

 Oh, and you're welcome.  :-)

 James
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now