Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Problem with Sum function

anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: Problem with Sum function

Unread post by anorman »

I am also having the exact same issue.
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Problem with Sum function

Unread post by admin »

Are you able to send me a copy of the report with the 'sum' problem and a table that #dataTable# would have created?

And I'll see what I can find.

BTW for Sum() to work there needs to be at least one grouping on a report.

Steven
danielf
Posts: 44
Joined: Tue Jul 26, 2011 2:48 pm

Re: Problem with Sum function

Unread post by danielf »

Steven,

It happens in the demo site that ships with the latest version version of nuBuilder (downloaded last week, magic quotes are off by default).Try the invoice list report. Open the report builder, click 'copy changes' then 'save', and run the report. Make sure to select all customers and a 'from date' earlier than 2009 to make sure there is something to sum (reports appear to work if the result of sum is zero), and it crashes.

Also, I'm finding that *any* new report that I've tried to create that uses either sum or percent is affected.

As far as I can tell, all that the magic quotes fix has achieved, is that an edited report will run if sum() returns zero (or if there are no cases to sum over). It will crash if there are cases to sum over. Before the magic quotes fix it would crash regardless.
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Problem with Sum function

Unread post by admin »

danielf,

pdf_fixes.zip will fix this which you will find here...

http://forums.nubuilder.cloud/viewtopic.p ... 7847#p9799

Steven
danielf
Posts: 44
Joined: Tue Jul 26, 2011 2:48 pm

Re: Problem with Sum function

Unread post by danielf »

Thank you Steven,

This does appear to solve the problem. ;)
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Problem with Sum function

Unread post by admin »

.
Locked