Results 1 to 7 of 7

Thread: Displaying Dates on Report VB.NET2005

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    62

    Displaying Dates on Report VB.NET2005

    Somewhat new at CR.
    I need to display the two dates "Start and End date", selected by the user as parameters, on the Header of my Crystal Report.
    Thanks for your help,
    Pierre

  2. #2
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Displaying Dates on Report VB.NET2005

    Did you try dragging the parameter field onto the header of your report?

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    62

    Re: Displaying Dates on Report VB.NET2005

    Thanks for helping.
    I've tried to drag it to my report but nothing happen.
    I am using a Range values, does it matter?

    This is my Select Expert code. I would like to show both date selected in the title of my report.
    Code:
    {WorkOrder.WODate} >= {?Report Date} and
    {WorkOrder.WODate} <= {?Report Date}
    Thanks,
    Pierre

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Displaying Dates on Report VB.NET2005

    I am using a Range values, does it matter?
    Yes.

    First use the following for your record selection criteria.
    {WorkOrder.WODate} In {?Report Date}

    To access the range values use the Minimum and Maximum functions.
    Minimum ({?Report Date})
    Maximum ({?Report Date})

    If you allow multiple ranges to be entered, treat the parameter as an array.
    Minimum ({?Report Date}[1])
    Minimum ({?Report Date}[2])

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    62

    Re: Displaying Dates on Report VB.NET2005

    There is no multiple range to be entered.

    Where do I write down this code?
    Minimum ({?Report Date})
    Maximum ({?Report Date})

    If I write it down in my Select Expert, I get an error message.

    Thanks,
    Roger

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Displaying Dates on Report VB.NET2005

    Create a Formula that will be used to display the dates in your Header section. The formula would be something like

    "From " + ToText(Minimum({?Report Date}),"dd-MMM-yyyy") +
    "To " + ToText(Maximum({?Report Date}),"dd-MMM-yyyy")

  7. #7

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    62

    Re: Displaying Dates on Report VB.NET2005

    It works perfectly.
    Thanks for your help.

    For another problem.
    The form that pop-up and asked for the dates is quite big and clumsy.
    How can I format it to a more suitable size.

    Thanks again,
    Pierre

Posting Permissions

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



Click Here to Expand Forum to Full Width