Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Set Image resolution in Microsoft Report (RDLC in VS2008)

Posted on 2013-02-07
7
Medium Priority
?
6,088 Views
Last Modified: 2013-02-15
I am using Microsoft Reporting in VS 2008 (using VB.NET).  My application is used to produce a number of printed documents.  Each report uses an image as the Page Header.  These images are stored in the database but the issue I'm describing also happens if I embed the image in the design and use it directly that way.

The problem is that these images, correctly sized to print 18cm wide x 2.5cm high, do not fit on the report.  They are too big.  

I have worked out that the problem is because they are being treated as 96dpi, regardless of their actual resolution.  So a 300dpi image appears over 3 times the size it should as it is being treated as 96dpi. (source: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/baef4771-2c30-42ed-bc97-90745cc4c280/)

If I create an image of the correct size at 96dpi then this works but 96dpi is too low a resolution for printed output.  In researching this, there seems to be a solution by setting the resolution once the image is loaded into the report but I can't find details to make this work.

Any idea how I can create an A4 page header (18cm x 2.5cm @ 300dpi) and get it to fit correctly on my documents without reducing the resolution, so lowering the quality?
0
Comment
Question by:WestcountryBusiness
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 12

Accepted Solution

by:
Harish Varghese earned 2000 total points
ID: 38868716
Hello,

Are you creating reports using Report Server Business Intelligence project? I am able to use high resolution images in the reports without any issue.

Or are you creating a web application using reportviewer control and displaying the image inside that? If so, I have not created such applications and do not have much idea about it. Please see if you find something useful ine below link:

http://stackoverflow.com/questions/7189674/rs2008-background-image-sizing

-Harish
0
 
LVL 1

Author Comment

by:WestcountryBusiness
ID: 38868797
Hi Harish,

It is a Windows Forms application using the Microsoft Report Viewer control to view the reports.  I design the report from within Visual Studio 2008 which creates an RDLC file within my application.  I call report as an embedded resource.

Thanks for the link.  I'm just finishing work for the weekend now, but I'll take a look through it as soon as I get chance to see if it offers a solution.

Thanks for your help.

Jon
0
 
LVL 12

Expert Comment

by:Harish Varghese
ID: 38870698
Hi Jon,

I created my first forms application with ReportViewer control.
What I found is that when you use the image as background image of the report, then there is no control over the size of the image.
But when I used the image in an image control, then the image takes the exact size of the image control. Though I could not find any option to maintain the width-height proportion of the image while resizing the image control, I think that would not be a problem for you since your image has a fixed size (18cm wide x 2.5cm high).

Please see screenshot of the report below. The big image is used as background image. The small one is an image control. The overlapping table is to show that you can keep other controls on top of the image.
Image-In-Report
Hope this helps. Good luck.

-Harish
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:WestcountryBusiness
ID: 38875144
Moring Harish,

Thanks for your help.  In the application I am working on I want to give the end user the option of customising their reports by adding their own header.  I was hoping to create it so the user can create an image or whatever size & shape they want to offer flexibility.

Originally I had a very small image element positioned top left of the page with the idea that it would just print the user's selected image in it's original size & resolution.  It now seems this may not possible.

My work around was to create a fixed size image.  I see that if I do this and set the properties of this to fit proportional then I can use a high quality image and have it print correctly.  This means that I must specifiy that the end user's own images for page heading have to be of a specific proportion, which reduces flexibilty but I can probably live with that.  

However the tip about using a scanned image of a standard from as a background image is helpful for another job I have to do, so thanks for that.

I'm going to leave this question open a little longer in case anyone comes up with a method to solve my original problem.  If I don't get it, then I will go ahead with this compromise solution.

Many thanks for your support.

Jon
0
 
LVL 12

Expert Comment

by:Harish Varghese
ID: 38875686
Jon,

I just found that the Image control to use in RDLC in VS 2010 has "Fit Proportional" property. So that may help you, if you can use VS 2010 instead of VS2008.

-Harish
0
 
LVL 12

Expert Comment

by:Harish Varghese
ID: 38875709
Yes, I tried in VS 2010 with images coming from database and it works perfect.
0
 
LVL 1

Author Closing Comment

by:WestcountryBusiness
ID: 38892219
so it looks like there's no way to do exactly what I wanted to (use 300dpi images as image objects in a report & get the to size correctly automatically), so the work around solution of setting the image object as a fixed size and using the size proportional option will have to suffice as the best alternative.

Thanks for your help, Harish.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question