J'ai besoin d'aide !
Comment faire pour lancer l'impression d'un état Crystal Report directement par du code dans une application VB ?
Merci de vos renseignements
J'ai besoin d'aide !
Comment faire pour lancer l'impression d'un état Crystal Report directement par du code dans une application VB ?
Merci de vos renseignements
In order to use the RDC Automation Server with existing .rpt files first reference it:
- In VB menu select Project | References | Crystal Report 8 ActiveX Designer Runtime Library
- Click OK
Next put the Crystal Report Smart Viewer on a form in your application:
- In VB menu select Project | Components | Crystal Report Smart Viewer
- Click OK
- Double click it in the component bar to add it to the visible form.
Add the following code to the form with the Smart Viewer:
Voilà.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 'General Declarations Dim CrxApp As New CRAXDRT.Application Dim CrxRpt As CRAXDRT.Report Private Sub Form_Load() 'Use the OpenReport method of the Application object to open the report. Set CrxRpt = CrxApp.OpenReport("c:\report.rpt") CRViewer1.ReportSource = CrxRpt CRViewer1.ViewReport End Sub
Trouvé sur http://support.crystaldecisions.com/library/kbase.asp
Moi je fais:
CRReport.PrinterName = "nom imprimante"
CRReport.PrinterPort = "port imprimante"
CRReport.ReportFileName = "nom rapport"
CRReport.Destination = 1 (pour imprimer)
PrintResults = CRReport.PrintReport
et ca marche!
Bonjour
J'essai de faire le code en vb4 et crystal report , cela ne marche pas
avez vous un autre solution ?
merci
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager