Solved

Crystal reports alignment problem

Posted on 2001-08-12
5
976 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

809 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