Debugging,BIRT,Javascript,was, computer Debugging BIRT Javascript


----------------------------------------------------------Permission is granted for the below article to forward,reprint, distribute, use for ezine, newsletter, website,offer as free bonus or part of a product for sale as longas no changes a Gone are those times when the companies and the organisations didn't need a hi-tech system to handle them. Owing to the considerable increase in the business sector and thus, an enormous increase in the complexity of the organisational struc


I was creating a report in order to answer a query that had been raised by a reader of BIRT for Beginners where they needed to use the List Box parameter within a report. In order to do this with BIRT I needed to use some Javascript in the beforeOpen event of my data set and I had a problem with the creation of this script. So I needed to find a way to examine the values of variables while the script was running to see what I was dealing with and where my error was coming from.There are ways to switch on logging from BIRT and dropping values out to a log file, which you can examine after an execution, but this is a little long winded for quickly creating and debugging snippets of Java code, so I wanted to find a faster, more immediate way to interrogate my script variables.Looking around on the web I came across a method that involves running BIRT in the console mode, which means that you get all output from your script generated immediately to a console window.This is great because it means that you can tweak your script and learn the results immediately, making debugging a quick and efficient process. CONSOLE MODEFirst we need to launch BIRT in Console mode, so we get to see our console window alongside the main BIRT IDE.Do this by running eclipsec.exe, using a command line like this:"C:\BIRT 251\eclipsec.exe"Notice that this is different to the usual eclipse.exe with the addition of the letter “c”, you will notice that BIRT runs in the normal way, but with a console available too.THE BASIC REPORTTo demonstrate the use of the console window for output, create a simple listing report based on any data set that you choose. For my example I used the ClassicModels customer table and just listed out all customers.ACCESSING THE SCRIPT AREANext I created a small piece of script in my report, which simply setup a for loop, to display a counter. There are various areas within a BIRT report where you can access the scripting area so for our example I am going to use the data set.Select your data set and then click on the script tab at the bottom of the main layout window, ensure that beforeOpen is the selected script event.GENERATING OUTPUT TO THE CONSOLEEnter this script:for(int i=1; i<11; i++){           Packages.java.lang.System.out.println ("Count is: " + i);}This would seem to set up a for loop to increment a variable (i) value and stop when the value of i reaches 11, then print the value of i to the console window. But it contains an error.Run your report and you should see the console window displays the error message:The full version of this report, including screen shots and source code, in full colour pdf is available for free download at http://www.BIRTReporting.com To fix the script, change the reserved word “int” on line 1 to declare the i variable correctly, as follows:for(var i=1; i<11; i++){           Packages.java.lang.System.out.println ("Count is: " + i);}The important thing to notice here, is that we have returned the value of the variable i to the console window while the report was running.This can of course be applied to any variable that you have in your script and should help with your scripting and debugging efforts.MORE INFORMATIONBIRT for Beginners, written by Paul Bappoo, the founder of the BIRT User Group UK presents an overview of the open source BIRT tools and the commercial enhancements available from Actuate, including...•    Eclipse BIRT Designer•    Actuate BIRT Designer•    iServer Express•    Interactive BIRT viewer•    Actuate BIRT Studio•    BIRT Spreadsheet DesignerWith walkthrough tutorials of the main features, including screenshots, from installation through data selection to formatting reports and fully graphical Flash charting this book will have you creating your own reports from scratch in only a couple of hours.If you are too busy to spend days learning software and want tangible results fast then BIRT For Beginners is for you.When you buy the book you will automatically get access to the readers section of this web site which includes BIRT report request forms that you can distribute to your end users, extra chapters in PDF format and an ever growing library of reports, tutorials, reviews, tips & tricks.Buy the book and get free membership of BIRT Reporting and the BIRT User Group UK at: http://www.BIRTReporting.comPlease feel free to share this address with your colleagues and inspire them to use BIRT to create great looking reports.I look forward to your feedback so please feel free to send me an email and let me know how you get on with BIRT, provide feedback on this guide, share your tips and tricks, or request help for specific problems. I can’t guarantee to personally solve everyone’s problems but there are some great BIRT related forums out there and you can find a growing list of links and resources on my site.

Debugging,BIRT,Javascript,was,

computer

Equipment Rental Software – Features And Cost

Equipment rental management software is an essential thing these days for any equipment rental company.A well-developed equipment rental software provides you with a variety of features that can really help you maintain and organise your cus ...

computer

5 Big Reasons Why I Migrated From Angularjs To React

I have 5 main reasons for my angularjs to react migration. No, it's not a comparison on which is better. A comparison between apples and oranges would make no point. React is a library, and angular is a framework. Both can do stuff in their ...

computer

How to troubleshoot McAfee error 2318?

Security software means McAfee! For many computer users, McAfee antivirus is the only choice for security software as it provides all the features and tools which are necessary for device and data protection. This robust antivirus merely sho ...

computer

Manage Multiple Counter With AlignBooks Point of Sale

Fulfilling your businesss needs which can grow your firm is our aim. AlignBooks is better known for providing a strong pillar to newly started or midway businesss. Those companies who dont want to fall back with irregularity manage the inven ...

computer

How to Autoplay Embedded YouTube Videos

Source: How to Autoplay Embedded YouTube VideosEmbedding a video or audio enables the users to share their videos with any of their preferred sites or any social networking platforms. They can do so by copying the embedded link of the parti ...

computer

3 Major Mistakes to Avoid in Retail Business

Truth be told, nearly half of the retail businesses survive longer than four years and which can be something to ponder for a newbie before stepping into the industry. However, this being said, it is also true that you can excel in the indus ...

computer

Start Your Own Computer Repair Business

1. Know your street value. In the early 90's, running a PC repair business centered around selling parts and products, with service on the side. Today, it's about selling hours. If you run a business, you need to consider the X3 rule. That m ...

computer

How Establishments Show Up in Restaurant Searches

The revolutionary rise of technology has made things easy-peasy for consumers in the restaurant industry. Unlike the old days, the availability of innumerable platforms has made it possible for diners to choose from various searching options ...

computer

GuildWars 2 :

The last expansion pack for Guild Wars 2 was Path of Fire, which was released in 2017 and brings you a new enemy-Balthazar, the evil god of war. Although this doesn't sound like another expansion pack currently in production, some fans ma ...

computer

Customer Support at the time of COVID-19 Pandemic

COVID-19 is the worst crisis of our time as we observe social distancing protocols being imposed all around the world. While these measures are a step in effectively managing the COVID-19 pandemic, Hospitality and Retail businesses are confr ...

computer

How to Choose a Contract Management Solution (CLM)?

Contract life cycle management (CLM) systems can simplify and automate contract creation, negotiation, execution and storage. They are an intelligent alternative to the tedious hand tools formerly used for these tasks, which lacked visibili ...

computer

Contacting Google Live Person to Resolve Your Issues

Users are fond of all the Google supported products and look forward to the best services. Also, Google as a whole has never disappointed its users and helped them at every point with its commendable services. Also, being a customer-oriente ...

computer

how to uninstall discord

How to Uninstall Discord in Windows 10? has supported open source technologies, our tool is secure and safe to use. To uninstall a discord from your windows, you'll use this method which is given below.USING THIRD PARTY TOOLS1. Firstly, you ...