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 ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is datatype conversion?
Why do you need Lock in Visual Basic?
Which is the base class for all the classes in .net framework?
What’s the difference between private and shared assembly?
What is portable executable?
How to store decimal data in .net?
Explain private assembly?
Describe about visual basic.net?
Explain managed code?
Explain manifest?
What is the differnce between managed code and unmanaged code?
List the types of authentication?
What is option strict?
What is the maximum size of the textbox?
Explain how to store decimal data in .net?