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 an arraylist?
How many ways the function can return values?
What is sorting in vb?
How to send xml file on server using http protocol?
What are the objects in asp.net?
Did vb6 support multi-threading ?
Explain about the keyword must inherit?
Name some of the features of C# which are not present in VB.NET?
What is the use of assembly?
Name the class which allows an element to be accessed using unique key?
Explain how to store decimal data in .net?
What is non_deterministic finalization?
Explain jit?
Why should you use delegate?
What is the significance of delegates. Where should they be used?