Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use byref keyword in vb.net?

1007


What is the exact defination of object?

974


Explain the difference between c# and vb.net?

1000


What is the difference between static or dynamic assemblies?

978


List the types of generations in garbage collector?

859


Explain the use of option explicit?

964


So you know which dll is used for microsoft .net run time?

930


What are the different variables in vb.net?

920


What is the advantage of using system.text.stringbuilder over system.string?

1090


Explain about rapid application development tool?

908


What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?

933


What are the shadow variables?

1020


Name the class which allows an element to be accessed using unique key?

965


How many languages are supported by .net?

926


What are the advantages of an assembly?

1023