Hey all - got something I can't quite figure out here....
I've created a report in which I'm doing some odd grouping/summing (I need to group by a field in one table, but add up the values in another).
Whenever I compiled and ran the report - I kept getting a "Divide by zero" error, and the debugger would land on a line where I was dividing by "Production Order"."Actual Time Used".
When I looked at the locals browser in the debugger (Code Coverage), the selected record had a status of "Simulated"... but...
The weird thing is, I set the table view for the Production Order table as follows -
Key - "Finished Date" (I created the key)
Order - "Ascending"
Table Filter - "Status=FILTER(Finished)"
This data item is indented one level (the top level table is Item).
Anyone have any ideas why I'm getting "Simulated" records in my table results when I've applied a filter?
0
Comments
RIS Plus, LLC
Debugger
Filter
The only thing I can think is that the filter field is not a member of the key...?
am I correct in this assumption?
I think I had a similar situation a long long time ago - going from memory - I wanted to divide the item.qty by the item."sales Unit of measure"
even tho I just wanted the results, if I placed those fields in the report - it would work and if I removed them I received that error.
So I add the the two fields to that section and just made them not visible.
So perhaps your sections is not "pulling in" the value you're looking for.
This was a while ago so it's hard to remember .
http://www.BiloBeauty.com
http://www.autismspeaks.org
Actually - when this first started happening - I considered doing that, but when I saw the debugger - I decided it wasn't the problem.
Can I make an entire section invisible? I haven't looked into that...
I'll give what you're suggesting a try. It sounds feasible (given what I've seen of the reports so far
Your filter seems to look fine. I think that somewhere in the code of your report it gets reset, or maybe there is a function call that accepts the poduction order as a parameter by reference and the fitler gets reset in that function.
RIS Plus, LLC
I'm still working with this - hopefully I'll find the problem today.
I still need to group by the product group code from the item table though.
GAAAAHHHH! I wish I could just write this in SQL and have a translator. I could compile this report in under an hour.
EDIT -
OK scratch that idea. I tried flipping the relationship, but it wouldn't group by product group code correctly - I'm assuming that it's because the item was in the "inner" loop of the production order. It seems that indenting one item under another almost creates a default grouping...
http://www.BiloBeauty.com
http://www.autismspeaks.org
insert a few strategically placed message boxes and you get an idea.
I figured out the order of execution of the data item triggers, and how it handles nested data items...
It also seems as though the report writer uses the filter expressions on a row-by-row basis. It is still iterating all records, but it's only keeping those records that match my criteria on each level - most inefficient if you ask me.
Maybe I can get some magic happening now that I see that ](*,)