Solved

Crystal reports alignment problem

Posted on 2001-08-12
5
998 Views
Last Modified: 2012-06-22
I have a crystal report that is printed on a matrix printer declared as a generic text only printer (very important). If i print it from a visual basic program, the character fields are printed in the next row, after the numeric fields even if they should appear in the same row (they all are aligned top and have same height)
If i print the report from the crystal reports designer everything is ok. Can anyone help me with this?

Thank you
0
Comment
Question by:Barnabas3
[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
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6377234
CrystalDecisions recommends using Courier New or Times New Roman in these type of reports.  There is a document available which explains the printer dependencies:
http://www.crystaldecisions.com/docs  - enter SCRPrinterDependency.pdf as the document name to find.

The problem you are seeing is common when exporting to text files and occurs when the fields are not lined up horizontally.  You might try lining your fields up using the Bottom alignment instead of Top.  Make sure that Generic/Text Only is set as your default printer while you are in the Designer.
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6377680
Another thought - are you using the horizontal guidelines and snapping the bottom of your fields to these guidelines?
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 200 total points
ID: 6379117
1) Check your default printer if it is Generic Printer. To our experience, CR, prints well for default printers, and not so, for other printers, when we change CR's printer from VB, for landscape reports.

2) Also check if the line height is equal to atlease 2 grid point spaces. I would try to explain this like, Say each dot represent a grid dot.

.
.
.

Your character/character space height normally, could be a minimum of this height. This one, you could align using 2 guidelines, one at the top and one at the bottom.

3) Check the page size to which you are printing. If the page size is smaller, then you could get this word wrap.

4) If the field width that you have specified in CR is smaller, for particular larger width data, then, the line wraps also.

Cheers
0
 

Author Comment

by:Barnabas3
ID: 6386054
I solved my problem: i don't use the report's preview, i set the Destination property to crptToPrinter instead of crptToWindow. I realized that after a succesfully print from the designer, from the print button. Anyway valli's observation is very corect regarding the default printer. Unfortunatelly i cannot set the generic printer to be the default one.
Thank you both for the comments.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6397927
Barnabas3, if need be, you could set the Generic printer as default temporarily and print to it and then set back the orig. default printer, for which if need be, i can help u.

It is just a class module to do this, once you release the object, the orig.defa. printer will be set.

cheers
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 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