Mark the Database Column based on what counting should be done.
For Example if, Report is related with Purchase order print , then PO_Header_id or Segment1 can be treated as Base Database Column from SQL Query.
or if report belongs to Order Management , and records are fetched based on Order numbers then HEADER_ID from oe_order_headers_all.
then on RTF template Use if/end if condition
<?if:count(//PO_HEADER_ID)=0?>
or
<?if:count(//HEADER_ID)=0?>
*******************************
We can do it in 2 ways.
In rdf, we can define a summary column (say
CF_COUNT)which counts the number of rows of a group, and in
the rtf layout create a text form field and put the help
text as <?if:CF_COUNT=0?>No Data Found<?end if?>
Other way, no need of summary column, in the rtf layout
create a text form field and put the help text as
<?if:
count(./LIST_G_SO_NUMBER/G_SO_NUMBER/LIST_G_SO_NUMBER1/G_SO_NUMBER1)=0?>No
Data Found<?end if?>
where
./LIST_G_SO_NUMBER/G_SO_NUMBER/LIST_G_SO_NUMBER1/G_SO_NUMBER1
is the expected path to the group, from the root of the xml,
that we define. This expression will count the number of
occurances of the group "G_SO_NUMBER1"
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13247/viewspace-2145969/ ,如需转载,请注明出处,否则将追究法律责任。