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
List the types of generations in garbage collector?
What is econo-jit?
what is the need for dynamic controls in vb.net? i would like to know for what purpose should we create the controls dynamically? please give the answer in simple words.
What is public assembly?
Explain about rapid application development tool?
What are the difference between dispose(), close(), exit(), end()? When do we use them?
Tell me how many .net languages can a single .net dll contain?
Before in my vb app I would just load the icons from dll. How can I load the icons provided by .net dynamically?
How a base class method is hidden?
Explain the differences between vb.net and c#, related to oops concepts?
what is common type system?
Can you please explain the difference between int and int32?
Explain enumerator?
What is the class that allows an element to be accessed using unique key?
Why is the xml infoset specification different from the xml dom?