Page 1 of 1

Summary with DateDiff function

Posted: Tue Jul 03, 2012 8:03 am
by Jennypi
Hi,

One of my reports is buit like this:
-GroupHeaderBand
--DataBand
-GroupFooterBand

In the GroupFooterBand, I have summaries to have group averages of values from the databand.
On of my field is a DateDiff function:

Code: Select all

{DateDiff(data.date_pol,data.date_sowing).Days}
I'm trying to have the average of for this field, like this:

Code: Select all

{Avg(DateDiff(data.date_harvest,data.date_pol).Days)}
but I'm getting an error that reference of an object does not set to an instance of an object.

Where am I wrong? Is it possible to do what I want?

Thanks!

Re: Summary with DateDiff function

Posted: Wed Jul 04, 2012 6:13 am
by Ivan
Hello,

We couldn't reproduce this bug.
Can you please send us a sample report template with data, which reproduce the issue?

Thank you.

Re: Summary with DateDiff function

Posted: Mon Jul 09, 2012 12:20 pm
by Jennypi
Hello,

Please find attached my report converted to accept data from csv file, and a data file.
You can see that the field in red color does not work (error is not the same than in the former report, but still).

Thanks for your help.

Re: Summary with DateDiff function

Posted: Tue Jul 10, 2012 11:50 am
by HighAley
Hello.
Jennypi wrote:Please find attached my report converted to accept data from csv file, and a data file.
You can see that the field in red color does not work (error is not the same than in the former report, but still).
Please, try to use next expression:

Code: Select all

{Totals.Avg(GroupHeaderBand1, DateDiff(data.date_harvest,data.date_pol).Days)}
Thank you.

Re: Summary with DateDiff function

Posted: Tue Jul 10, 2012 12:50 pm
by Jennypi
Thanks, it's working perfectly :)

Re: Summary with DateDiff function

Posted: Wed Jul 11, 2012 4:54 am
by Andrew
Hello,

Great! Have a nice day!