Imprimer en VB des fichier .rep (reportman)
soyanlo
Messages postés
14
Date d'inscription
Statut
Membre
Dernière intervention
-
soyanlo Messages postés 14 Date d'inscription Statut Membre Dernière intervention -
soyanlo Messages postés 14 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je cherche à imprimer un dossier qui contient plusieurs fichiers .rep (Report Manager Designer File)
Le problème est que je n'y arrive pas ^^ j'utilise ce code qui à été copié d"une autre application :
Imports System.Data
Imports System.Data.OleDb
Imports System.IO
Imports reportman
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Pour une première utilisation, installation de l'ocx
' ----------------------------------------------------
If Dir(Application.StartupPath & "\Install.ok") = "" Then
Shell("regsvr32.exe /s " & """" & Application.StartupPath & "\reportman.ocx" & """", AppWinStyle.NormalFocus, True)
Dim nOut = FreeFile()
FileOpen(nOut, Application.StartupPath & "\Install.ok", OpenMode.Append)
FileClose(nOut)
End If
End Sub
Il me crée bien le install.ok mais je sait pas à quoi il sert (il fait 0ko) mais je vois pas à quoi sert le .ocx
Que doit-je faire ?
Donc il est censé récupérer le fichier reportman.ocx que j'ai copié dans mon appli à partir de l'autre.
puis, après les traitement :
' Impressions
strFile = Dir(Application.StartupPath & "\Output\Page*.rep")
Do While strFile <> ""
Dim rptRep As New reportman.ReportManX
rptRep.filename = Application.StartupPath & "\Output\" & strFile
rptRep.Preview = False
rptRep.ShowPrintDialog = False
rptRep.Execute()
strFile = Dir()
Loop
Mais il me souligne reportman.ReportManX et me dit : Type 'reportman.ReportManX' non défini.
Vous avez une idée ?
merci
Je cherche à imprimer un dossier qui contient plusieurs fichiers .rep (Report Manager Designer File)
Le problème est que je n'y arrive pas ^^ j'utilise ce code qui à été copié d"une autre application :
Imports System.Data
Imports System.Data.OleDb
Imports System.IO
Imports reportman
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Pour une première utilisation, installation de l'ocx
' ----------------------------------------------------
If Dir(Application.StartupPath & "\Install.ok") = "" Then
Shell("regsvr32.exe /s " & """" & Application.StartupPath & "\reportman.ocx" & """", AppWinStyle.NormalFocus, True)
Dim nOut = FreeFile()
FileOpen(nOut, Application.StartupPath & "\Install.ok", OpenMode.Append)
FileClose(nOut)
End If
End Sub
Il me crée bien le install.ok mais je sait pas à quoi il sert (il fait 0ko) mais je vois pas à quoi sert le .ocx
Que doit-je faire ?
Donc il est censé récupérer le fichier reportman.ocx que j'ai copié dans mon appli à partir de l'autre.
puis, après les traitement :
' Impressions
strFile = Dir(Application.StartupPath & "\Output\Page*.rep")
Do While strFile <> ""
Dim rptRep As New reportman.ReportManX
rptRep.filename = Application.StartupPath & "\Output\" & strFile
rptRep.Preview = False
rptRep.ShowPrintDialog = False
rptRep.Execute()
strFile = Dir()
Loop
Mais il me souligne reportman.ReportManX et me dit : Type 'reportman.ReportManX' non défini.
Vous avez une idée ?
merci
A voir également:
- Imprimer en VB des fichier .rep (reportman)
- Fichier bin - Guide
- Fichier epub - Guide
- Fichier rar - Guide
- Comment réduire la taille d'un fichier - Guide
- Fichier .dat - Guide
1 réponse
J'ai bidouillé un peut et il me souligne plus rien par contre quand je lance le programme il me dit :
La récupération de la fabrique de classe COM pour le composant avec le CLSID {DC30E149-4129-450F-BDFE-BD9E6F31147E} a échoué en raison de l'erreur suivante : 80040154.
Au niveau de reportman.ReportManX
Une idée ?
Merci
La récupération de la fabrique de classe COM pour le composant avec le CLSID {DC30E149-4129-450F-BDFE-BD9E6F31147E} a échoué en raison de l'erreur suivante : 80040154.
Au niveau de reportman.ReportManX
Une idée ?
Merci