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

unwanted gaps when null

Status
Not open for further replies.

abezuide

Programmer
Jan 19, 2004
6
CA
Hi gurus,
I have fields that are sometimes null.
I put the code if :database_field is null then
return(FALSE);
else
return(TRUE):
end if;
in the formate trigger. I anchored them and made the property of the anchor vertically collapsable. Yet, sometimes the fields move up, but sometimes the gap remains. Can someone tell me why? Is there a property needed on the frame or something more to it than just the normal answers I get everywhere?

Thanks so much,
abezuide
 
Do not use anchors. Put the fields in a frame and set its vertical elasicity to Variable.
 
Hi,
Thanks for your answer. I do have it in a frame vertically elastic, it still won't work. Sob!
 
Are the fields touching upper boundary of the frame? If not, they should. Is frame entirely collapsing when the fields are nulls? Make the background of the frame colourful and see if anything is left of the frame when the fields are nulls.
 
Hi, thanks for the quick answer.
Let me explain exactly.
I have say six labels with fields in one frame set to vertically variable.
a field a
b field b
c field c
d field d
e field e
f field f
like that. Say for instance the field c and d can return without a value, I wrote the code if :field c is null then
return (FALSE);
else
return(TRUE); etc etc for each field that can return null.
in the formatting trigger. I also wrote in the fields' format triggers just for incase. With or without, setting anchors or not, doing whatever I want, the fields stay put,and won't move up so that the gap will go. I have even tried to make the fields vertically variable it still won't work. I am ready to pull my hair out.
I have now tried to pull the field a up so that it touches the border of the frame but that doesn't work either.

Thanks so much for helping.
 
Try putting each label/field combination in its own frame and setting Variable vertically for the frames.
 
auch, it is a huge report with about 500 fields from 7 tables of which about 300 of the fields can be null!
 
500 FIELDS? or 500 records? Assuming those are still fields, i.e. there is no repeating frame, I don't think that putting 500 frames (as discussed above) is more difficult then putting 500 anchors. At least, achcors can not be copied and pasted as frames. OK, here is another suggest, see if THAT can be easier done 500 times.
Create two formula fields in the group where your fields are. Datatype: Character, Width: 32727.
Code:
function CF_LabelsFormula return Char is
labels varchar2 := '';
begin
if :field1 is not null then labels:=labels||'a'||chr(13); else
if :field2 is not null then labels:=labels||'b'||chr(13); else
if :field3 is not null then labels:=labels||'c'||chr(13); else

-- and so on 500 tines

end if;
end if;
end if; -- 500 times.
return labels;
end;
The second formula-for the field column is done similarly. Then you just put those field side by side and make their vertical elasticity to expand.
There are more ways, but always something to be done 500 times...
 
Thanks so much for your help. Yes they were all individual items. Took me two hours to put them all in individual frames lol, but it worked!!!! You are a star!
 
Thank you.
I saw different reports, but never with 500 fields. Could you please satisfy my curiosity and explain what kind of report is this and how you managed to squeeze 500 fields into page?
 
lol, work related. Huge database, sorry, can't really say more. I tend to over exagerate too ha ha, only 267 items of which 200 can be null. The report sure looks beautiful now thanks to your help! Inconsistant isn't it? This report builder, once it works without the individual frames, next time it won't. However, the frames is a work for sure, so I'll remember that in future. Will save time to put it in from the start. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top