Background Image on Cover Page Distorted in SSRS - reporting-services

I am trying to incorporate the following image into the cover page of my report.
It's currently saved as a PNG file with dimension 1275 x 1650.
Like a lot of online posts suggested, I
* inserted a rectangle
* set the image as the background image
And here are my properties for the rectangle.
When I rendered my report to PDF, the image was splitted
into multiple blank pages and the bottom of the graphic (with logo and URL)
didn't even show.
How can I make sure this graphic is displayed fully on only the first page?

I can't tell if you have other objects on your cover page, but here's what I did to get this working correctly.
Add an image object to your report.
Make sure the margins are set fairly low(I used .25in for top, bottom, left, and right).
With the margins set at .25in, I set the image object to a size of 8in x 10.5in to fill the remaining space on the page.
In the image object properties, set padding options all to zero and Display to "Fit to size".
Now the trick here, is to put the image object in the very top left corner and resize the report to the exact size of the image object -- no whitespace in the design view. For me, this returns a single page report with the entire image shown on a single page.

Related

How to display images edge-to-edge in ipython notebook?

I need to add a graphical letterhead to the top of the first page of my jupyter notebook.
It runs from the top edge of the paper to the left and right edges for the height of the svg image.
I have tried a markdown cell with:
<img style="float: left;" src="page_header.svg" width=740 height=160>
This results in the image being padded to fit within the "output cell" area.
I've also tried a code cell (with hidden input):
from IPython.core.display import Image, display
display(Image(url="http://localhost:8888/files/page_header.svg", width=740, height=160, unconfined=True))
Which results in the image being about the right scale, but contained within a small window with scroll bars again within the output cell area.
Is there any way to have the image placed across the 'paper' such that printing from the browser to a pdf results in the image at the top of the page, and edge to edge, where it belongs?

Slicing for web page, containing rounded images that overlap other parts

I have a psd file with layers that is a mockup of a web page I need to create. You can view a page scheme here. For each page element (header, menu, main body, footer, etc) there are layers in the psd file. There are also some rounded images with drop-shadow that also constitute layers and they overlap among themselves, as well as the main body text area and the header of the page, as you can see in the page scheme.
My question is, what would be the correct method to export slices for using the exported images in the page markup:
Option 1: Export the rounded images as layer-based slices (after I turn off any other layers below them) and use transperency attributes for the images.
Option 2: Export rectangular user-slices that contain a page part (eg, main body) and the parts of the rounded images that overlap this page part.
For example, in the 1st case, I would export all 3 rounded images as a layer-based .png slice (after I turned off the header and main-body layers), ending up with the 3 images with transparency. Then I would place this image with absolute positioning, so it overlaps the main-body and header.
In the 2nd case, I would slice the whole header part with the part of the img1 that overlaps it, then I would slice the menu, then I would slice the main body part, including the parts of the images that overlap it, then I would cut another slice to the right, containing the rest of the images' parts and so on. If you go to this link and click on the template thumbnail, you could check with Firebug a similar approach to the 2nd option, regarding the floating images on the upper left of the page.
Option 1 is the way to go. With option 2, a design change or repositioning of the circles requires you to re-slice everything again.

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?
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:
Go into paint and draw a rounded corner box the size you need.
Cut the set of text boxes to surround with rounded border.
Place a rectangle control over the entire area all the text boxes covered.
Paste my text boxes onto the rectangle.
Right-Click and choose rectangle properties.
Select the Fill Tab and select "Embedded" image source.
Click Import and select your paint image(i used PNG but it shouldn't matter).
Click Ok.
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
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.
Insert the 3x3 table
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)
Make those 4 corners cells unresizable (Set property CanGrow to false). Make sure all the other cells have CanGrow = true if you need it
Make all the cells the same background color (same color as the image you draw).
Write your text in the middle cell.
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.
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.

Reporting services: Cover page header

I have a report that already has an existing header. I need to add some info to just the cover page header.
So I added everything in a rectangle. Then hid the rectangle on everything but the first page.
=Globals.PageNumber <> 1
That works... but now I have a giant white space in place of the rectangle. The rectangle contains images and some textboxes.
Any idea?
Is there actual data on the first page? If there doesn't need to be, try putting the 'Extra' items rectangle in the body of the report and add a page break afterward. Then, this rectangle will basically be a cover page for the report.
I ended up moving the rectangle to the first page and then hiding the header on only the first page.

How can I dynamically center an image in a MS Reporting Services report?

Out of the box, in MS Reporting Services, the image element does not allow for the centering of the image itself, when the dimensions are unknown at design time. In other words, the image (if smaller than the dimensions allotted on the design surface) will be anchored to the top left corner, not in the center.
My report will know the URL of the image at runtime, and I need to be able to center this image if it is smaller than the dimensions specified in my designer.
Here is how I was able to accomplish this. With help from Chris Hays
Size the image to be as big as you would want it on the report, change "Sizing" property to "Clip".
Dynamically set the image's left padding using an expression:
=CStr(Round((4.625-System.Drawing.Image.FromStream(System.Net.WebRequest.Create(Parameters!LogoURL.Value).GetResponse().GetResponseStream()).Width/96)/2,2)) & "in"
Dynamically set the image's top padding using an expression:
=CStr(Round((1.125-System.Drawing.Image.FromStream(System.Net.WebRequest.Create(Parameters!LogoURL.Value).GetResponse().GetResponseStream()).Height/96)/2,2)) & "in"
The first modification made to Chris's code was to swap out the dimensions of my image element on the report (my image was 4.625x1.125 - see numbers above).
I also chose to get the stream from a URL instead of the database. I used WebRequest.Create.GetResponse.GetResponseStream do to so.
So far so good - I Hope that helps!