Results 1 to 6 of 6

Thread: [Resolved] [2005] Getting Started With Crystal XI

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    [Resolved] [2005] Getting Started With Crystal XI

    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!
    Last edited by Jigabyte; Dec 13th, 2006 at 01:09 PM.

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: [2005] Getting Started With Crystal XI

    Go to the .NET forum. There have been many examples placed there.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: [2005] Getting Started With Crystal XI

    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!
    Last edited by Jigabyte; Dec 13th, 2006 at 01:09 PM.

  4. #4
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    449

    Re: [2005] Getting Started With Crystal XI

    Quote Originally Posted by Jigabyte

    PS. If anyone wants the code please let me know and I will post it!
    could you please post your sample code....
    thanks

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: [Resolved] [2005] Getting Started With Crystal XI

    VB Code:
    1. Public crxReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    2.     Public crxFormulaFields As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinitions
    3.     Public crxFormulaField As CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinition
    4.  
    5.         Dim iTables As Integer
    6.  
    7.         crxReport.Load(sReportPath & "Test.RPT", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)
    8.  
    9.         For iTables = 0 To crxReport.Database.Tables.Count - 1
    10.             With crxReport.Database.Tables(iTables)
    11.                 .Location = sDataPath & "Morrisons.MDB"
    12.             End With
    13.         Next
    14.  
    15.         crxMain.ReportSource = crxReport
    16.  
    17.         If Destination = enumPrinterDestination.crxPreview Then
    18.             crxMain.Show()
    19.         Else
    20.             crxMain.PrintReport()
    21.             Me.Close()
    22.         End If

  6. #6
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    449

    Re: [Resolved] [2005] Getting Started With Crystal XI

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width