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
how to deploy vb.net with key and evaluation time? any one can help me?
how many server control present in .net
What is the importance of a Button control?
thak you Mr Govind for replying to my question. My next question is that how to retrieve image stored in an SQL server table and assign it to any image control or picture control using VB.net
List the different types of assembly?
When do you use virutal keyword?
Explain the components of common language runtime.
How many ways the function can return values?
Explain 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 are the difference between dispose(), close(), exit(), end()? When do we use them?
What is the differnce between managed code and unmanaged code?
Write a VB.Net console program to check whether a number is perfect or not.
what is interface and when it is used?
What’s the difference between private and shared assembly?