473,378 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Crystal Viewer and Printer Settings

When i right click on the .rpt file in the VS 2003, i see a property
printer setting.
It says "No printer" on the top and there is option to select printer
and paper settings etc..

I want to know how will this affect a report rendered by a crystal
viewer.
I have a web page with a crystal viewer rendering the report on the
page.
I build my application in one of my development machines and deploy it
on the server. By default, the printer setting is set as the default
printer settings on my development machine. Everything works fine on my
development machine.

But when i view the report from the server, the page appears shrunk
either in width or in the number of records per page.

Then i rebuilt the application with the printer setting as "No
Printer". Then i checked the report on the server machine. Now the
report is rendered properly. But when i try to print, the printing is
not proper and the web page after printing goes back to the shrunk
form.

Can anyone explain me what is the use of the Printer Setting in the
report file??

Thank you.

Nov 17 '05 #1
1 12121
Crystal's handling of printer settings is, quite frankly, hooped. I
talked to the Crystal guys at the booth at PDC05 and they gave me some
reasons as to why it is this way, but for "normal" corporate printing,
it's just messed up.

In the version of Crystal Designer that comes with Visual Studio 2003,
you have two choices:

1. Choose "no printer" in the printer settings of your report. This
means, "Whatever are the default settings for the default printer on
the machine where this report is rendered, I want the report rendered
to that printer's default page size, orientation, duplexing, etc. etc."

2. Choose a printer in the printer settings of your report. Then you
can indicate that you want 8.5 x 14 landscape printing (for example).
However, this assumes that you are always going to print the report to
the _exact same printer_ in production. Of course, it's "never" like
that.

When you choose a printer for your .rpt file, this is what happens:

Crystal Designer grabs the DEVMODE structure for the exact printer you
specify, and lets you change the DEVMODE settings. That's what you're
doing when you set "Landscape" and the paper sizes. It then stores the
changed DEVMODE in the .rpt file.

When the Crystal Report rendering engine loads the .rpt file, one of
the first things it does is goes hunting for a printer with the _exact
same name_ as the one from which it grabs the DEVMODE structure
originally. If it can't find that exact same printer on your production
machine, it switches to the default printer for the production machine,
and tries to apply the DEVMODE settings from the .rpt file to that
production printer. If the default printer doesn't like the DEVMODE
settings from the .rpt file and mangles a bunch of them to suit its
tastes, then that's just the way it goes.

If you then switch printers in code (by setting a new printer name for
the report document object that you loaded via Crystal), then Crystal
will try to apply the DEVMODE settings to the new printer you have
assigned. However, if the DEVMODE settings have already been thrashed
by trying to apply them to the default printer, then that's just too
bad.

The whole thing is set up assuming that you are going to print your
report to exactly the same kind of printer with exactly the same name
on every machine.

We have had some success by making sure that we create printers on our
development box with exactly the same names as they have in production.
However, we have only one production server. People with multiple
production servers may find that this isn't possible for them.

Even if your printers have exactly the same names, you can be hosed by
custom forms. You see, the DEVMODE structure in the .rpt file stores
the _form code_ from the printer, not the name or size of the form. If
you're creating custom forms on your printers, there's no guarantee
that the same form will be represented by form #104 on all printers in
your organization. Since that's what the DEVMODE stores, just 104, you
may end up getting kooky results on one or two printers.

I've complained to Crystal several times about this. To me, it's
ass-backwards: I want to describe the overall shape of my report: paper
size, orientation, duplexing, etc. Then, later, I want to specify a
printer.

The response I got at PDC'05 was that the Crystal Designer takes great
pains to make sure that the report appears on the printer _exactly_ as
it does in the Designer, so they grab precise printer metrics and
precise page sizes and fonts, and for that they need the DEVMODE
structure.

My answer is that that is wonderful, but most business reporting
applications just want to specify some general things about the report,
and get some good-looking output. I don't _care_ if the text wraps at a
different word on different printers because there's a 1/64" difference
between the page widths. I just want output.

One of the guys at PDC'05 said that he thought this was fixed in
Crystal XI, but I haven't tried it out yet, so I can't vouch for that.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Troels | last post by:
Hi. I'm developing a part of a larger System where I'm using the crystal reports viewer that comes with Visual Studio .NET. I want to be able to control wether or not the printer selection...
3
by: Robert Schuldenfrei | last post by:
Dear NG, I have Crystal Reports working to a file and directly to the printer with the following: private void mnuInvRep1301_Click(object sender, System.EventArgs e) {
5
by: Robert Schuldenfrei | last post by:
Hi Again, Forgive me for posting this again, but old items seem to get little review. I thought I could adjust the viewer properties without any further aid from the NG, but I was wrong. When...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: Anniech | last post by:
I use VB.NET to integrate with crystal report 9.0 to print a report with custom paper size (using Dot Matrix printer). I have already added a custom paper size in the printer server and set the...
12
by: Connor T | last post by:
Hi, I have a crystal report embedded in a viewer. How / Where can I set a property to make it default to landscape orientation? Rgds, Dan
2
by: Ralf | last post by:
I posted under a different subject earlier, no responses. I have changed the question somewhat. Is there a way to have the report come up in landscape, not just print in landscape? I know how...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
1
by: =?Utf-8?B?U3RldmUgQmFya2Vy?= | last post by:
Hi guys, I’m having an interesting problem with Crystal Reports. Thankfully, it’s simple to explain! I’ve got a report, and have added a picture to it. I configured the picture to use a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.