PDA

Click to See Complete Forum and Search --> : [Resolved] [2005] Getting Started With Crystal XI


Jigabyte
Dec 13th, 2006, 08:16 AM
Hi All,

I have only just got used the new way of code crystal reports in VB6 and now I want to code it in VS2005 and don't know where to start. I have seen examples where you populate in code a dataset and get the report to point and display the results but I want to pass and SQL string to my report and use the report viewer to show the report. I also want to be able to set the path of each table in the report.

Can anyone please help with this, I don't have a clue how to get started.

Cheers very much in advance,

Jiggy!

Pasvorto
Dec 13th, 2006, 09:12 AM
Go to the .NET forum. There have been many examples placed there.

Jigabyte
Dec 13th, 2006, 11:46 AM
Hi Mate,

I managed to sort it my looking at my code in VB6. Its not that much different.

Cheers,

Jiggy!

PS. If anyone wants the code please let me know and I will post it!

surya
Dec 13th, 2006, 10:35 PM
PS. If anyone wants the code please let me know and I will post it!

could you please post your sample code....
thanks

Jigabyte
Dec 14th, 2006, 02:17 AM
Public crxReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Public crxFormulaFields As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinitions
Public crxFormulaField As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinition

Dim iTables As Integer

crxReport.Load(sReportPath & "Test.RPT", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)

For iTables = 0 To crxReport.Database.Tables.Count - 1
With crxReport.Database.Tables(iTables)
.Location = sDataPath & "Morrisons.MDB"
End With
Next

crxMain.ReportSource = crxReport

If Destination = enumPrinterDestination.crxPreview Then
crxMain.Show()
Else
crxMain.PrintReport()
Me.Close()
End If

surya
Dec 14th, 2006, 11:24 AM
Hello Jigabyte,
i am trying to get started with cs; could you please help me with my post below:

http://www.vbforums.com/showthread.php?t=442317