Optional text in Oracle reports

412 Views Asked by At

I am using Oracle Report Builder 10.1.0. I want to display some optional text in the report. I have written a Format trigger on the text box. When the format trigger returns false, I want blank space instead of the text box. But in my case, when the format trigger returns false, the text box is not holding its space. Instead the report content shifts up. How I can ensure that the text box holds its space and I get blank space when the format trigger is false.

1

There are 1 best solutions below

2
On BEST ANSWER

Here's what you should do:

  • create a frame (or a rectangle) around that text item; make sure that item is placed within the frame, i.e. frame should be "below" the item
    • the simplest way to do that is to paint the frame yellow (or some other color) so that it "covers" text item.
    • using the Layout menu, move it backwards as many times as necessary, until the text item appears on the screen. In Object Navigator, you should see that text item is part of the frame
  • stretch the frame across the report, so that it is as wide as possible. That will ensure that none of the objects placed below the frame will be moved up
  • set frame's "Vertical elasticity" property to "Fixed"
  • leave item's "Format trigger" as is (you don't have to modify it, if it works OK)

Now run the report. Even if text item isn't displayed, the frame will still be here, visible, keeping its height (as elasticity is set to "fixed")

Once you're satisfied how it looks, remove frame's background color, as well as its border.