Results 1 to 5 of 5
  1. #1
    Join Date
    May 2008
    Posts
    5

    Unanswered: date range problem.

    Hi,

    I am a newbie at crystal reports and i have been searching the boards and have tried a very things that others have posted but it has not solved the problem I am having.

    I want to display the date range on the report. When I setup the parameter as Date range with the option to choose both dates it will grab the data fine but will not print the date range on the report. When I use a start date and end date for the report and use a text object in the report to display the dates choosen it will not display any of the data. What am I doing wrong?

    Please help.

    Thanks for your time.

  2. #2
    Join Date
    Sep 2003
    Posts
    156
    What do you see when you:

    1) Drag your date parameter and drop it in the report header?
    2) Create a formula:

    Formula Name: Datefrom
    Formula Value: {?your date prompt name}

    and drop that in the report header.
    rgs,

    Ghostman

  3. #3
    Join Date
    May 2008
    Posts
    5
    When I drop the parameter {?DateRange} in the header I get the data I am looking for but it does not print the dates the data is for. I could not create the formula that you asked it has an error. It says the result of the formula can not be a range. Any suggestions?

    Thanks

  4. #4
    Join Date
    Sep 2003
    Posts
    156
    The Parameter itself, when dropped onto the report should display whatever you entered. If you have allowed discreet values, and you enter nothing, then nothing will be displayed. It should show up on any section that you put it in (header, detail, page footer, report footer)

    Try this:

    Create parameter

    1) name: DateFrom

    Create another parameter

    2) name: DateTo

    Then in the selection criteria write

    {my_date_field} >= {?DateFrom} and {my_date_field} <= {?DateTo}

    Drop them on the report as well, I'll be amazed if they don't show.

    Also, if you are allowing nulls for date ranges, then you'll need to create formulae to replace the parameters in the selection criteria. I have added an attachment for demonstration purposes.
    Attached Files Attached Files
    Last edited by GhostMan; 05-06-08 at 03:48.
    rgs,

    Ghostman

  5. #5
    Join Date
    May 2008
    Posts
    5
    thank you thank you thank you. That worked like a charm.

    Thanks again.

Posting Permissions

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