Home » Developer & Programmer » Reports & Discoverer » dashed line on boilerplate multiline item (Oracle reports 10g)
icon4.gif  dashed line on boilerplate multiline item [message #336727] Mon, 28 July 2008 15:44 Go to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member
Hi,

I'm creating a report that needs to look like a form that was completed. Therefore I have text items (boilerplate) that come from thet database. These items have a fixed horizontal elasticity and a variable vertical elasticity. When the item exceeds the horizontal length the item expands so 2 lines become visible.

I would like to add a dashed line to the item. The length of the line should be as long as the complete length of the boilerplate text. Even if the text is only 2 or 3 characters the line should cover the entire item.

I can do this with a line item, but this only works if the item had only 1 line. When the items has 2 lines this will not work anymore.

so I would want something like this :
Text Item => XXXXXXXXXXXX
line item => --------------------------------


When the item exceeds it's horizontal elasticity i would like something like this:
Text Item => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
line item => --------------------------------
Text Item => XXXXXXXXXX
line item => --------------------------------


Anyone know how to do this ?

Kind regards,

Mike.

[EDITED by LF: added [pre] tags to preserve formatting]

[Updated on: Mon, 28 July 2008 15:51] by Moderator

Report message to a moderator

Re: dashed line on boilerplate multiline item [message #336736 is a reply to message #336727] Mon, 28 July 2008 15:59 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I really wouldn't know a way to "jump into" an item and "draw" a line in the middle of this item (not to mention items that span more than two lines).

Would use of the "Underline" font formatting be of any help? I guess not, but - I don't see another way at the moment.

Except, just as pure theory: if you choose to use non-proportional font (as Courier, for example), you might calculate field value's length. Also, create a formula column which would "draw" dash lines in a loop (number_of_characters / dashs_per_line). In the Paper Layout, place one item over another and hope for the best.
Re: dashed line on boilerplate multiline item [message #336905 is a reply to message #336736] Tue, 29 July 2008 05:37 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member
that's not really helping me Confused

I had to create a function that calculates the weight of each char of the used fontset.

Then I create a select statement that cuts up the string in several records holding in mind the weight of the string. "i" has a lower weight than "w"...

Then I could create a repeating frame and make the bottom border of the item a dashed line.

A lot of work, but the result is great. Shocked

kind regards,

Mike Verkimpe.
Re: dashed line on boilerplate multiline item [message #336907 is a reply to message #336905] Tue, 29 July 2008 05:43 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
holding in mind the weight of the string. "i" has a lower weight than "w"...

That's why I suggested use of a non-proportional font.

Quote:
A lot of work, but the result is great

So you actually did it? Would you mind posting a screenshot (as well as code you used, if possible)?
Re: dashed line on boilerplate multiline item [message #337590 is a reply to message #336727] Thu, 31 July 2008 06:04 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member

The code is confidential ... sorry ...

Mike.
Re: dashed line on boilerplate multiline item [message #337600 is a reply to message #337590] Thu, 31 July 2008 06:58 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Confidential? Which part of it? This?
Quote:
I had to create a function that calculates the weight of each char of the used fontset.

Then I create a select statement that cuts up the string in several records holding in mind the weight of the string. "i" has a lower weight than "w"...

Then I could create a repeating frame and make the bottom border of the item a dashed line.

But ... there's no company-specific information in there; What "secret" would it reveal?

Now, if you call the bold part "confidential" (although I'd rather call it "hey, I spent hours on this problem, and I'm not going to share the solution with you"), fine.

However, if - some day in the future - you need help/suggestion/whatever - about your new problem, please, don't expect me to share my thoughts, experience, ideas with you because I might consider them confidential too.
Re: dashed line on boilerplate multiline item [message #337610 is a reply to message #337600] Thu, 31 July 2008 07:06 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
Perhaps OP means that a screendump of the actual result would show confidential data? (instead of code...)
Re: dashed line on boilerplate multiline item [message #337614 is a reply to message #337610] Thu, 31 July 2008 07:20 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
He might have thought that, but - as my ./fa/1659/0/ is broken, I know only what's being written.

Sabine: screendump of the actual result would show confidential data?

mikeverkimpe: The code is confidential ... sorry ...

P.S. By the way, I believe that this "function" must work on any text, even "The quick brown fox jumps over the lazy dog".

Never mind, finally ... such an "underlining" request is quite rare (I've never seen such a question before, which - of course - doesn't mean much) so I believe people won't suffer much from Mike being unable to share the solution. (Honestly, I'd much rather see Java solution which enables filtering one report parameter's values depending on a previous one). I just thought that we are supposed to exchange knowledge (read: take AND give), not only take.

[Updated on: Thu, 31 July 2008 07:27]

Report message to a moderator

Re: dashed line on boilerplate multiline item [message #337692 is a reply to message #336727] Thu, 31 July 2008 12:51 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member

I told you how to do it, without posting the actual code. That should be enough. I'm willing to share my help on this matter, but i'm not going to post actual code... it doesn't seem usefull and it is confidential, as my client doesn't want his db code spread on the net.

If you have other questions i'd be happy to help you with them.

Kind regards,

Mike Verkimpe.
Re: dashed line on boilerplate multiline item [message #337704 is a reply to message #337692] Thu, 31 July 2008 14:24 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
On a second thought, you are right, Mike. Forum is just a forum, while client "owns" this code and doesn't have to allow you to share it with anyone.

Moreover, we - sometimes - love to guide people to solution, refusing to provide actual code. "Try it by yourself and you'll learn much more than by seeing a complete code".

You've been fair enough - steps are here, so - anyone who is interested in it could spend some time trying to solve the problem.

Finally, I have to apologize. I've been far too careless lately and hope that you, guys, won't find OraFAQ forum a hostile place just because of me, being such a goat.
Previous Topic: unexcepted: java.lang.runtime execption error in Discoverer
Next Topic: how to close report 6i dynamically from form
Goto Forum:
  


Current Time: Sun Dec 11 04:10:14 CST 2016

Total time taken to generate the page: 0.08925 seconds