how to connect crystal report with vb.net ?
Answer Posted / kafeel ahmad
Take crystal report from toolbox .Take New form (I named it
frmRpt)Then take crystal report Viewer from tool box and
place it on new form(frmRpt) I named crystal report Viewer
as crptVW
double click on newform(frmRpt) and place this code---
Public Class frmRpt
Public strRptName As Object
Public strRptFilter As String
Private Sub frmRpt_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
If strRptFilter <> "" Then
crptVW.SelectionFormula = strRptFilter
End If
crptVW.ReportSource = strRptName
crptVW.Show()
End Sub
End Class
now if u want to call it on button_click then paste this
code on that button_click event ------
Dim objRpt As New frmRpt
objRpt.strRptName = New crList
' objRpt.strRptFilter = "{ConsultantMaster.ConId}="
& cboConIDX.SelectedValue 'if want to filter
objRpt.Show()
'now u can open as many crystal report just paste code
above on button_click()
| Is This Answer Correct ? | 8 Yes | 8 No |
Post New Answer View All Answers
What is difference between inline and code behind?
What are the types of generations in garbage collector?
What is the strong name in .net assembly?
Name and explain some of the exclusive features which are present in vb?
Explain the difference between namespace and assembly?
What do you mean by serialization?
What is the difference between import system.data.sqlclient and system.data.oledb?
Thank you for replying to my Question regarding Barcodes in VB.net. My next question is that how to use Barcode Fonts in VB.net I need a small code to Generate Barcodes in VB.net from a string of Values. This is the only problem i am left with in my project. Any body can help me please.
Explain the difference between import system.data.sqlclient and system.data.oledb?
Explain what observations between vb.net and vc#.net?
How a base class method is hidden?
How do you use two datareaders at the same time in a vb.net windows application ?
What are the differences between c# and visual basic.net?
What is the differnce between managed code and unmanaged code?
what is common type system?