Results 1 to 4 of 4

Thread: Running Crystal 5.0 sub report under vb

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    -
    Posts
    101

    Post

    I've created a report form using crystal 5.0 to display my data from ms access 97. I then called this report from VB 5.0 with the following code:

    rptSalaryDetail.DataFiles(0) = "MyMDB.MDB"
    rptSalaryDetail.Connect = "MS Access; PWD=MyPassword"
    rptSalaryDetail.ReportFileName = "MyReport.RPT"
    rptSalaryDetail.Destination = crptToWindow
    rptSalaryDetail.Action = 1

    Now here is the problem. The report (MyReport.RPT) contains a sub-report (MySub.RPT) which displays some information from the same database (MyMDB.MDB). Since the database is password protected, an input box appears everytime I generate the report from VB, asking for the database password, which I have already declared (rptSalaryDetail.Connect = "MS Access; PWD=MyPassword"). I suspect that the password the system is asking is for the subreport. I have remove the subreport(MySub.RPT) from the main report (MyReport.RPT) and run again the application, and it resulted to a "No Error" report.

    How do you set the connection string of a crystal sub-report from VB?

  2. #2
    Member
    Join Date
    Nov 1999
    Posts
    63

    Post

    Rod,

    This doesn't help you with your problem, but I thought I'd relay my experience with Crystal Reports version 7. After running into the exact problem you describe I said goodbye to that over bloated CR forever. At the time (about a year ago) I searched Seagate's knowledge base and found absolutely nothing to help with the problem. I was under pressure to meet a deadline so I decided to dump CR and try DataDynamics' ActiveReports. It turned out to be the best decision I ever made.

    Try searching Seagate's knowledge base. They may have a solution up there by now--or maybe they don't.

    Seagate Knowledge Base http://community.seagatesoftware.com/library/kbase.asp

    Gerald

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    -
    Posts
    101

    Post

    Thanks for the info Gerald. All the while I thought CR was the best report generator there is, until now.


  4. #4
    Member
    Join Date
    Nov 1999
    Posts
    63

    Post

    You're welcome Rod. I got tired of struggling with CR to create reports that were even just a little beyond simple file dumps. CRs' interface to the database was not very intuitive and was often restrictive--I hated using selection formulas. The other downside to CR is that in order to deploy your application you had to include about a dozen different support files (OCX and DLL) as well as the RPT files for each report in your application. With ActiveReports there is only one DLL file and all your reports are compiled within the VB application itself.

    ActiveReports is a designer that looks very much like VB's DataReport with the exception that ActiveReports is far more flexible and it does not require that ridiculous DataEnvironment.

    You can download the fully functional evaluation copy from: http://www.datadynamics.com/

    And to be fair to CR, Seagate also offers a report designer component. I don't know anything about it, but you can download it for free from: http://www.seagatesoftware.com/produ...eports/rdc.asp

    Gerald

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