Sapna20
6th December 2013, 09:08
Hi Experts,
I am printing the report using the functions brp.open and brp.close.
Is there any way to print the message "No data within Selection" if report doesn't have any data.
JaapJD
6th December 2013, 09:44
User rprt_open() and rprt_close(). rprt_close() has a mess_flag argument to do want you want.
bhushanchanda
6th December 2013, 10:28
Hi,
Other way is just to use a variable flag and initialize its value to some number say 0.
You can put it in the areas from where you are getting your data say a Select Loop. If it enters say a select loop, change its value. Now, before brp.close() check flag value. If its the same as what you initialize, put a message "No Data Within Selection".
e.g.
extern domain tcpono flag
flag = 0
select tcibd001.*
from tcibd001
where tcibd001._index1 = "1231"
selectdo
flag = 1
endselect
if flag = 0 then
message("No Data!")
endif