[RESOLVED] Missing something on Crystal Report....why is that happening??
I am trying to set the datasource for my crystal report....
but somehow....
I used this code
VB Code:
Private crPendingReport As New PendingRequestReport
Private Sub PendingRequestReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
daRequest.Fill(DsPendingRequest1)
daClient.Fill(DsPendingRequest1)
crPendingReport. ????? '<---I want to set my datasource, what did I do wrong?
End Sub
Can anyone assist me???
Re: Missing something on Crystal Report....why is that happening??
Check out this thread.
Maybe it'll help a little?
http://www.vbforums.com/showthread.php?t=363891
Re: Missing something on Crystal Report....why is that happening??
you should do this code
VB Code:
dim rep as new report1 ' assuming that your report is called report1
dim dax as datatable ' this is hte datasource, dataset or datatables are ok
rep.SetDataSource(dax)
rep.refresh
then you should assing the rep to a crystalviewer to show it on screen
rgds
Re: Missing something on Crystal Report....why is that happening??
Quote:
Originally Posted by maged
you should do this code
VB Code:
dim rep as new report1 ' assuming that your report is called report1
dim dax as datatable ' this is hte datasource, dataset or datatables are ok
rep.SetDataSource(dax)
rep.refresh
then you should assing the rep to a crystalviewer to show it on screen
rgds
Almost exactly what I was pointing to in my previous post. :)
VB Code:
Dim oDoc As New ReportDocument
oDoc.Load("c:\crystal reports\AccountsPayable\APCheck.rpt")
oDoc.SetDataSource(New Check().GetChecksForPayment(dtCashReq.Text))
crv1.ReportSource = oDoc
Re: Missing something on Crystal Report....why is that happening??
ok....I solved it....Thanks