Looping between dates in report

Hi all.

I'm trying to design a report for Sales Line table. In this table I have two date fields and I want to loop between this fields and show date. For example:

Sales Line 1 - Start date 01/01/2008 - End Date 05/10/2008
Date: 01/01/2008
Date: 02/01/2008
Date: 03/01/2008
Date: 04/01/2008
Date. 05/01/2008

I'm using the Date virtual table indented under Sales Line and filtering DataItemLink: Period Start = FIELD(Start date), Period End = FIELD(End Date) and with DataItemTableView: Period Type = Day.

In Sales Line's body section I see the correct data, but Date Table's boy section shows nothing.

Thanks for your help

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Period End is a Closing date like C31/12/08 You need to either use NORMALDATE(Period End) or filter with some other field / logic...
  • Finally it was as easy as filter Period Start from Sales Line.Start Date and Sales Line.End date in the OnPreDataItem code of Date Table

    Date.SETRANGE(Date.Period Start, Sales Line.Start Date, Sales Line.End Date);

    :P
Sign In or Register to comment.