Crystal Reports from Different database files? 
Author Message
 Crystal Reports from Different database files?

Hi,

Is there a way to print the same Crystal Report from
different Database files?
I tried the DataFiles() property of Crystal Report but it gave me
error number 20506.  What am I doing wrong?

Thanks in advance
Paul



Sun, 05 Oct 1997 03:00:00 GMT  
 Crystal Reports from Different database files?

Quote:

>Hi,

>Is there a way to print the same Crystal Report from
>different Database files?
>I tried the DataFiles() property of Crystal Report but it gave me
>error number 20506.  What am I doing wrong?

Yes, its possible, in fact required if you want to distribute your
program.  You should make sure the the structure of the tables on which
you are reporting are the same as the originals.

J. Kyle Rickett

 ___________________________________________________
*******    ********       ******
**   ***   *********     ********
**   ****  ***   ****   **********
**   ***   ***   ****   *******  **
*******    ***   ****   ******
*** ***    ***   ****   *******
*** ***    ***   ****    *******
***  ***   ***   ***      *******
***  ***   ********        *******
***   ***  *******      **   ******
***   ***  ******        *********
       International Corporation
      Microsoft Solution Provider
        Sybase Solutions Partner



Mon, 06 Oct 1997 03:00:00 GMT  
 Crystal Reports from Different database files?


: >
: >Hi,
: >
: >Is there a way to print the same Crystal Report from
: >different Database files?
: >I tried the DataFiles() property of Crystal Report but it gave me
: >error number 20506.  What am I doing wrong?
: >
: Yes, its possible, in fact required if you want to distribute your
: program.  You should make sure the the structure of the tables on which
: you are reporting are the same as the originals.

I believe the poster was wondering if you can have (for example) TWO
database files (.MDB, for example) that a single Crystal Report uses
as a data source.  In other words, can you do something like a JOIN
across fields and tables in two separate databases.

The short answer:  Yes.  But you'll need the Pro version of Crystal
Reports, because you'll need to set up a Data Dictionary.  

------------------+------------------------------------------+---------------
Darren Stone      | Frisbeetarianism, n.:                    |         __/\
Vancouver, B.C.   |  The belief that when you die, your soul |   _o   /  \ \_



Mon, 06 Oct 1997 03:00:00 GMT  
 Crystal Reports from Different database files?
[Noise Filter OFF]



| : >
| : >Hi,
| : >
| : >Is there a way to print the same Crystal Report from
| : >different Database files?
| : >I tried the DataFiles() property of Crystal Report but it gave me
| : >error number 20506.  What am I doing wrong?
| : >
| : Yes, its possible, in fact required if you want to distribute your
| : program.  You should make sure the the structure of the tables on which
| : you are reporting are the same as the originals.

| I believe the poster was wondering if you can have (for example) TWO
| database files (.MDB, for example) that a single Crystal Report uses
| as a data source.  In other words, can you do something like a JOIN
| across fields and tables in two separate databases.

| The short answer:  Yes.  But you'll need the Pro version of Crystal
| Reports, because you'll need to set up a Data Dictionary.  

[Fact Filter ON]

OK so 20506 PE_ERR_BADFILENUMBER
"You have tried to set an Nth file name and the file number you specified is
out of the existing range. 0<= fileN < N files."

Data Dictionarys have _nothing_ to do with this problem.

Any Crystal.VBX version does this.

[Noise Filter ON]

In english:  You did something like report1.DataFiles(2) ="...." where 2
is refering to the third (starts at 0) table in the report.  Your report had
less than that many tables in it.  Use Database | File Location to see the
order (and number) of the tables in your report (start your counting of the
first table listed at ZERO).

Now how does one use the DataFiles() property?  In the case of an MDB it is
often very simple.  If there is only one MDB (I'm not refering to tables
here) then all you do is Report1.DataFiles(0) = "C:\temp\theother.mdb"  You
don't need to set all the tables for in an MDB all the others can only point
to one file so they all move at once.  IF you have two distinct MDB's move
one table from each as above.

[Fact Filter OFF]

Some day this might even have more info but if you want to look around and
send your comments go ahead.  Personal home page...

<a href="http://www.island.net/~ianm>Crystal Reports stuff</a>

[Noise Filter OFF]
--

// Ian (McYork)
If Comments = True then "Great" else "Disclaim"



Thu, 09 Oct 1997 03:00:00 GMT  
 Crystal Reports from Different database files?

Quote:

> Hi,

> Is there a way to print the same Crystal Report from
> different Database files?
> I tried the DataFiles() property of Crystal Report but it gave me
> error number 20506.  What am I doing wrong?

> Thanks in advance
> Paul

If I understand your question correctly, then what you want to do
is create a report, making sure that the Database | Set Location
menu option specifies 'Same as report'.  Now, so long as both
database names are the same, the report will always look for the
db in the same directory as the report. Two directories, two
report files, two databases.

The database must have similiar links and table names, of course.
A word of caution, however:  I have found Crystal Reports to be
unreliable at saving this particular option, and have had to go
back and modify the report several times to get it to stick.  Has
anyone else experienced this problem?



Fri, 10 Oct 1997 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Different between VB's Crystal Report and Seagate Crystal Report

2. Accessing Databases in different directories with Crystal Reports

3. Running a Crystal report against the same database in a different directory

4. Crystal Report Database file

5. crystal report problem - close database file

6. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

7. Crystal Reports to different Printers

8. crystal report : different select statements in diff columns

9. Different Pages with Crystal Reports 4.0

10. Running Crystal Report Web Component Server and SQL Server on different machines

11. Crystal reports produces different result in VB than in CR developer

12. Crystal 7: Report is different between Runtime and developer versions

 

 
Powered by phpBB® Forum Software