AUTHOR'S MAIN SITE   > > > > >   TABLE OF CONTENTS for version 2 Open Office database tutorials.

Open Office 2 Base (database) Tutorials
Installing and introduction to Report Builder

You may find that the database being shipped with OpenOffice (ver.2) delights you as much as it has me. This page, and the others linked to it, can help you use it.

Forget any experiences you may have had with Adabas, which came with Star Office, the commercial version of Open Office 1. The Open Office Version 2 database, "Base", aka "ooBase", is unrelated. And remember that Open Office, including Base, is free! But don't let that fool you. It's not new. Big organizations, civil and governmental, are adopting it as their standard office suite... and saving million$.

There's more about ooBase in the main index to this material.

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a narrow window.

Page contents © TK Boyd, Sheepdog Software ®, 3/06.



Sun's Report Builder Extension for ooBase _______________

I don't, in general, like extensions, add-ons, etc.

The Report Builder, from Sun Microsystems, for ooBase is absolutely and exception to that rule as far as I'm concerned.

Confession: For several years now, I have been promoting ooBase even though in some respects I have been operating on faith.

I know ooBase is a good database package... but sometimes I feel frustrated by things I can't find a way to do.

Well, thanks to hours of reading the oooForum posts, I knew that someday I needed to look at the Report Builder extension. Oh no, I said. One more thing to go wrong. One more layer to integrate. Excuses, excuses, excuses.

Thankfully, "SlideRule" pestered me, and got me to try the Report Builder. He/she also kindly provided the URL for where I had to go to GET Report Builder.

Report Builder from scratch_________

I'm writing this while my experiences as a new user are still fresh in my mind. I'm using ooBase 2.4 on a Windows (ugh) XP box.

===

1) If they aren't already, get your basic ooOffice applications set up and running nicely.

2) Go to the OpenOffice.org extensions repository, navigate (menu at left) to By Application | Base. Go to the page for Sun Report Builder. You have options at this stage which I don't fully understand. Here's what I did; it seems to work.

3) Click on the "Get It" (or "Download") button. I elected to save the result (sun-report-builder_0.oxt) onto my computer. It was 2.9meg.

4) I then made sure, as per instructions, that no OpenOffice application was running.

5) Double clicked on the sun-report-builder_0.oxt file. I don't think my PC went off to the net during the install. I don't know if the .oxt file is now redundant. I'm leaving it where it was, just to be safe.

6) Either immediately, or after I started ooBase, which I did shortly thereafter, a dialog came up asking me to accept terms. It requires you to at least scroll down through them all. (I of course read every word and had my lawyer check the terms.) I then clicked "Okay" or "Next" or some such.

7) If not already up and running, I then started ooBase, not knowing how else to get into the Report Builder. (ooBase may have started during the install... I don't remember for sure.) It could, after all, be a separate, stand-alone application... but it isn't.

8) Things looked pretty much as before. I opened a little "test" database that I had handy.

9) In the main project management window of ooBase, the fourth menu entry is Insert. If you click on that, one of your choices is "Report". Click that, and you will launch the Report Builder. I'm not sure why they call this "inserting". Perhaps they're thinking that you're "inserting" something new into the collection of tables and forms and queries and etc which make up "the database" when you use that term in a broad sense for your answer to managing some collection of data?

(By the way... you can still get to the good old, limited old "Report Wizard" if you want to... you get that by selecting (left column) "Reports" in ooBase's main project management window, and then clicking on "Use Wizard to Create Report" in the "Tasks" pane....)

(Further to "By the way..."... Oh! I've just noticed, in the same place, "Create Report in Design View". This isn't present in my ooBase 2.2 machine, which has not been given the Report Builder extension. I don't know if the difference is due just to the extension, or to the difference between 2.2 and 2.4. Wherever it comes from, this option ALSO starts up the Report Builder.)

10) Whichever way you start it, the Report Builder design window is PRETTY!

You get a new window, with "{name}- OpenOffice.org Base Report" in the title bar, and a big pane with three wide rows: Page Header, Detail, and Page Footer.

11) Now... please understand that I'm a 20 minute "veteran" of Report Builder at the time I write this... but I'm a many lifetimes veteran of banging my head against other database managers, and I can get SOMETHING done with Report Designer... just don't take any of the shortcomings in what follows to be Report Designer's fault. But I want to show you it in limited- by- my- ignorance action. You can then proceed from there.

