Home » Developer & Programmer » Reports & Discoverer » Avoid extra space in field when "fixed" vertical elasticity is selected (Oracle forms 6i, Windows 7)
Avoid extra space in field when "fixed" vertical elasticity is selected [message #615909] Wed, 11 June 2014 02:23 Go to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hi All

Im having a report where one field displays user name in three lines.

If I use vertical elasticity as "Expand" for that user name field with out any main frame, the problem is it can extend to 4th or 5th line also, which should not happen because of the space limitation

If I kept that user name field inside a fixed main frame which is having 3 lines width, the problem is when the user name ends in second line, then an empty line is coming extra since that is inside a fixed frame

Please suggest a method to avoid the empty line when used a fixed frame

Thanks in advance
Sandy

[Updated on: Wed, 11 June 2014 02:23]

Report message to a moderator

Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615910 is a reply to message #615909] Wed, 11 June 2014 02:26 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you set the frame height to 3 lines (in Paper Layout Editor) and set its vertical elasticity to "Contract"?
Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615915 is a reply to message #615910] Wed, 11 June 2014 03:30 Go to previous messageGo to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hi LF, thanks for the quick reply.

When I use "Contract" and with the frame height as 3 lines, it is displaying till second line with an empty line, though there is enough text to fill the third line..

-
Sandy
Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615918 is a reply to message #615915] Wed, 11 June 2014 03:40 Go to previous messageGo to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Tried increasing the frame height to 4 lines, then it is printing the 3rd line but unwanted empty space in 4th line as in the attached image..
https://drive.google.com/file/d/0B-srYhfcBjaLOEREV2hYY0dNam8/edit?usp=sharing
  • Attachment: Untitled.png
    (Size: 62.14KB, Downloaded 402 times)

[Updated on: Wed, 11 June 2014 03:42]

Report message to a moderator

Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615927 is a reply to message #615918] Wed, 11 June 2014 04:36 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As of vertical elasticity (VE):
  • set field's VE to "contract"
  • set frame's VE to "variable"
Works as expected (at least, for my test case).




Here's onother option (which isn't pretty at all, but ... I can't think of anything smarter now).

Suppose that your query looks like this:
select id, user_name from a1_test
As you are limited with space, you might separate USER_NAME into three columns, using the SUBSTR function, such as:
select id,
  substr(user_name,  1, 15) name_1,
  substr(user_name, 16, 15) name_2,
  substr(user_name, 31, 15) name_3
from a1_test
where id = :par_id


Paper Layout:

/forum/fa/11945/0/

Everything (fields & frames) have vertical elasticity set to "Variable".

Additionally, apply format trigger for the F_NAME_3 field, which will not display it if its length = 0:
function F_name_3FormatTrigger return boolean is
begin 
  return (:name_3 is not null);
end;


Table contents:
SQL> select * From a1_test;

        ID USER_NAME
---------- -----------------------------------------------------------------
         1 This is a long text which exceeds length of 3 lines (max allowed)
         2 Text shorter than 3 lines - shrink!


Let's try it:

/forum/fa/11946/0/

As you can see, it is ugly - SUBSTR doesn't pay attention to words so it breaks a line in a stupid manner. You could write a function which takes care about it and call that function instead of SUBSTR.

On the other hand, as you use a proportional font, restricting line length doesn't have to be the best choice.
Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615936 is a reply to message #615927] Wed, 11 June 2014 05:37 Go to previous messageGo to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hi LF

Thats great.. !!! Made it to work with your suggestion (field - contract, frame - variable).. Worked as a charm as you said..

I shall also try the other option later when time allows, but due to time limitation, I couldn't do it now.

Thanks a Ton
Sandy
Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615938 is a reply to message #615936] Wed, 11 June 2014 05:44 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'd rather NOT try the second option; it's a bad idea anyway.
Re: Avoid extra space in field when "fixed" vertical elasticity is selected [message #615985 is a reply to message #615938] Wed, 11 June 2014 07:57 Go to previous message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
haha, anyhow an idea should get appreciation Smile
Previous Topic: what is this erorr?
Next Topic: enable automatic recovery
Goto Forum:
  


Current Time: Mon Nov 18 16:34:25 CST 2019