Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When i test this expression in a text object it works fine. However, when i load it within theload script, my script automatically closes and asks to reopen old data. Any idea's what is going on?
sum(if(Week = WEEK(TODAY(0)), if(DayOfWeek <= num(WEEKDAY(TODAY(0))), [Sales Amount]))) as WeekSalesAMount,
Thanks,
Do you have a GROUP clause in your load statement? GROUP would be required because of the sum() function. I've seen this "no error message" failure when I've forgotten the GROUP.
-Rob
Yes, I do have a group clause in the statement.
There are two typical reasons for the reload collapse without error message:
1. GROUP BY is missing or it doesn't include all fields that should be there. In this case the reload collapses at this point in the script - easy to see in the log file.
2. Script creates logical loops. In this case script runs to the end, and then collapses. Also, easy to see in the log file. Often hard to find what fields cause the loop. If I suspect this reason, I reload application in QV 7.5 which doesn't collapse but shows the loops instead by making a table or a few loosely coupled.
hi,
this probably occurs because you might have not used the group by clause in your load statement as suggested by Rob
since sum is an aggregation function it is required to use group by clause in your load statement
thanks
Anthony wrote:Yes, I do have a group clause in the statement. <div></div>
Anthony, Can you post the failing load statement?
-Rob
hello,
your aliasname is "WeekSalesAMount". Is this correct? I think it schould be "WeekSalesAmount". You wrote the "m" as a capital letter.
I had the same Problem before and for me it turned out that i wrote a letter in capitals.