Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Testing Javascript Code
Testing Javascript Code [message #1064960] Sat, 22 June 2013 01:45 Go to next message
JP Redro is currently offline JP RedroFriend
Messages: 181
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 23:30 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher ClarkFriend
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 10:03 Go to previous message
JP Redro is currently offline JP RedroFriend
Messages: 181
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: Thu Apr 25 15:45:21 GMT 2024

Powered by FUDForum. Page generated in 0.03442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top