Home » Developer & Programmer » Reports & Discoverer » not print text item
not print text item [message #180759] Wed, 05 July 2006 03:05 Go to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Hi all

I have a problem in Report 6i
I created a report there is many field and text item
there is any possibility that if any field is empty related text item not print just like field.

suppose:

Text item
-------------- ---
Name........:- abc
Father Name.:-

any possibility if field father name empty, text "Father Name.:-" doesnt print in report.

[Updated on: Wed, 05 July 2006 03:57]

Report message to a moderator

Re: not print text item [message #180776 is a reply to message #180759] Wed, 05 July 2006 04:13 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Yes, You use a FORMAT TRIGGER on the field.

MHE
Re: not print text item [message #180777 is a reply to message #180776] Wed, 05 July 2006 04:14 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I have no idea can you explain there

Thanks
Re: not print text item [message #180783 is a reply to message #180777] Wed, 05 July 2006 04:32 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Assume you have fields employee_id and last_name then you can create a trigger on the field like this: (double click the gray circle in front of the item in the navigator)
function F_employee_idFormatTrigger return boolean is
begin
	-- employee id is hidden when the last name
	-- starts with A, D or E
  IF SUBSTR(:LAST_NAME,1,1) NOT IN ('A','D','E') THEN
    return (TRUE);
  ELSE
  	return (FALSE);
  END IF;
end;


MHE
Re: not print text item [message #180798 is a reply to message #180783] Wed, 05 July 2006 05:25 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
HI
Actual here i am not talking about data base feilds I am asking about constant things such as Text item.

Can Text item can Hide in report.


Re: not print text item [message #180800 is a reply to message #180798] Wed, 05 July 2006 05:37 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
kamran.it wrote on Wed, 05 July 2006 12:25

Can Text item can Hide in report.
Why don't you try it. I did and yes, you can write a format trigger on a text item and on lines etc.

MHE


Re: not print text item [message #180805 is a reply to message #180800] Wed, 05 July 2006 06:24 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
you wirte here right function I know but Sir I think I am enable to understand you.

Actual I have told you I dont want to hide data field I want to hide only text item which I put with the help of TEXT icon form the left side of report (in layout model)

1st I put a field with the help of ABC icone in layout model then I chose the source of this item.
2nd I put a text item in front of this field.
here I want to write a code if field is null then field and text item should not be print.

I think now you understand me.

best regards


Re: not print text item [message #180815 is a reply to message #180805] Wed, 05 July 2006 07:11 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
*deep breath*

You can use a format trigger on both fields. We can both agree on that, right? You can also use the same code in the different format triggers. I have attached a small example based on the DEPARTMENTS table in the default HR schema. If a Manager_id is null, the manager id is not displayed, nor is the text in front of it.

Another option is to group the fields in a frame and set the format trigger on that level.

Does this answer your question?

MHE
Re: not print text item [message #180842 is a reply to message #180815] Wed, 05 July 2006 08:15 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
*deep breath* *deep breath* *deep breath* *deep breath*

Sir
for your kind ref. I attached a picture
  • Attachment: untitled.JPG
    (Size: 51.78KB, Downloaded 756 times)
Re: not print text item [message #180846 is a reply to message #180842] Wed, 05 July 2006 08:33 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
One more time: Add a format trigger to the field you want to display conditionally. I know this is getting annoying but that is the object that determines whether a field is displayed or not. My example wasn't that bad: it removed the caption if a given database field was empty. Now you want to do the same to the heading if no occurrences of the field are filled. I've attached another demo illustrating how to get it to work. I used one extra field (a summary item) in the data model. The report takes a department_id and it selects all departments with an id higher than the one you entered.

How is that? Can you see that the mechanism is quite similar to the previous demo I uploaded. You just needed to mimic it on another field.

MHE

[edit]<bad joke>and you need to see a doctor (all that heavy breathing, you know)</bad joke>. But bear in mind the following. It is you who is asking the question here. With the lack of information you gave it was impossible to guess the precise solution. If you give peanuts you get monkeys Wink

[Updated on: Wed, 05 July 2006 08:37]

Report message to a moderator

Previous Topic: Is there any way to Get Total Pages ?
Next Topic: report page problem
Goto Forum:
  


Current Time: Sun Jun 30 11:39:30 CDT 2024