Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Thumbs up Unanswered: Crystal Reports Commands & Parameters

    I currently have a report which includes two Date parameters and is working beautiful.
    Now I need to add some additional parameters and check if values have been entered and/or selected by the user(s).
    I have tried adding a Formula Field and also tried testing if entered parameter is null, then I tried adding this formula into my SQL Command; apparently, report seems to run, but no records are returned.

    Could someone provide some help. I don't know what to try next.

    Am I in the right path, or what is it that I am doing wrong?

    Help, Please...

    Thanks.

  2. #2
    Join Date
    Feb 2009
    Posts
    10
    Need a little more detail. Are you using linked tables or a command query? Are you using BusObj Server, etc...

    David

  3. #3
    Join Date
    Feb 2009
    Posts
    3

    Thumbs up

    Quote Originally Posted by despec99
    Need a little more detail. Are you using linked tables or a command query? Are you using BusObj Server, etc...

    David

    I'm using a command query.

    As a matter of fact, my SQL query is the following:
    SELECT p.muni "Municipality", p.establ "FSE Name", p.add1 "Address",
    p.city "City",i.insp "Inspection Date", p.do
    FROM tblWNY_Food_Establishment_Inspection i,
    tblWNY_Food_Service_Establishment_Permit p
    WHERE insp BETWEEN '{?StartDate}' AND '{?EndDate}'
    AND purpose='Regular'
    AND p.fsepid = CONVERT(int, i.fsepid)
    ORDER BY p.muni,p.establ

    As you could see, I'm actually using two parameters, {?StartDate} and
    {?Enddate}.

    What I'm trying to do is the following:
    At the end of my SELECT line is p.do, which refers to the District Office.
    I need to add a parameter, for simplicity let's call it {?do}
    When user tries running this report, if they leave the DO parameter empty, I would like to have it default to something else. In other words, I want InfoView to run this report successfully, and not getting the FAILED message within my InfoView portal.

    Hope this clarifies things for you.

    Thanks a mill.
    Alberto

  4. #4
    Join Date
    Feb 2009
    Posts
    10
    The problem you're going to run into is that Crystal won't allow an "empty" parameter. The user will have to add something to it or the report won't proceed.

    David

  5. #5
    Join Date
    Feb 2009
    Posts
    3
    Thanks much.

  6. #6
    Join Date
    Mar 2009
    Posts
    1
    Can i pass a record from recordset to parameter field in cystal report 8.5 ??

  7. #7
    Join Date
    Nov 2008
    Posts
    8

    Crystal reports help

    here some samples

    C# Crystal Reports Tutorial

    huy.

  8. #8
    Join Date
    Jan 2011
    Posts
    1
    How can i pass a record from recordset to parameter field in crystal report 8.5? anyone can help me? thanks


    It is a national web site that is dedicated to the promotion of
    florida vacation rentals,vacation home rentals,vacation rentals.

  9. #9
    Join Date
    Apr 2011
    Posts
    1
    Hi. I am a newcomer in Crystal report. I want to create a report which take a parameter of type date. And all the records of that date should be displayed. I do not have any idea of how to do it? Any help will be appreciated.

  10. #10
    Join Date
    Jun 2011
    Posts
    4

    use optional prompts

    Quote Originally Posted by Alberto Polanco View Post
    I'm using a command query.

    As a matter of fact, my SQL query is the following:
    SELECT p.muni "Municipality", p.establ "FSE Name", p.add1 "Address",
    p.city "City",i.insp "Inspection Date", p.do
    FROM tblWNY_Food_Establishment_Inspection i,
    tblWNY_Food_Service_Establishment_Permit p
    WHERE insp BETWEEN '{?StartDate}' AND '{?EndDate}'
    AND purpose='Regular'
    AND p.fsepid = CONVERT(int, i.fsepid)
    ORDER BY p.muni,p.establ

    As you could see, I'm actually using two parameters, {?StartDate} and
    {?Enddate}.

    What I'm trying to do is the following:
    At the end of my SELECT line is p.do, which refers to the District Office.
    I need to add a parameter, for simplicity let's call it {?do}
    When user tries running this report, if they leave the DO parameter empty, I would like to have it default to something else. In other words, I want InfoView to run this report successfully, and not getting the FAILED message within my InfoView portal.

    Hope this clarifies things for you.

    Thanks a mill.
    Alberto
    Hi,
    If i understand your question correctly, there is a feature in crystal reports called optional prompts, even if the user doesnt prompt anything, it does not throw any error.
    thanks,
    Krishnam

  11. #11
    Join Date
    Jun 2011
    Posts
    3
    Hi,

    I am trying to create a date range parameter but for some reason it is not working fine. After creating the parameter I am not understanding what should I select in the Record selection expert. If there is a formula that I can use in the formula filed can anyone guide me through it, I have tried using formula's but since I dont know the proper syntax its throwing an error.

    Thanks

    'Alberto sorry for posting a question on your thread, but as your date parameter is working fine I thought it was a good idea to ask someone who has already done something I am looking for.'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •