Skip to Content
avatar image
Former Member

Displaying all missing dates in a range

Hi,

  I followed this link http://scn.sap.com/community/crystal-reports/blog/2011/12/13/displaying-all-missing-dates-in-a-range--a-custom-function-sample and created a function for displaying the dates missing from range which is passed as parameter values.

Here what happens is that, my report will show first the values which are already in db in that range, and then the missing dates.

for each every record, my second section for missing dates is showing.How to include the missing dates with dates have data

for eg, if i select 01-feb-2014 to 20-feb-2014, and in db, data is there for 05-feb and 10-feb

05-feb-2014 ------- data from db

now the missing dates from second section

then

10-feb-----data from db

now the missing dates from second section

Please help

See

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 26, 2014 at 02:29 PM

    hello See,

    this is a function that i built...i will have to modify it to meet that requirement...i'll get back to you later with the revised function...should be a day or so as i'm at a conference.

    thanks,

    jamie

    Add comment
    10|10000 characters needed characters exceeded

    • i tested the link and there is nothing wrong with the file itself. i am using cr 2013 though.

      however, as mentioned before, change the formula that you are using to display the missing dates to syntax similar to below:

      datevar thisdate:= date({Orders.Order Date});
      if not onlastrecord then datevar nextdate:= date(next({Orders.Order Date}));

      if onlastrecord and thisdate < {?EndDate}
          then nextdate := {?EndDate}+1;

      Days_Between (thisdate, nextdate, 'MMM. d, yyyy');

  • avatar image
    Former Member
    Feb 26, 2014 at 01:28 PM
    Add comment
    10|10000 characters needed characters exceeded