Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: help Post Reply Post New Topic
Author Message
christian mukeb
Newbie
Newbie
Avatar

Joined: 22 Jul 2012
Online Status: Offline
Posts: 2
Quote christian mukeb Replybullet Topic: help
     Posted: 23 Jul 2012 at 1:48am
CryCryCryCryCryGood morning!!!!!
am a trainee database developer and ive am working on a project where i have to create a database and i need to use crystal report for some other issues bt i have no idea what a crystal report is so please i need help about how the crystal report works?does it need an interface where the user enter infos and then pass it to the report itself or we write directly on the report.......am using visual studio 2010
Chris
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Jul 2012 at 7:24am
cr is a tool that displays datasets. it displays a report that you have designed. it doesn't need a ui, it has one that you call, for the report viewer.  you can enter parameters on the report, you can have your app enter the parameters, or you can gather the data from your app and push it to the report.
 
I would suggest playing with it. I believe that you can download an add on for vs2010 so you can develop cr.
 
good luck
IP IP Logged
christian mukeb
Newbie
Newbie
Avatar

Joined: 22 Jul 2012
Online Status: Offline
Posts: 2
Quote christian mukeb Replybullet Posted: 24 Jul 2012 at 11:37pm
Thank u Lock for ur reply iv reach a point where am trying to load my report bt i cant its givng me an error sayng report load failed and here is the code i have:
 
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

Dim rpt As New CrystalReport1() 'My report created.

Dim myConnection As New SqlClient.SqlConnection(My.Settings.EvapcoDBConnectionString.ToString)

Dim MyCommand As New SqlClient.SqlCommand()

Dim myDA As New SqlClient.SqlDataAdapter()

Dim myDS As New CoilDataSet() 'My DataSet created.

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument()

Try

myConnection.open()

oRpt.Load("\D:EvapcoDB\EvapcoDB\CrystalReport1.rpt)

oRpt.SetDataSource(myDS.Tables("coil"))

MyCommand.Connection = myConnection

MyCommand.CommandText = "SELECT * FROM Coil"

MyCommand.CommandType =

CommandType.Text

myDA.SelectCommand = MyCommand

myDA.Fill(myDS, "Coil")

rpt.SetDataSource(myDS)

CrystalReportViewer1.ReportSource = rpt

CrystalReportViewer1.RefreshReport()

Catch Ex As Exception

MessageBox.Show(Ex.Message, "Error", MessageBoxButtons.OK,

MessageBoxIcon.Error)

Finally

If myConnection.State = ConnectionState.Open Then

myConnection.Close()

End If

myConnection.Dispose()

End Try

End Sub



Edited by christian mukeb - 24 Jul 2012 at 11:42pm
Chris
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum