Solved

Crystal reports alignment problem

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now