?
Solved

Crystal reports alignment problem

Posted on 2001-08-12
5
Medium Priority
?
1,021 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 600 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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 11 hours left to enroll

765 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