Report Layout

R

Ryan

I am writing a VB (2005) program that will allow the user to fill out and
print a form. The form input is stored in a database (SQL 2005) to be
retrieved/viewed/printed later. The form is originally a Word Document, I
also have this form as a PDF. Appearance and quality is critical for this
form.. so what I thought I'd do is convert the form to a bitmap, use a
picture object on my VB form and overlay textbox (no border) controls on top
of the image so the appearance remains exactly the same. I'm having
problems getting the document to bitmap format however.. PDF only gives the
option to save as a JPG, which is obviously reducing the quality (there's
some fuzziness around the letters) and the image size ratio is not right -
on my VB form, a small portion of the document (the top left corner) fills
the screen.. it's much too large. The letters are at least double size what
they should appear.

Any suggestions how to go about making this form work in my VB application
without reducing the quality? Thanks,

Ryan
 
G

GhostInAK

Hello Ryan,

Print the original MS Word file to the MS Document Imaging printer. This
will produce an MDI file which can then be saved as a TIFF. From there any
decent graphics package can convert it to any format you desire.

-Boo
 
R

Ryan

Thanks. The image quality is much better now. However, it's still showing
up in my Form as way to big. I think this is due to the resolution. The
..bmp file is 300x300 dots per inch. It must be displaying in my picture box
at something like 100x100 dots per inch. Is there anyway to modify the
PictureBox so that it displays correctly?

Ryan
 
G

GhostInAK

Hello Ryan,

Yes. Why don't you have a peek at the picturebox properties. Also, any
decent graphics package will change the resolution.

-Boo
 
K

Kevin Yu [MSFT]

Hi Ryan,

You can set the PictureBox.SizeMode property to
PictureBoxSizeMode.StretchImage to make the image fit the picturebox. Or
set it to PictureBoxSizeMode.AutoSize to make the picturebox fit image.

Please check the following link for more information:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.picturebox.siz
emode.aspx

HTH.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
R

Ryan

Still struggling with this. Yes I can convert the image to a .bmp. It
still looks absolutely huge in my picturebox. The image is 24MB as a bitmap
and everything (photoshop, paint, visual studio) I try to edit it in gives
me an "out of memory" error. If I try to "stretch" the image the "out of
memory" occurs during design time. Why am I stretching the image anyways?
I want to have an exact replica of the original document, not some
misproportioned image. I have 1 GB memory in this PC and no other programs
running, but it is infact sucking all my resources. Why is it so difficult
to get a word document to display on a visual basic form - they're both MS
products, you'd think there would be some compatibility rather than going
through 14 conversion steps and still failing to work. Any other
suggestions appreciated greatly. (pulling out whats left of my hair)

Thanks.
 
R

Ryan

Sketch/skewed the bmp by 1/3rd (33%). Brought the size down to 1/10th
(2.5MB). And now it displays fine and I don't run out of memory. Doesn't
make sense to me why if I look at the attributes in Paint it says something
like 2" by 3" but it "appears" the size of a normal sheet of paper. At 8.5"
x 11" it appeared 3 times that size. Still confused but at least making
progress again.
 
R

Ryan

Well this worked great for my form. The form works and is fast. However,
it does not work for my report (the part that's suppose to print).. I'm
using the Visual Studio report creator and added the image to the report as
an embedded image. I can barely move my mouse even in design.. if I use
autosize for the image the text looks horrible, if I use clip, well, NOW
it's showing up as way too small (the 2" by 3"). Tried to use my large
image and "out of memory" exception keeps getting thrown again.

Help!
Thanks,
Ryan
 
G

GhostInAK

Hello Ryan,

If yer using report creator, just recreate the form and be done with this
sillyness with pictures.

-Boo
 
R

Ryan

Looks like I may have to do this. I wasn't sure if report creator had all
the options for layout and formatting to allow me to accurately reproduce
the document, but I suppose now I'll have to find out.
 
R

Ryan

Well report creator definitely does not operate like a word processor. What
took me about 30 minutes to reproduce in Word looks like it will take me the
better part of 8 hours to reproduce in Report Creator. Each line of text
has to be in it's own text box.. each line doesn't align spacing with the
last line based on font sizes.. etc. Ugg.. tedious to say the least.

Do people really use report creator to design forms?
 
R

Ryan

Ok, thought I'd try out Crystal Reports.. 100% better for laying out a form
to specifications.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top