12) For the sake of this demo, you need a little database. It quite possibly needs to be "registered" with your installation of OpenOffice. (It will be if, when you create it, you don't untick the box in the first "new database wizard" dialog.)

You can probably just use something you already have, but in a moment, I'll give you details of the one that will EXACTLY work in the demo of Report Designer that I'm going to give you.

The database is to hold a personal telephone number directory. It consists of just one table: PhoneMain with the following six fields:

Create the table, and fill it with some values. Be sure to have "people" from at least two countries. The country code for the US is 1, and for the UK it is 44

13) Fire up the Report Builder. (See step 9, above)

14) Let's "walk" before we run.... Find (by hovering mouse over icons) the LABEL FIELD icon in the toolbar... third from left. It has "ABC" on a plain button. You DON'T want the one next door, "ABC" in a box, "Text Box" control. Click on the "Label Field" button, and it should "go down".

Move your mouse pointer into the largish area of dots- in- a- grid, a little to the right of the "Page Header" Row. You want it in the area under the "...1....2....3....." ruler. Hold the mouse button down, move the mouse a little down and right, release mouse button. In other words "drag out" a control onto the Page Header area of the report designer.

As soon as (or sooner) you release the mouse button, on the right hand edge of the Report Builder window, you will see the properties of the control you've just added to the report. In this case, there is just one tab, "General", and under it the properties Name, Label, Position X, etc, etc.

If you don't see that, you've probably somehow de-selected the control. Or turned off the view of the properties pane. Just click within the box you dragged out to re-select it. The box, so far, has, quite small, the word "Label" in it.

In the properties, change the label to "My First Report". What's on the WISIWIG part of the designer won't change until you leave the edit box of the label property.

Click on the "..." button to the right of the font name. Change the font size to 15.

Do "File | Save".

Have a look in the reports list of the ooBase project manager window. You will see the report you just created listed there, just like, and alongside, any reports created with ooBase's built in Report Wizard. Right click any of them, select "Edit", and they come up in whichever tool created them.

14) Don't bother trying to run your report yet. It should give you something, I would think, but it didn't when I tried it.

15) Click on the Report Navigator icon... top row, near middle, small red line (part of a compass). In the window that comes up, click on the top entry, "Report". Notice that the properties pane (right hand side of window) now has two tabs. Go to the data tab. Leave Content Type "Table". Set Content to PhoneMain, using the lookup control. And then click someplace else.

16) When you set the Content to PhoneMain, another small window should have popped up titled "Add field...", and listing the fields of the PhoneMain table. Drag Sname and Number into the "Detail" part of the report design. You'll find that each gives rise to a label. which will have "Sname" or "Number" in it, and a data field which will be a rectangle.

You can move these around and resize them. You may need to use the pane's scroll (horizontal) bar to find everything you've put on the report design. Drag the right hand side of the two labels left until the label control is no bigger than it needs to be.

Move all four elements into a single line (row) near the top of the "Details" area. If you drag over an area larger than the furthest extent of all four elements, you can select all of them, and then drag them together, without messing up existing relative positionings.

Now drag the boundary between the "detail" and the "page footer" section up, so that the "detail" section isn't higher than it needs to be.

Again: save what you've done.

17) There is a "Run Report" (or "Execute Report") button on the designer's toolbar, which I suggest you use while developing a report. Once the design of the report is finished, you can run it by double clicking on its name.... but close the designer first, if launching the report this alternate way. With the "Run Report" button you get a nice (if less than informative!) error message when there are problems in the report's design. Launch a faulty report the other way, and you may merely get an hour glass briefly, but then nothing. The main ooBase project management window will still be sitting there, smug and "working",... but no report. When this happened to me, I could still open the report for editing.

