reportman.ocx vb.NET

28 views
Skip to first unread message

Ivan Lelli

unread,
Sep 4, 2024, 2:20:49 PM9/4/24
to reportman

Buongiorno, in un progetto vb.net utilizzo reportman.ocx i questo modo:

Dim dd As New Reportman.ReportManX
Dim VarTesto = "testo prova"
dd.filename = Application.StartupPath + "\" + "Mio.rep"
dd.SetParamValue("TEST",  VarTesto )
dd.Preview = True
dd.Execute()

with dd.Preview = True it works correctly, but by setting dd.Preview = False, after the first correct print, it returns error “System.Runtime.InteropServices.COMException: 'No space to print SubReport:0 Section:0'”

Thanks for your attention.

juan Santamaria

unread,
Sep 5, 2024, 12:30:30 PM9/5/24
to reportman
Try this code

Public Class Form_Pruebas_ReportMan
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim dd As New Reportman.ReportManX
        Dim VarTesto = "ES UN TEXTO DE PRUEBA"

        Dim vMensaje As String = ""
        Try


            dd.filename = "C:\Mapro\Reportes\RepCorreos\DEMO.rep"
            dd.SetParamValue("TEST", VarTesto)

            vMensaje = "Valores a Mostrar en el Reporte" & vbCrLf &
                       "VarTesto=" & VarTesto & vbCrLf & vbCrLf &
                       "Mostrar Vista Previa (Preview): " & CheckActivarVP.CheckState & vbCrLf &
                       "Impresora disponible: " & dd.PrintersAvailable & vbCrLf &
                       "Impresora seleccionada: " & dd.DefaultPrinter

            MsgBox(vMensaje)

            If CheckActivarVP.Checked Then
                dd.Preview = True
            Else
                dd.Preview = False
            End If


            dd.Execute()

        Catch ex As Exception

            MsgBox(ex.Message & vbCrLf & vbCrLf & vMensaje)
        End Try

    End Sub
End Class

Ivan Lelli

unread,
Sep 6, 2024, 11:23:01 AM9/6/24
to reportman
Thanks for the reply, these are the returned messages:
First printing.png
Error second printing.png
Second printing.png
Reply all
Reply to author
Forward
0 new messages