Showing posts with label codes. Show all posts
Showing posts with label codes. Show all posts

Sunday, March 11, 2012

Crystal Report Problem Need help.

I have the following codes in my report viewer.

However i'm just confuse why is it the the report doesn't display the right filtering.

Let say in this code, I would just like to filter out Such as student no..

I just added DataGrid in the form, fortunately its working fine.

Please I need your help guys. Am I writing my crystal report correct?

Thanks...

[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Call LoadCrSingle(TextBox1.Text)

End Sub

Function LoadCrSingle(ByVal StudentNumber As String)
Dim CrDocument As ClaimStub 'name of crystal report
Dim DsetSingle As New dsStudents
Try
''Build a SQL statement to query the datasource
DsetSingle.Clear()

Dim SqlStr As String = "SELECT REQID, DOC_CODE, STUD_NO FROM Requests where Stud_No ='" & UCase(StudentNumber) & "'"

''Retrieve the data using the SQL statement
Dim Adapt = New OleDbCommand(SqlStr, sqlcon)
Dim da = New OleDbDataAdapter(Adapt)

''Create a instance of a Dataset
''of the table in the report.
da.Fill(DsetSingle, "Requests")
''Pass the dataset to the report
CrDocument = New ClaimStub 'make new fill dataset
CrDocument.Database.Tables(0).SetDataSource(DsetSingle)
''View the report
CRViewer.ReportSource = CrDocument
DataGrid1.DataSource = DsetSingle.REQUESTS

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Me.Text)
End Try

End Function
[code]Open the file and in the menu File, uncheck the option Save Data with Reports

Wednesday, March 7, 2012

Crystal Report - C#

Hi, everyone
I'm looking for sample codes in C#, using Crystal Report 10 and connecting to database ORACLE (not Access or SQL Server!)
Any help is appreciated,
thank youJust a link to the samples is fine... I'm really in trouble!|||I could find a way to use CrystalReportViewer, but everytime you click something it must refresh the page. I can't use it because it's too slow. I can't believe that actually someone use it...

In classic ASP I can use ActiveX Viewer and it's PERFECT. How can I use it in .NET?|||Hi,
i am using CR 10 and Oracle, but I don't have a direct connection from CR to Oracle. What I am using is a strongly typed dataset, which I link to the reportsource.
Maybe this helps.|||Hi,
i am using CR 10 and Oracle, but I don't have a direct connection from CR to Oracle. What I am using is a strongly typed dataset, which I link to the reportsource.
Maybe this helps.

Hi Reinhold,
I'm using CR 10 and Oracle, too.

As far as I'm a newbie in .NET, can you post me a sample code that explain your solution?
Because that CrystalReportViewer object is useless with that "refresh" problem.

Thanks in advance