facebook

thisreportContext not defined error

  1. MyEclipse Archived
  2.  > 
  3. MyEclipse Reports
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #300118 Reply

    USDC-VT
    Member

    Just upgraded to 7.5 and running into issues with a BIRT report which had worked in 7.1..

    Namely, in Edit Data Set and in deploy/run a web report project, running a query against an Oracle 9 database causes a Birt error::

    A MyEclipse Reports exception occurred.
    Plug-in Provider:Eclipse.org
    Plug-in Name:BIRT Data Engine
    Plug-in ID:org.eclipse.birt.data
    Version:2.3.1.v20080829
    Error Code:data.engine.BirtException
    Error Message:A BIRT exception occurred: There are errors evaluating script “__bm_beforeOpen()”:
    ReferenceError: “thisreportContext” is not defined. (<inline>#2).. See next exception for more information.
    There are errors evaluating script “__bm_beforeOpen()”:
    ReferenceError: “thisreportContext” is not defined. (<inline>#2).

    Standard “create new workspace” resolution does not seem to work on this..

    Any thoughts or anyone run into this??

    Thanks,

    Howard

    #300160 Reply

    Brian Fernandes
    Moderator

    Howard,

    We made no changes to the reporting feature as far as libraries are concerned between 7.1 and 7.5, so upgrading should not have caused any issues. I have a few questions.

    Have you created your project in 7.1GA or in an earlier version of MyEclipse which you manually ported later?
    If you look at the containers added to the project, what is version of the MyEclipse reports container? By any chance did you customize this container?

    #300218 Reply

    USDC-VT
    Member

    Brian,

    I did likely create this project in 7.1GA or sooner. Slogged through the process of upgrading to Birt2.3 libraries last iteration.
    As I recall, I needed to create a dummy project and copy libraries from that project to this one – specifically replace WebRoot/report-viewer and WEB-INF/report-engine from dummy project into the current project and ensure that the Report Web Libraries where MyEclipse 7.0/Birt 2.3.1

    Did the same thing with this iteration..

    Don’t think I customized the Report Web Libraries or the others listed here.

    #300220 Reply

    Brian Fernandes
    Moderator

    Howard,

    Slogged through the process of upgrading to Birt2.3 libraries last iteration.
    As I recall, I needed to create a dummy project and copy libraries from that project to this one

    This was not necessary for 7.1 to 7.5 as we did not upgrade the BIRT libraries this time (there was one change, only if you required JNDI support). Even so, this should not have caused any issues; but would it be possible for you to reset your project to the state you were in before moving to 7.5 in case you made a mistake?

    Can you confirm that you have “Report Web Libraries (MyEclipse 7.0 / BIRT 2.3.1)” attached to your project? To make sure these are still valid, go to Window > Preferences > MyEclipse > Project Capabilities > Reports and hit “Restore Defaults”. Then please redeploy your project to see if that helped.

    Please let us know how it goes.

    #300230 Reply

    USDC-VT
    Member

    Brian,

    Appreciate the quick reply..

    I can confirm that I have MyEclipse 7.0/Birt 2.3.1 libraries attached to this project. Was also my impression from creating a dummy project in 7.5 that the Birt stuff did not change but thought it worth a try to use the new dummy project libraries in this project.

    I diff’d the .rptdesign xml file against an earlier (working) version and discovered some significant differences.
    Namely, the new .rptdesign had <method name=”beforeOpen”><![CDATA[thisreportContext]]></method> elements added to the data set I was using where as the former xml merely used a <experssion name=”value1″>params[“StartDate”]</expression> element.

    Kind of makes sense because I did experiment with adding parameters to the data set while working with the Data Set editor.
    Apparently when I do that it changed the report design and when I removed the parameters from the Data Set Editor it did not update the report design file. I had to manually remove the beforeOpen elements and re-add the expression elements.
    After doing that, the report began to function normally again.

    I am obtaining two parameters at run time for this query, StartDate and EndDate. BIRT prompts for these parameters when the report is run, which is as it should be.
    My attempt to run the query from the Data Set editor to preview results (which doesn’t seem to work as a rule..) changed the data set and there was some disconnect with the data set in the project when I changed it back.

    At any rate, it is now working and I have another thing to look for when reports get out of wack.

    Thanks,

    Howard

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: thisreportContext not defined error

You must be logged in to post in the forum log in