Printing problems

Posted by: dror_farhi on 9 October 2018, 1:30 am EST

  • Posted 9 October 2018, 1:30 am EST

    Hi,

    I have an active x control that I am using on vb6:

    We currently updated this control from vaSpread version: 2.5.0.1, to the new fpSpread version 8.0.28.

    When we printing spread grids with the new control, most of the time everything is OK.

    There is one spread grid that when we print it, we are getting a page that contains error instead of the printing page:

    PCL XL error

    Subsystem: IMAGE

    Error: ExtraData

    Operator: ReadImage

    Position: 451

    It only happen on printer: HP laser jet 4050n

    When we print the same page with the old control on the same printer, there is no problem.

    The code:

    With MySpread

    .PrintBorder = True
    .PrintColHeaders = True
    .PrintRowHeaders = True
    .PrintColor = False
    .PrintGrid = True
    .PrintJobName = "Configuration"
    .PrintShadows = True
    
    
        .PrintType = 3 'SS_PRINT_PAGE_RANGE
        .PrintPageStart = 1
        .PrintPageEnd = 2
    
    
    .PrintUseDataMax = True
    .PrintHeader = "/c/fn"Times New Roman"/fz"18"/fb1/fk0Configuration/n/fz"12"/fb1/fk0/lBio-Rad Laboratories/rV_Default    /n/lVARIANT/rInstrument #1    /n/n/lReport Generated: 09//10//2018  17:21/n/nHbA1c Units Settings/n/nMaster Equation:  DCM HbA1c = (a × IFCC HbA1c "
    .PrintFooter = "/n/l/fn"Times New Roman"/fz"12"/fb1/fk009//10//2018  17:21/cPage /p"
    
    
    
    .PrintMarginTop = 30
    
    .PrintMarginBottom = 30
    .PrintMarginLeft = 500
    .PrintMarginRight = 500
    
    .PrintAbortMsg = "Printing ......."
    
    .Action = 32 'SS_ACTION_SMARTPRINT
    

    End With

    What is the problem ?

    I’m afraid that clients will not be able to print this page.

    Thanks,

    Dror Farhi

  • Posted 10 October 2018, 1:08 am EST

    Hello,

    I would suggest you to please test this issue with setting the PrintType to ‘all’ for example:

    ‘fpSpread1.PrintType = SPRD_PRINT_ALL’

    In case of range you need to provide the cell raneg and not the page range.

    Thanks,

    Deepak Sharma

  • Posted 10 October 2018, 5:50 pm EST

    Hi,

    I changed it to: fpSpread1.PrintType = 0 'SPRD_PRINT_ALL

    But I’m still getting the printing page with the same error.

    How can I provide cell range ?

    Thanks,

    Dror Farhi

  • Posted 10 October 2018, 10:52 pm EST

    Hi,

    I found the cause of the problem:

    The driver of our printer was too old. When I installed a newer driver it solves the problem.

    Thanks,

    Dror Farhi

  • Posted 11 October 2018, 5:35 pm EST

    Hi Dror,

    Glad to know that you got your issue resolved!

    To print a cell range you can use the code as follows:

    fpSpread1.Row = 2

    fpSpread1.Col = 2

    fpSpread1.Row2 = 4

    fpSpread1.Col2 = 4

    ’ Set the cell range to be printed

    fpSpread1.PrintType = PrintTypeCellRange

    Let us know if you have further questions.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels