• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 637
  • Last Modified:

ActiveX Smartviewer in CR 9

Hi,

I am using ActiveX smartviewer in Crystal Reports 9.0 integrated in ASP.  

We have a Pre-printed invoice format in Fanfold 11 x 8.5 inch.  We have designed the report with the same settings in Epson LQ-2080 printer driver(our target printer).  The preview is ok in Crystal designer.  But when we see the same in Viewer the Paper settings is changed to Letter and the output is not proper.  But to our great surprise it is working fine in one of our machine.

We are using Windows 2000.

Could not trace what is problem is.

Please help us.

we would be thankful to you
0
Vidya_Srinivasan
Asked:
Vidya_Srinivasan
  • 4
  • 3
  • 2
  • +1
3 Solutions
 
maxwaiCommented:
i think it should help.

refers to Microsoft Knowledge Base Article – 184291 as follow.

SYMPTOMSA COM object that sends output to a printer fails when called from Active Server Pages (ASP), but functions correctly when called from an interactive application. This COM object could be either a commercial product such as a Microsoft Office application, or a custom third-party object. A common error message is "ClassName error '800a01e2' Printer error." CAUSEThe standard APIs that most objects use to print depend on registry entries located in HKEY_CURRENT_USER. This registry hive is dynamic. Depending on which user context the process is running under, different information will be loaded into this hive. ASP pages run under IIS, which is running as the SYSTEM account. When you create an instance of a COM object in your ASP code, by default, it will also run as the SYSTEM account. By default, the SYSTEM account does not have any printers set up in the registry. RESOLUTIONYou can set up printers for the SYSTEM account to resolve this problem. To set up printers for the SYSTEM account, perform the following:This method requires you to modify the registry using the Registry Editor. WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.

1.Ensure that the user you are currently logged into on the server has the desired printers installed.
2.Launch the Registry Editor (Regedit.exe).
3.Select the following key:      
HKEY_CURRENT_USER         \Software\Microsoft\Windows NT\Current Version\Devices      
4. From the Registry menu, click Export Registry File.
5. In the File Name text box, type c:\Devices.reg.
6. Select the following key:    
 HKEY_CURRENT_USER         \Software\Microsoft\Windows NT\Current Version\PrinterPorts
7.From the Registry menu, click Export Registry File.
8.In the File Name text box, type c:\PrinterPorts.reg.
9.Select the following key:    
 HKEY_CURRENT_USER         \Software\Microsoft\Windows NT\Current Version\Windows10.From the Registry menu, click Export Registry File.
11.In the File Name text box, type c:\Windows.reg.
12.From the Start button, select Run. Open Devices.reg in Notepad by typing Notepad Devices.reg in Run dialog box.
13.Replace the text HKEY_CURRENT_USER with HKEY_USERS\.DEFAULT
14.Save the file. Then import it into the registry by double-clicking the file in Windows Explorer.
15.Repeat steps 13 through 15 for PrinterPorts.reg and Windows.reg.
0
 
frodomanCommented:
Crystal uses the default printer driver to render the report.  I suspect that the difference between working properly on one machine and not on another is due to different printer drivers.

Even though this is an asp application, the printing happens client-side so it's the client's printer driver that comes into play not the server's driver.

HTH
0
 
mlmccCommented:
Agree with frodoman.

mlmcc
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Vidya_SrinivasanAuthor Commented:
Hi Maxwai,

Thanks for your reply.  As per your guidance I changed the registry in the server and preview is ok.  But when seen in Layout tab of Print, it shows different paper sizes in different client machines, but works fine in few machines.  What can be the problem.  

Since this is done in ASP we cannot afford to change in all client machines as it can be browsed from any where.

Awaiting your reply
Vidya. S
0
 
frodomanCommented:
The problem with serving up Crystal over the web is the same as serving up any web page - you can't control the client's environment.  If different clients have different printers then there is a very good chance that the reports will appear somewhat differently, will print somewhat differently, etc.

Crystal has finally come up with server-side printing which can help work around this problem, but I believe it's a new feature that is only in version 10.

Another option is to schedule your reports for export to PDF and then just allow users to see the PDF pages (which will still vary somewhat but not as much as Crystal).  This only works though if you have the tools to schedule the reports and if they are static reports that aren't generating dynamically based on parameters, etc.

Otherwise the best you can do is to use a generic font that everyone will have (Times New Roman, Arial, Courier), leave plenty of space around the margins of your report and between fields, and view from as many machines as you can to get a feel for how it looks to the general population.

There is, I'm sorry to say, no real solution.

frodoman

0
 
Vidya_SrinivasanAuthor Commented:
Hi Frodoman,

Thanks for your reply.  Our problem is not with the font, it is with the paper size.  

We have informed that for proper view Client should have the specified Epson LQ-2080 ESC P/2.  So the Driver installed in same in Server and Client machine.  The print paper size is same as Fanfold 11 x 8.5 in Server and some of the client machines but the same is not applicable in some of the machines.

How to make it available.  Even if a Custom size is defined, it is not displayed in those machines with the same driver.

Please help us to resolve this.

With Thanks
Vidya. S
0
 
mlmccCommented:
The specified printer must be the default printer.

mlmcc
0
 
maxwaiCommented:
what you should do is to delete all paper size registry in the client and import those registry defined in server including the customized paper size.

this is because every paper size has its own identify number in each machine. one paper size, for example  Fanfold 11 x 8.5, will has different id in different machines. let say 12 in machine A and 18 in machine B.

so you must synchronize the paper size id between server and client by cleaning up all the paper size in the client and importing those in server.

maxwai
0
 
frodomanCommented:
As I said in my posting on Sept 3, and as mlmcc has re-itterated, it's the *default* printer driver that is important.

frodoman
0
 
frodomanCommented:
Recommend split: frodoman & mlmcc.

Relevant postings

Comment from frodoman
Date: 09/04/2004 07:42AM EDT

Comment from mlmcc
Date: 09/04/2004 10:29AM EDT
0
 
Vidya_SrinivasanAuthor Commented:
Hi

Sorry for the delayed reply, I could not see mails for past few days due to many reasons.

In the recommended list I would like to add Maxwai also, as his registry suggestion for good, but cannot be applied everywhere.

with Thanks
Vidya. S
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now