cancel
Showing results for 
Search instead for 
Did you mean: 

Draw line over textbox

Former Member
0 Kudos

Hello all,

I found it chellenging to draw lines over textbox in Crystal reports.

I got the latest version 14.0.2  or 2011.

Please see the attached screenshot, where I have coloured textboxes for section header background, and I also need to draw borders over the columns. The line object seems to never draw on top of textbox.

I have tried to move line to front and move textbox to back, but it didn't help.

Any idea or a way around please?

Many thanks

Best

Yang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Oh, I found the solution myself.

There are some difference between a "text object" and a "box object".

The box object seems to stay in the back, whilst a text box object stay in front.

The attached screenshot shows how I did it.  The downside of a "box object" is that you cann't add text in it, but you could use "text object" on top of it to show text.

Cheers all.

Answers (4)

Answers (4)

Former Member
0 Kudos

I tried the other way. Download webdings fonts- its not a biggie.
Create a variable/formula and just type this "Chr(124)".

This will give you a line in the formula output.

Place it in conjunction with the line. But here is a trick:

If you put that formula inside the Grey text box, it will not work and just output formula_name

but if you increase its height and overlap it the grey text box, Then it will be fine.

Last thing you have to struggle is finding the desired fontsize, and based on that increase or decrease the width of the lines.

In my case, font size for the formula is 24, and width of the line is 2pt.

see the screen shot.

Former Member
0 Kudos

Hi Abhilash,

Thank you very much for that.

I think it's a quite general issue, as I just created a blank report with only coloured textbox and a vertical, the problem persists.

A renamed txt file is not allowed for uploading, so I have attached a screenshot to show it.

Cheers

Yang

abhilash_kumar
Active Contributor
0 Kudos

Oh wait! I've been misinterpreting the issue until now and I guess I understand what you're trying to say.

I don't have CR designer on my machine at the moment, but can you try this and let me know if this works:

1) Insert the Line in a separate section below the Text object

2) Go to the Section Expert and select the section that holds the text object > check "Underlay Following sections"

I have a feeling that the line might just get superimposed on the Text Box.

If it doesn't work then I guess you'll have to divide your existing Text object into two Text objects and have the right/left borders turned on.

-Abhilash

former_member260594
Active Contributor
0 Kudos

Hello Yang,

Try colouring the section itself rather than using a text object. Objects will always appear "in front" of lines.

Regards,

Graham

Former Member
0 Kudos

Hi Yang,

I can see the vertical line besides the "Actual Vs Tender Cost" column, however, its still not very clear how you want it to appear. Can you attach a screenshot of the 'preview' mode and point out.

-Prathamesh

Former Member
0 Kudos

Hi Prathamesh,

I want to show the vertical line on top of the grey text box(es), so that the grey area has "table/cells" effect.

Effectively, textbox is at the back layer and the line is at front layer.

abhilash_kumar
Active Contributor
0 Kudos

Hi Yang,

I always prefer inserting line objects in a separate section.

So, let's say you're trying to draw a line after Details Section, insert a Details Section b and place the Line Object here. Reduce the size of the section so there's no blank space above or below the line.

-Abhilash

Former Member
0 Kudos

Sorry, I perhaps didn't make it clear.

I have problems with drawing the vertical lines, which go across multi-sections to seperate columns.

It's the line getting  cursor focus in the screenshot, as shown.

abhilash_kumar
Active Contributor
0 Kudos

Ok I see.

Such issues are really very hard to troubleshoot to be honest. I've been through such situations before not knowing what causes the lines to disappear.

Could you try adding the Line Object again, or add a 2nd Line Object beside the original one and see if it kind of triggers something!

Otherwise, please attach a copy of the report with saved data and I'll test it. To attach the report, change its extension from .rpt to .txt and click the 'Use advanced editor' link in the reply window.

-Abhilash