Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:42:06+00:00 2026-06-10T11:42:06+00:00

i’m having trouble running a birt report via web. The report behaves as expected

  • 0

i’m having trouble running a birt report via web. The report behaves as expected when running in html, but some scripts are not working properly via web viewer. I’ve got this script running on the “initialize” phase of the report (i know that a lot of the lines are not neccessary, just want be sure I got rid of any possible scripting syntax errors):

var inc_number;
var inc_number_old;
var contador;
var grupo;
var proveedor;
var contador_no_encaminadas;
var contador_encaminadas;
var contador_cerradas;
var estado;
var cliente_nombre;
var cliente_apellido;
contador = 0;
contador_no_encaminadas = 0;
contador_encaminadas = 0;
contador_cerradas = 0;
inc_number_old = 0;

And then i’ve got another little script running in a table row, with onRender triggering:

inc_number =  row["Incident Number"];
grupo = row["Assigned Group"];
proveedor = row["Vendor Name"];
estado = row["Status"];
cliente_nombre = row["First Name"];
cliente_apellido = row["Last Name"];

if (inc_number != inc_number_old){

    contador++;

    if (proveedor != null && grupo != "SIGMA")
        contador_encaminadas++;

    if ((proveedor == null || proveedor == "") && (grupo == "SIGMA") && (estado != "Resolved" && estado != "Closed"))
        contador_no_encaminadas++;

    if (estado == "Resolved" || estado == "Closed")
        contador_cerradas++;
}   

inc_number_old = inc_number;

vars["contador_cerradas"] = contador_cerradas;
vars["contador_incidencias"] = contador;
vars["contador_no_encaminadas"] = contador_no_encaminadas;
vars["contador_encaminadas"] = contador_encaminadas;

As you may have noticed, all of this is just for displaying different sets of counts. I set some Data fields in a table calling for this variables (last four lines of the previous code block) so the report shows this counts. Well, all of this works perfectly when running via the preview tab in the workspace, or hitting the html option in the “Run” menu, but when I try to run it via web viewer, all of the counts display 0 (probably the default value of the variables). I’d be very thankful if anyone could give me some help in this. Somehow I’ve got some other scripts running on cells, onRender too, that are working ok regardless the preview option I choose.

p.s. I’m working with Birt v2.5.1, I know it’s a bit old, but it’s the only supported version to integrate with BMC Remedy ARS, and that’s what I need it for. Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:42:07+00:00Added an answer on June 10, 2026 at 11:42 am

    BIRT has different script flows for “direct” output and different for Web Viewer. There are two report creation phases: “generation” and “presentation”, see BIRT events flow diagrams. In “direct” generation onCreate and onRender events are mixed and triggered together through generation phase (onCreate row 1 ; onRender row 1 ; onCreate row 2 ; onRender row 2 etc.). initialize script is exeuted once, before all.

    In opposite, Web Viewer has split generation and presentation phases: first all onCreate are executed, then report is virtually closed (think “all script data is lost”), then all onRender are executed. initialize is executed twice, first time before generation phase (onCreate), second time before presentation phase (onRender). onRender may not have access to row['...'] variables, but have access to it’s report element attributes, like this.foo.

    It is good to have all data manipulation in onCreate rather than onRender script, because script variables are kept in one consistent phase. Presentation, for some pages may be ommited (I’m not sure), so you may have wrong results when jumping between pages in web viewer.

    If you have to pass some data between generation and presentation phase, you have to store it in persistent global variable:

    setPersistentGlobalVariable("name", value); //in generation phase
    ...
    var value = getPersistentGlobalVariable("name"); //in presentation phase
    

    There is no need to define that variable in Report Designer, just use functions above. Only one small trap may be encountered when using persistent global variables – they must be serializable in Java (it is not obvious feature for some Java data types).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.