Delphi 2.0 and Crystal Reports Version 5 (Regarding Sub-reports)

Delphi 2.0 and Crystal Reports Version 5 (Regarding Sub-reports)

Post by Tom Bowd » Tue, 11 Feb 1997 04:00:00

I am having a problem using Crystal Reports to generate reports.

I have a 32 bit app (compiled with Delphi 2.0) which uses  the UCRPE32
component to access CRPE32.DLL.

The specific report which I am trying to generate contains a couple of

The reports uses several Paradox databases

The problem which I am having is that when I set the directory for the
report (using the property 'DataFilesLocation') the crystal reports
engine does not recognize that the data file location has changed.

For example:

1) I create the report, with data location = d:\projects\COMP\APP\Data
2) Run the reports inside of 'Crystal Reports 5.0'.  Works fine
3) Run the report from Delphi app (using ucpe32).  In that app, I set
    the data directory to 'd:\projects\COMP\APP\Data'.  It works
4) Package and deliver to customer
5) In installation process, customer specifies data directory
    to be 'c:\APP\Data'.
6) When the Delphi App is run on customers machine the
    report engine is told that the new data directory is
    'c:\APP\Data'.  A blank window comes up when I
    execute the report, which usually contains '-1' pages
7) If I install Crystal Reports on the customer's system and
    try to bring up the report I see that the database directory is
    'd:\projects\COMP\APP\Data'.  If I try to set the data directory
    to 'c:\APP\Data', it appears to work,but when I run the report
    I get an 'Unable to find d:\projects\COMP\APP\Data\dbname'.

This is all very confusing to me, and I really don't know where else
to turn.

Any help would be greatly appreciated.  If you respond please cc my

Thank You,

Tom Bowden


1. Crystal Reports/SQL 2000 - Reporting from a Stored Procedure with multiple selects (for a sub-report)

I'm having a few problems, that I'm hoping someone can help out with (I
apologize for the cross-posting, but I wasn't exactly sure which newgroup
this should go into).

I've got a VB 6 application to which I'm adding a new report, for which I'm
going to use Crystal 8.

The report itself is actually a report with a sub-report. To generate the
data, I created a stored procedure (that takes a single optional parameter)
that would tabulate the data as needed, and then would return two separate
SELECT statements, the first for the main report, the second for the

So my problem is on several fronts:

1) How do I set up the VB code and/or the Crystal RPT file to use a Stored
Procedure as the source, including the logic for either not passing a
parameter (as a default), or for passing data that the user had selected
(coming from another form in VB)?
2) How do I set up the RPT file to differentiate between the two SELECT
statements coming from the Stored Proc?

Note: Originally my plan was to have a stored procedure (called by VB) that
would create a table of the data, and then have two views that the RPT would
reference. This way I could create the data based on whether (or not) the
user needed to have it send a parameter. Unfortunately, the reason I had to
abandon this logic, is if two users tried to access the same report at the
same time (especially if the two users passed different parameters to the
stored procedure), there would  be a conflict, since the table is a regular
table. I couldn't use a temp (#) table, as I don't believe it'd be able to
find the table going between the stored procedure that created/populated it,
and the VIEW that Crystal would call.

Any ideas?


2. Eric Bergeron, please read!!

3. REports and sub-reports in Crystal Reports

4. platform list

5. Question: Outer Joins in MS SQL-Server when using Sub-Reports of Crystal Reports

6. Question: ODBCs.......

7. Crystal Reports - Main/Sub Reports

8. design of database

9. Crystal Reports 2.0 with Delphi?

10. Crystal Reports & Delphi 2.0

11. How can I extract sub-total from a sub-report into the main report

12. Delphi 2.0 and Crystal Reports