veljasije
veljasije

Reputation: 7092

Rounded box in SSRS

I have rectangle which act as container for other elements.

Can I somehow setup some property of rectangle to round its corners, in fact, to get rounded box.

In css it is easy, but how to do in SSRS?

Upvotes: 2

Views: 14097

Answers (3)

Gh Reza Safarnia
Gh Reza Safarnia

Reputation: 1

You would have to build an image that has a transparent center for adding your text. All this would be more work than I would want to do just for a report. I would stick with just the standard textboxes.

Upvotes: -1

Maxter
Maxter

Reputation: 824

All solution I have seen use a background image inside a textbox. But you get problems when you try to resize the textbox.

The solution is to insert a 3x3 table inside the texbox.

  1. Insert the 3x3 table
  2. Insert an image on each corner. They will be a quarter of a circle each. (This image is created in MS Paint or your favorite image program)
  3. Make those 4 corners cells unresizable (Set property CanGrow to false). Make sure all the other cells have CanGrow = true if you need it
  4. Make all the cells the same background color (same color as the image you draw).
  5. Write your text in the middle cell.
  6. OPTIONAL: It might also be a good idea to fuse the 3 vertical middle cells if possible. It will allow more space to write text in the cell.

This way you won't have to create new image everytime the size of your textbox change.

Upvotes: 3

brian pleshek
brian pleshek

Reputation: 103

Actually, it is fairly easy. I had a bunch of text boxes that a rounded corner border needed to be placed. The first thing I tried was an image control. I placed it on top of my text boxes and set it to "Send to back." It worked well in print rendering, however, in the browser rendering the HTML placed the textboxes after the image making it look horrible.

The solution was this:

  1. Go into paint and draw a rounded corner box the size you need.
  2. Cut the set of text boxes to surround with rounded border.
  3. Place a rectangle control over the entire area all the text boxes covered.
  4. Paste my text boxes onto the rectangle.
  5. Right-Click and choose rectangle properties.
  6. Select the Fill Tab and select "Embedded" image source.
  7. Click Import and select your paint image(i used PNG but it shouldn't matter).
  8. Click Ok.
  9. Find and expand BackgroundImage on Rectangle and change BackgroundRepeat to "Clip.". Otherwise, your image is repeated.

The report should now render properly in both print and html rendering views. Unfortunately, this doesn't seem to stretch/size, so unless you can figure that one out, you will have to repeat whenever you need a different sized rounded box.

Brian

Upvotes: 2

Related Questions