Hello everyone,

I am writing a report and encountered an enigma...

i am using the function setValue for an attribute on an object.

about the report in general: the report set numbers to all the functions in the selected models and after that he looks for objects with assigned models, if he found some he enter the new model and try to set values to the inner function set there.

Some important facts:

1. When i am executing the report from the closed model - it works great

2. If the report is open, BUT i am executing the report from the debug mode and i put a break point on the line with the setValue command - it works

3. When i run the report from the designer regularly (as Designer users do) or without a break point the report crash.

4. The error msg is ""Error while executing script: an error occurred in the report object model. error running Attr.setValue(1). An error occured in the reportobject model. Unable to save modified objects.

5. I am adding some of the problematic lines

if (SubModel != null)
            {
                SubFunctionObjectList = SubModel.ObjOccListFilter(FunctionTypeNumber);   
                 SubFunctionObjectList = ArisData.sort(SubFunctionObjectList,Constants.SORT_Y,g_nloc);
                
                for (var t1=0; t1<SubFunctionObjectList.length;t1++ )
                {
                    SubFunctionObjectList[t1].ObjDef().Attribute(ActivityIDAttrNum,g_nloc).setValue(Number(t1+1))
                }
                  PrintActivityTable(SubModel)                               
            }

The lucky winner who will supply me with the solution will recieve....

1. A lot of thank you in the follow up thread

2. My everlasting gratitude

 

Thank you very much in advance

Gilad

 or register to reply.

Notify Moderator