Book a Demo

Author Topic: RTF template's Custom Script randomly throws Error  (Read 3386 times)

Bartek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
RTF template's Custom Script randomly throws Error
« on: September 06, 2013, 06:59:10 pm »
Hi,

i've made a RTF Report which uses RTF Template Fragment based on Custom Script.
During generation that template fragment is used hundreds time (once for each element) and sometimes custom script throws Error (in System Output is just "Error:" text, witout any explanation). It occured that Error is thrown before any code from Custom Query tab is executed (i've checked that very carefully), so there is no chance to try-catch it.
Is there a chance to fix it or avoid it?

You can check that using sample EAExample repository. Create two templates:
test1
Code: [Select]
package >
element >
{Template - test2}
child elements >
< child elements
< element
child packages >
< child packages
< package
test2 - template fragment
Code: [Select]
custom >
{DateGen} : {Author} : {EA_REPOS}
< custom
with custom script: DocProperties
and code:
Code: [Select]
MyRtfData(#OBJECTID#);
then execute report generation using template test1 on package UML Modeling. It should throw some errors. If not - try to execute again :)

Oh! Important thing - i'm using version 10.0.1006
« Last Edit: September 06, 2013, 07:08:11 pm by bmrozinski »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: RTF template's Custom Script randomly throws E
« Reply #1 on: September 06, 2013, 08:14:08 pm »
Hi,

I know the problem and in the forum is also a thread from me. SPARX has a bug report. There's also another thread in the forum about sporadic problems.

The issue is:
- Some PCs have a lot of 'ERROR:'
  (the errors seems to come by chance, not reproducable)
- Other PCs are working with no problems
- In case of the error the Fragment Script isn't called
- Sometimes an error comes but everything works fine.
- It happens with VB and JScript (I haven't tried Javascript)

I tried a lot without success (EA 10.08).

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Bartek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: RTF template's Custom Script randomly throws E
« Reply #2 on: September 13, 2013, 08:36:41 pm »
Good news everyone:)

It seems that problem is fixed in the latest version of EA (10.0.1009).
We haven't seen any "Error:" problem since we upgraded to that version.

Thanks for helping.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: RTF template's Custom Script randomly throws E
« Reply #3 on: September 13, 2013, 09:53:48 pm »
Hi Bartek,

I'm not sure about it. I tested it with my windows 8 PC and the error occures randomly.

Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)