CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Posts
    4

    An annoying printing issue with Crystal 2008

    A little background:
    ====================
    I have an extremely annoying printing issue with crystal reports. My environment is crystal reports 2008 SP2 on Windows 7 (64bit), Visual studio 2008 and .net framework 3.5 with all the latest updates for everything. The report is designed basically to render a small shelf label of the size (40mm width and 20mm height). In crystal when I set the page size to the above mentioned values and set orientation to portrait and take a preview, everything is displayed as i expect it to be and issuing a print command, it prints absolutely correct.

    The problem:
    ============
    The problem comes when i print this report from my program (in vb.net), dynamically setting data to some text fields, the result is that crystal somehow changes the print orientation, NOT the paper orientation as in portrait or landscape. Instead of printing from top left towards the bottom right, it rotates the whole output at 90 degrees to the left and reduces everything so small that it is barely visible, although it prints everything out. I have tested it on Intermec PF8t and Zebra GK420d label printers and a whole bunch of laser printers, but with the above stated page settings the output is always the same.

    Another strange thing that i noticed while experimenting with page sizes if i switch to landscape mode, the print out is correct in its font sizes and positions but then the text gets truncated due to overflowing the page size.

    Can anyone help me with this. Does crystal has anything like its own print drivers or something. I have tried to ensure to the best of my abilities that it is not a printer driver problem.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: An annoying printing issue with Crystal 2008

    When You say "In crystal when I set the page size to the above mentioned values and set orientation to portrait ", do You mean that it is a form with those dimensions already in Your pc ? Or that You created a new one?
    Because in XP when I need a form with special size, I need to add to the Windows' Printer Server and also add it to every pc where my app is going to work

  3. #3
    Join Date
    Nov 2008
    Posts
    4

    Re: An annoying printing issue with Crystal 2008

    @jggtz:
    No, i dont have it on a form, what i mean is in crystal report design view. I create an instance of report from its code behind class and use the "PrintToPrinter" function of the object to print the report.

  4. #4
    Join Date
    Jul 2005
    Posts
    1,083

    Re: An annoying printing issue with Crystal 2008

    Add Custom Paper Size in Windows 7
    To define a new page size (form), follow these steps:

    1.Click the Start menu, then Control Panel, and finally View devices and printers.
    2.Click a printer in the list (e.g. Print2PDF), then click Print server properties.
    3.In the dialog box that appears, check the box for Create a new FORM. (this is the Form I said in past post)
    4.Give the new page size a unique and descriptive Form name, such as ‘24×36′ or ‘Custom A size’.
    5.Select Metric or English units as required.
    6.Define the page size with the long dimension as the width and the short dimension as the height.
    7.Click the Save Form button.
    8.Click the OK button when finished.

    The new sizes should now appear in Crystal Reports / Printer Setup. If it does not appear, then it is it too large or too small to be printed by Crystal Reports

    JG

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured