Get a full PDF copy of this guide, with screen shots, free at <a class='bbc_url' href='
http://www.BIRTReporting.com'>BIRT Reporting Articles, News and Support</a>. <br />
<br />
INTRODUCTION<br />
<br />
Recently I needed to create a purchase order report and one of the challenges I found whilst doing this was that I needed to create an address block at the <br />
<br />
top of the report for the suppliers address. In itself this was easy of course, I just placed my address fields, one after the other in a grid cell. <br />
<br />
But I found that some of the supplier addresses did not use all the fields available and the result was that I had gaps in my address block where the blank <br />
<br />
fields were.<br />
<br />
It appears that there are a number of ways to solve this problem, I looked on the forums and found many solutions. In this quick guide I present the quickest <br />
<br />
and easiest method that I found so you too can have well formatted addresses, or for that matter any other data that requires blank fields to be removed from <br />
<br />
the report layout at run time.<br />
<br />
THE PROBLEM<br />
<br />
I have a report with an address block. Typically this could be a purchase order, an invoice or a supplier/customer listing.<br />
<br />
In my case it was a purchase order, here is a screenshot of the report layout, showing the address block.<br />
<br />
You can see that I have created a grid and populated the cells with the address fields from my database.<br />
<br />
When the report is executed, any fields in the address block where there is no data, leave an ugly gap, as in the following screen shot.<br />
<br />
THE VISIBILITY PROPERTY<br />
<br />
In order to make the address fields disappear when not populated with data, we can use the field visibility property.<br />
<br />
Select the field you wish to hide when empty and from the properties section in the lower portion of the screen, select the visibility tab.<br />
<br />
Check the box “Hide element” and select the radio button “for all outputs”<br />
Note that you can elect to hide empty fields for specific output types, by selecting the radio button “for specific outputs” this then allows you to select <br />
<br />
which output formats will behave in this way and which wont, as per the following screen shot.<br />
<br />
Once you have selected the output style to be affected, select the function button to the left of the Expression field.<br />
<br />
And you will see the expression builder.<br />
<br />
Enter the formula as follows:<br />
<br />
row["Address1"]==""|| row["Address1"]==null<br />
<br />
Where Address1 is the name of the field whose properties you are currently editing.<br />
<br />
Here is the expression builder for the Address1 field, with the formula entered.<br />
<br />
Now when the report is executed, any blank fields vanish and all the other fields are moved up to fill the gap.<br />
<br />
MORE INFORMATION<br />
<br />
BIRt 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 <br />
<br />
enhancements available from Actuate, including...<br />
<br />
Eclipse BIRT Designer, Actuate BIRT Designer, iServer Express, Interactive BIRT viewer, Actuate BIRT Studio, BIRT Spreadsheet Designer<br />
<br />
With walkthrough tutorials of the main features, including screenshots, from installation through data selection to formatting reports and fully graphical <br />
<br />
Flash charting this book will have you creating your own reports from scratch in only a couple of hours.<br />
<br />
If you are too busy to spend days learning software and want tangible results fast then BIRT For Beginners is for you.<br />
<br />
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 <br />
<br />
distribute to your end users, extra chapters in PDF format and an ever growing library of reports, tutorials, reviews, tips & tricks.<br />
<br />
Buy the book and get free membership of BIRT Reporting and the BIRT User Group UK at: <br />
<br />
<a class='bbc_url' href='
http://www.BIRTReporting.com'>BIRT Reporting Articles, News and Support</a><br />
<br />
Please feel free to share this address with your colleagues and inspire them to use BIRT to create great looking reports.<br />
<br />
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 <br />
<br />
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 <br />
<br />
forums out there and you can find a growing list of links and resources on my site. <br />
<br />
Paul Bappoo<br />
<a href='mailto:' title='E-mail Link' class='bbc_email'>Paul@BirtReporting.com</a><br />
<a class='bbc_url' href='
http://www.BIRTReporting.com'>BIRT Reporting Articles, News and Support</a>