473,236 Members | 1,734 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,236 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 12096
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...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.