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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank Subreport...

Status
Not open for further replies.

subbarao

Programmer
Oct 15, 2002
6
IN
Hello friends,

In my main report i'm calling a subreport, if the subreport didnt return any rows then i have to show somthing like
"Data Not Available"...

How can i do this...Please help me.. to come out of this...

Subbarao.
 
You have to put in subreport "Data is not Avaliable" as a text and suppress this text when there is data, if there is no data do not suppress it.

if you want in more details i will send it to you with scripts.

Ibtisam.
 
Dear Ibtisam,
You please send me, How to do this In Detail.
Thanks for your response.
 
1) Open your subreport and in the details section where you displaying all the fields.
2) Choose one of the fields that you want to show it Let's say for example the field name is "EMP_NAME".
Make sure that this "EMP_NAME" field will not have any data when you want "Not Available Data" message to be shown, otherwise will have data so "Not Avaliable Data" will not be shown.
If you want your message to be shown when your subreports will have empty data. other wise it always have data then no problem choose any field you want from your subreport.

3) Put the message "Not Available Data" as a text in details section.
4) Right Click on this text and choose "Format Field".
5) In the Common Tab tick the checkbox that is next to Suppress.
6) Click on the icon beside the Suppress and in the dialogbox that will be opened type this Formula:

if "EMP_NAME" = "" then
True
else
False

So when you insert this subreport in your main report it will show the data if there is data, if not then it will show your message "Not Available Data".

Ibtisam.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top