Hello all,
We also wanted to get rid of the message ‘no data to fetch’. The solution of Sandy below seems to work fine, but I think we found an easier and more transparent solution.
We have made one dummy object. The where-statement of the dummy object only contains: ‘’ . It references an alias of a small table in our database. We put as self join on a column of this table (in our case: dummy_table.nummer = 1). Now only one row will be retrieved, whenever this table is queried. And now instead of using the union option Sandy mentioned do the following.
Create a context in your universe that contains only the self-join on the dummy table. If you didn’t use any contexts at this time, than you will have to put all the other joins in another context.
Now in the querypanel of BO make your query including the dummy object. If everyting is Ok than BO will generate two SQL statements, where one is the query of your choice and one is the sql to query the dummy table. This last query always returns one row, so no data the fetch will never pop up!
Another advantage is that the dummy object will not be linked to any other object in your query, so it doesn’t bother you at all!
This solution is tested on an oracle db and BO 5.01
Regards,
Robert Duindam
RAAPLEX
e-mail: robert.duindam@raaplex.nl
From: Sandy Smyth[SMTP:ssmyth@HORIZONCON.COM]
Re: Suppressing message box in BO report during refresh
A trick I have used to get around this problem is to create a class of “report objects” in my universe consisting of blanks and zeroes not attached to any table. I also create at least one of these objects that refences a dummy table such as SYSDUMMY1 in DB2 (v5 and higher) or DUAL in Oracle. The objects that don’t reference a table will not parse in Designer, but they work fine as long as at least one object in the query does reference a table.
I can then take a report where I don’t want to see the “No data to fetch” message and create a union query using the blanks, zeroes and the object referencing the dummy table. This will guarantee that at least one row will
be returned by the query. The zeroes added to numeric columns will not influence the result, and I can create a report filter to not display the union row. I have used this technique for long-running reports that contain
multiple data providers where I do not want them to stop processing if one of the queries does not return data.
Pls report bounces in response to postings to BUSOB-L-Request@listserv.aol.com
Web archives (24 hrs. a day now!): listserv.aol.com/archives/busob-l.html
OR search: Mail to listserv@listserv.aol.com, ‘search a_phrase in BUSOB-L’
Unsubscribe: Mail to listserv@listserv.aol.com, ‘unsubscribe BUSOB-L’
DISCLAIMER******** Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. Fortis sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.
This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s).
Fortis rules out any and every liability resulting from any electronic transmission.
Listserv Archives (BOB member since 2002-06-25)