Skip to Content

There is no printer output when using the PrintOut method

I have a VB6 app with CR XI, and a customer found a situation that when printing a report directly to the printer using the PrintOut method, there is no printer output or error message.

Some reports using the same code print normally, but a report that is preceded by another print call, presents this behavior.

And when the output is directed to the screen, we can see the report.

Could someone give me an idea of what is the problem?



SP - Brazil

The code used is below:

Set rpt = applic.OpenReport(App.Path & "SEFoto" + TipoRPT + ".rpt")

rpt.FormulaSyntax = crCrystalSyntaxFormula

rpt.FormulaFields.GetItemByName("Empresa").Text = "'" + Company + "'"

rpt.FormulaFields.GetItemByName("Idioma").Text = "'" + Idioma + "'"

rpt.FormulaFields.GetItemByName("Versao").Text = "'" + Versao + "'"

' ... Some lines to compose the selection formula

rpt.RecordSelectionFormula = Cond

' To evaluate the image length:

Arq = rsTMP3!FT_Arquivo

ImageScaling = FatorDeReducao(Arq, "F")

' To reduce the image length:

AchouOLE = False

For Each oSection In rpt.Sections

For Each oObject In oSection.ReportObjects

If oObject.Name = "PictureFoto" Then

Set oOleObject = oObject

AchouOLE = True

Exit For

End If

Next oObject

If AchouOLE Then Exit For

Next oSection

With oOleObject

.Suppress = True

.XScaling = ImageScaling ' 0.5 = 50%, 1 = 100%

.YScaling = ImageScaling

.Suppress = False

End With


Aguarde.Show 1


If DestinoRel = 9 Or DestinoRel = 1 Then ' Padrão ou impressora

rpt.PrintOut True ' <<<---- Here using true or false nothing happens


PrintRPTtela rpt, "Fotos" ' <<<--- Here it works fine

End If

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 05, 2010 at 07:55 PM

    Hi Isis,

    Not sure if you have applied any service Packs to CR? If please do so and test again. Then you can upgrade to CR XI R2 for free, use your XI Keycode and download Service Pack 4 from this link:

    You'll find the distribution files for your app also from that same download area.

    If you don't want to upgrade to XI R2 then download all patches from XI and test again. This issues rings a bell that it may have been fixed.

    Thank you


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Isis,

      R1 and R2 report formats are identical so it should not be a problem, there may be a few updates in R2 but it should not affect your reports. Although we always recommend matching report versions with report engines.

      All that should be required is you verify you are using the CR 11.5 runtime in your application references and then re-build. You may run into a few issues with Parameters so depending on the type of parameters you are using depends on if issues show up or not.

      Best to test fully and if you do search and then post your issue.

      Thank you


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.