dcsimg
Results 1 to 3 of 3

Thread: Crystal Reports 8.5 and VB.Net

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    4

    Crystal Reports 8.5 and VB.Net

    Hi,

    I'm working on a project in VB.Net 3.5 / Visual Studio 2008 and Sql Server 2005.

    A consultant has made about 200 reports in Crystal Reports 8.5 for us some years ago. I can't find any info on how to make these available to the VB.Net project (they were made for VB 6).

    What would be the best approach? Is there a simple batch upgrade command or something? We will most likely purchase the newest version of Crystal Reports, but I need to figure out if a conversion is necessary, and if so, if the conversion would be a big project or if it's more or less an automatic thing.

    Thanks in advance!

    Pettrer

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal Reports 8.5 and VB.Net

    1.- I have CR 10 and CR 12 (CR 2008) and I can open with them rpt files created with CR 8.5. So You could buy a new CR version and upgrade every rpt file

    2.- I'm (almost) sure that You can reference the CR 8.5 libraries in Your VB.net project and work with the CR 8.5 rpt files

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    4

    Re: Crystal Reports 8.5 and VB.Net

    Hi,

    Thanks for your reply. I have now returneed to this task after some moths. We don't have rpt files but DSR and DSX files. From what I've read elsewhere, I won't be able to use those files directly in a VB.Net 3.5 environment.

    Therefore, I guess referencing the old libraries would be the best approach, but I have no idea on how to do that in general and I don't know really what to search for on the net.

    In my Visual Studio project, I found the folder called References.
    I also located the program folder called Seagate Software (Crystal Reports was owned by Seagate software at the time). In the subfolder Crystal Reports, I see several .dll files: c2supprt, crwdmr, and ImpWDF. When I try to import them via Browse... I get an error message saying "Please make sure that the file is accessible, and that it is a valid assembly or COM component." There is another bunch of .dll files in the Report Designer subfolder, but I don't think they are needed.

    In my VB6 project (which I am recoding in VB.Net) I have the following code:

    Code:
            Dim Report As CRHistorikLista
            Dim rstHistorikLista As ADODB.Recordset
    
            Report = New CRHistorikLista
    
            rstHistorikLista = LagradProcHamtaRecordset("XHistorikLista", theID)
    
            If rstHistorikLista.EOF Then
                MsgBox("Nothing to print")
                Exit Sub
            End If
    
    
            '''''
            'LOGO Report
            '''''
    
            Report.Database.SetDataSource(rstHistorikLista)
    
    
            frmPreview.CRViewer1.ReportSource = Report
            frmPreview.CRViewer1.EnableExportButton = True
            frmPreview.CRViewer1.DisplayGroupTree = False
            frmPreview.CRViewer1.ViewReport()
            ShowModalUnload(frmPreview)
    
            rstHistorikLista = Nothing
    This particular piece of code uses the file CRHistorikLista.DSX (or .DSR) and sets a list of data (via an external sub) as its datasource. Then a preview window is opened. I know I'll have to rewrite the preview window code.


    All hints are welcome!

    Thanks again,

    Pettrer

    Quote Originally Posted by jggtz View Post
    1.- I have CR 10 and CR 12 (CR 2008) and I can open with them rpt files created with CR 8.5. So You could buy a new CR version and upgrade every rpt file

    2.- I'm (almost) sure that You can reference the CR 8.5 libraries in Your VB.net project and work with the CR 8.5 rpt files
    Last edited by pettrer; Oct 1st, 2009 at 07:52 AM.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width