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 public assembly?
Explain cls?
What is the difference between readonly variable and constant variable?
Explain the differences between vb.net and c#, related to oops concepts?
Define manifest?
Tell me how many .net languages can a single .net dll contain?
what is difference between namespace and assembly?
What are the different variables in vb.net?
Observations between vb.net and vc#.net?
Explain clr?
Explain internal keyword in .net framework?
How to view an assembly?
Explain the use of new keyword?
What is different between web.config and machine.config and where it will be ?
Explain how the .net framework performs automatic memory management.