Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Testing Javascript Code
Testing Javascript Code [message #1064960] Fri, 21 June 2013 21:45 Go to next message
JP Redro is currently offline JP Redro
Messages: 167
Registered: July 2009
Location: India
Senior Member

Experts,

Here i have a quick question, We are using javascript code for our requirement. Suppose we have written a js code on table. How to test whether it is working or not. Ex:
When we written the SQL query, we are testing in TOAD or some other tools. Like that we have any tool or process to check the javascript code before going to embedded into template.

Usually javascript can execute via html page. but here we need to connect DB.


Thanks,
JP
Re: Testing Javascript Code [message #1065234 is a reply to message #1064960] Mon, 24 June 2013 19:30 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher Clark
Messages: 130
Registered: January 2013
Senior Member
Can you explain what your JavaScript does in a little more detail so I can understand what it's doing? If your using the JavaScript in a table depending on what your doing you can write messages to the console in BIRT using

Packages.java.lang.System.out.println("Some message");

to see what your code is processing.
Re: Testing Javascript Code [message #1065312 is a reply to message #1065234] Tue, 25 June 2013 06:03 Go to previous message
JP Redro is currently offline JP Redro
Messages: 167
Registered: July 2009
Location: India
Senior Member

Yes, i am writing on dataset, example code as follows.

queryText = "Select employeenumber,";
queryText = queryText + "lastname,";
queryText = queryText + "firstname,";
queryText = queryText + "extension,";
queryText = queryText + "email,";
queryText = queryText + "officecode,";
queryText = queryText + "reportsto,";
queryText = queryText + "jobtitle";
queryText = queryText + " from employees";
if (params["P_EMPLOYEENUMBER"].value != null && params["P_EMPLOYEENUMBER"].value != "") {
this.queryText = this.queryText + " where employeenumber >= " + params["P_EMPLOYEENUMBER"].value;
}


Thanks,
JP
Previous Topic:Problem referencing report library
Next Topic:bar chart, series spacing
Goto Forum:
  


Current Time: Fri Jul 25 09:55:31 EDT 2014

Powered by FUDForum. Page generated in 0.01516 seconds