Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Reports 6, "No data found" message.

Status
Not open for further replies.

JamesRobb

Programmer
May 31, 2004
2
GB
I am creating an Oracle Report6 report with a master and several detail sections.

Does anybody know a simple way to conditionally print/not print a Boilerplate text item based on the presence/absence of rows resulting from a query?

When a perticular detail section has no rows attached, I am to substitute the headers and detail rows with a single-line text message "No records found where ...".

Is there any simple method to do this?

At the moment, I have placed a frame around the headers and detail lines for the detail section. This frame has a format trigger, which repeats the general SQL, selecting only the count(*). If the count is zero, the frame is not printed.
Another frame contains only the boilerplate message "No records found...", with a similar frame level format trigger which will set it to be printed if the sql count is zero.

This method seems over awkward. Does anybody know a simpler way to conditionally print/not print based on the presence/absence of rows resulting from a query?
 
Do the same using summary column in the group that would count detail records.
 
Forgive me for replying to my own question, but a colleague came up with a neater solution than my own:

I usually use the following trick that does not require any format triggers:
Create a boilerplate text with the text "No records found where..." which is not part of the repeating frame that is used to display the records in question and place it behind that repeating frame (Menu item "Arrange" -> "Send to Back").
Set the background colour of the repeating frame to "white" -> this will hide the boilerplate text as long as there are any records retrieved in the repeating frame. If the repeating frame is empty, it will not be displayed and you will see the boilerplate text.
 
The message "No records found where ..." makes the original question sound like the message is needed per each group with no detail records. In this case the idea of hiding the message behind the real data is not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top