none
VFP and Crystal Report

    Question

  • I wish to integrate the latest version of Crystal Reports 2008 in my desktop package built on VFP9.
    Currently I am using Crystal Report Control (CRYSTL32.OCX). But I am trying to improve the preview Look & Feel as an when I saw the New Crystal Report 2008. In addition to that, the Crystal Report Viewer Control (cviewer.dll) is also not giving me the satisfactory look & Feel and features as I have seen in CR 2008.
    But CR 2008 is not supporting RDC any more and the Crystal Report Viewer Control is not being upgraded to that much.
    My main objective is to adopt the latest look & feel and features...

    What Should I do..

    Suman
    =====
    Wednesday, November 26, 2008 6:58 AM

Answers

All replies

  • Build your reporting tool in .NET. You can use Interop to have it interact with your VFP app. My article at http://www.craigberntson.com/articles/formsinterop.pdf shows how to do the Interop.

     

    Wednesday, November 26, 2008 4:30 PM
  • Craig Berntson,

    Thanks for your reply. I will read that document.

    However, another way
    (if possible) I got an idea that if I use Crystal Reports Viewer 2008 application to view the generated RPT files as this application is now free. If my application save a copy of RPT files with data in temporaty location and therefore the ShellExecute will launch the Viewer application with the temporaty RPT files. But then, I need to parameterise the application launch so that, I can mention RPT files with the Viewer EXE file and/or I may off the flash screen of application.

    Is it possible any way ?

    DECLARE INTEGER ShellExecute IN shell32.dll ;
      INTEGER hndWin, ;
      STRING cAction, ;
      STRING cFileName, ;
      STRING cParams, ; 
      STRING cDir, ;
      INTEGER nShowWin
    cAction = "open"
    cFileName = "C:\Program Files\Business Objects\Crystal Reports Viewer 2008\CrystalReportsViewer.EXE"
    ShellExecute(0,cAction,cFileName,"","",1)

    But with the above sample code, the Viewer application is being launched but I cannot open the rpt directly at time of Viewer launch.

    But if I write

    cFileName = "C:\AppTemp\Test.rpt"
    ShellExecute(0,cAction,cFileName,"","",1)
     

    Then If I have Crystal Reports installed, then it will open the rpt files in Crystal Report Design..

    cFileName = "C:\Program Files\Business Objects\Crystal Reports Viewer 2008\CrystalReportsViewer.EXE"
    cParams = "C:\AppTemp\Test.rpt"
    ShellExecute(0,cAction,cFileName,cParams,"",1)

    The above code is also not opening the rpt directly...

    Suman
    =====

    Thursday, November 27, 2008 5:35 AM
  • Ok,  I  found  a  solution of the problem of not opening the RPT files using the Viewer Application.

    ShellExecute(0,cAction,cFileName,cParams,"",1)
    ShellExecute(0,cAction,cFileName,cParams,"",1)

    That is executing the
    ShellExecute() twice with the same parameters. But I wondered, what is the logic??

    But still I am not impressed with this implementation as the the Viewer application need to be installed on the pc where I am running my package. I am searching for some runtime dll....

    Suman
    =====

    Thursday, November 27, 2008 1:37 PM
  • I have not used Crystal Reports 2008 nor the viewer, so I can't address your last question.

     

    Thursday, November 27, 2008 1:40 PM
  •  Craig Berntson wrote:
    Build your reporting tool in .NET. You can use Interop to have it interact with your VFP app. My article at http://www.craigberntson.com/articles/formsinterop.pdf shows how to do the Interop.

     

     

    I have done some interop until now but having a quick glance at your article started to spark new ideas especially XAML part. Thanks for the great work.  

    Thursday, November 27, 2008 9:35 PM
  • Cetin,

     

    Happy that I could help.

     

    Friday, November 28, 2008 3:08 PM
  • Hi Suman,

    This post a little old but I'll give it a try anyway.

    I am in the same boat as you and was just wondering if you found a solution?
    We are using VFP 9 and are trying to launch CR2008 to print reports.

    Thanks

    Dat
    • Proposed as answer by NerdAlert Sunday, November 01, 2009 6:06 AM
    Thursday, September 24, 2009 1:32 PM