Question pass the parameters to the crystal report

Krishnakumar

New member
Joined
Jan 8, 2015
Messages
2
Programming Experience
3-5
Sir,

My application demands printing of text box values and labels from a Form in paper with some headings. I tried to use crystal report viewer.First of all i could not configure the crystal report in the Form properly. I got help from internet and did all possible ways. I couldn't succeed. I could not proceed as i could not pass the parameters to the crystal report. Kindly advice how to proceed.
I have made a form and crystal viewer is dragged into it. I have one text box and a print button in the form by clicking which i need to get the value printed in the paper with a heading. Even i tried to bind the crystal report ( the code is given below). But i could not succeed. AS i am newbie to crystal report, I need help. Also kindly suggest me whether any other method to execute this application.
Thank you.


Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource

Public Class Form1
Public WithEvents oRpt As ReportDocument

Private Sub btnprint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnprint.Click



'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the
'InitializeComponent() call
oRpt = New ReportDocument()
oRpt.Load("C:\Reports\MyReport.rpt")
CrystalReportViewer1.ReportSource = oRpt
End Sub

with regards
Krishnakumar
 
Back
Top