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
Why do we use byref keyword in vb.net?
What is the exact defination of object?
Explain the difference between c# and vb.net?
What is the difference between static or dynamic assemblies?
List the types of generations in garbage collector?
Explain the use of option explicit?
So you know which dll is used for microsoft .net run time?
What are the different variables in vb.net?
What is the advantage of using system.text.stringbuilder over system.string?
Explain about rapid application development tool?
What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?
What are the shadow variables?
Name the class which allows an element to be accessed using unique key?
How many languages are supported by .net?
What are the advantages of an assembly?