(Aside: While you WILL get a "result" if you don't bother to close the report design window, first, you may also find that ooBase won't shut down nicely if you fail to close the report design window before the next step. Or something else may have given rise to two Ctrl/Alt/Del events for me... I'm not sure. When I DID close the design window before running the report, ooBase "behaved". End of Aside.)

That's it! You've seen Report Builder in action, I hope. I was delighted by how easily it installed, how well a "third party extension" integrated with the main ooBase code.

"Oliver" time.... more......

Now let's "get clever".... We're going to group the output by the country the person's phone is in.

18) Close the report.

19) Right-click on the report's name and click "Edit". The report design tool should re-open.

20) Click on the "Add Field" tool button... just to the left of the Report Navigator, 3x4 grid with green spot in center.

Drag Country onto the Detail part of the design.

21) Right click within the Detail area, and select "Sorting and Grouping".

Use the lookup pulldown to put Country on the first line, and close the sorting and grouping window. Your design should have gained a "Country Header" row, or to give it a more usual name in this context, band.

22) Drag the country label and field rectangle up into the "Country header" band.

Tidy up spacings, control size, etc, as before.

23) Save report design and close designer.

24) Double click on the report's name in the ooBase main project management window.

Ta! Da! (I hope!!)

Further odds and ends....

I even got lucky... my first installation was of version 1.0.1. When 1.0.2 came along the next morning (typical!), I tried the from- within- ooBase update- the- extension mechanism, and it seemed like it "just worked" :-)

I'm not going to explain it here and now... but I even got the report to add up the area codes present in each group. While the total of the area codes isn't very useful (!), it does show that more useful things CAN be done. A "trick" to look out for: If you try something similar, and you're still on Report Builder 1.0.1, be sure to untick the "pre-calc" or somesuch tickbox on the Data tab for the properties of your sub-total control. (P.S.: Brave New World is with us! I wrote the first draft of this last night, upgraded to 1.0.2 this morning, and now tickboxes that I'm SURE were there 24 hours ago have vanished!!)

It's not Report Builder's Fault!____________

If you haven't worked with something similar previously, you may think that Report Builder is "dumb". Rather like, at first, people working with relational databases would rather work directly with the tables, rather than creating forms through which to access the tables.

I have to tell you that the way Report Builder goes about creating a report is very similar to other products I've used. The problem isn't with Report Builder, it's with the way these things are "always" done. I actually quite like the Report Builder interface... it is easier to use than some I've used before. "Easier" being carefully chosen from the subset of relative terms.

It took me a long time to understand something. Don't come to a computer too firmly wedded to what you want to do. Try to come to it with an attitude of "I need to get a result. How we get there isn't too important to me. I'll try to learn how the programs that exist get people to where they want to be, and not be too insistent on the route of my choice."

Enough preaching from me! You go and enjoy Report Builder!





Fixing a "dead" report________________

At one point, after fiddling with grouping, I was left with a report I could open for editing, but couldn't run. I'd tried putting some things in. They didn't work, so I took them out again... I thought. I think I left scraps behind.

With the report open in the designer, I clicked on the Report Navigator button (little bit of red in it). One of the "foo Functions" entries had a "+" in front of it. When I clicked on that, a list of stored functions appeared. I right-clicked on each, selected delete. Once these were cleaned out, my report worked again.



Editorial Philosophy

I dislike 'fancy' websites with more concern for a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive site WITH content deserves praise... as long as that pretty face doesn't cost download time. In any case....

I am trying to present this material in a format which makes it easy for you to USE it. There are two aspects to that: The way it is split up, and the way it is posted. See the main index to this material for more information about the way it is split up, and the way it is posted.


Ad from page's editor: Yes.. I do enjoy compiling these things for you... I hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

PLEASE >>> Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages <<< PLEASE


If you liked this ooBase tutorial, see the main index for information other help from the same author.

Editor's email address. Suggestions welcomed!     - - -    Want a site hosted, or email? I like 1&1's services.




Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org


One last bit of advice: Be sure you know all you need to about spyware.

. . . . . P a g e . . . E n d s . . . . .