CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Date Range

  1. #1
    Join Date
    Aug 2015
    Posts
    1

    Date Range

    Hi all,

    I am using Crystal 2008 as a report writer and SQL server 2008R2 as a dbase.

    I need help creating the first column of my report; it must be dates where the first date is a parameter StartDate then increasing by one day at a time up to the EndDate that will also be a parameter date. In my database I have a list of fixed deposits so the dates in there is not daily.

    Thank you in advance

  2. #2
    Join Date
    Aug 2007
    Posts
    179

    Re: Date Range

    You can use the recordnumber function to increment the date by 1 for each record returned, using something like

    {?ADATEPARAMETER} + recordnumber.

    This will only work if are displaying all rows in order (no grouping or suppressing of rows) as each row from the database would increment your date counter. Otherwise, you must create a formula that increments a variable by 1 each time the formula is EVALUATED, then use that formula to increment your date. You will have to add code to control the "and <= {?ENDDATEPARAMETER}" part.

Tags for this Thread

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

Featured