|
-
Sep 14th, 2003, 10:43 AM
#1
Thread Starter
Addicted Member
crystal report blank
hi All
I am facing problem with crystal report
1>I created a report on my system, it is working fine on my system. But when I copy that rpt file to user system, it gives blan report always.
Is this related any way to 'Save Data With Report' option under
"File" menu in crystal report.
2>I create report on my system and specify the data file which is
in D:\XYZ folder. On user system also it force me to have the same location for datafile.
Is there any way to specify at runtime to crystal report the path for datafiles?
Thanx in advance.
bye
-
Sep 14th, 2003, 11:28 AM
#2
The option "save data with report"saves the data of what is at that moment in the DB (or file) along with the report, without ever refreshing it.
-
Sep 15th, 2003, 07:01 PM
#3
Thread Starter
Addicted Member
Thanx but it is not solved.l
I am facing following problem with Crystal Report.
I am using CR 8.5 and VB6 and the data is in mdb.
I have created a report on my system which I am using for development.
When I take the Report on my system, it shows correct data.
While creating report, I have selected database as
D:\ABC\tempfiles.mdb and a table from this.
On users system, my app is installed in C:\xyz and rpt file
is also available in C:\xyz.
I have created a folder on D: as D:\ABC and copied
tempfiles.mdb to D:\ABC.
Logic of the program uses tempfile.mdb always from d:\abc.
When I take the Report on user system, it shows blank.
I checked the mdb there and table contains the records as per query.
I am not able to figure our exact problem. Its very urgent for me.
Can anyone please help me?
The code for dispaying report is as under...
CrystalReport1.ReportFileName = App.Path & "\AssoList.rpt"
CrystalReport1.DiscardSavedData = True
CrystalReport1.Destination = crptToWindow
CrystalReport1.WindowState = crptMaximized
CrystalReport1.ProgressDialog = True
CrystalReport1.Action = 1
Thanx in advance.
-
Sep 15th, 2003, 07:22 PM
#4
Thread Starter
Addicted Member
surprised.
I think this is a simple for you.
This forum was of gr8 help to me in past but i am not getting help on this.
Can some pls help me.
Its very urgent
pls
-
Sep 15th, 2003, 07:49 PM
#5
Fanatic Member
<rant>
try the freakin REPORTING forum
and MODS *** do u DO? isnt it ur job to move threads like this in the right place!?
i know the reporting forum isnt the busiest, but if we keep moving threads, ppl will get the idea, and it would clean this forum up a bit!
</end rant>
-
Sep 15th, 2003, 08:01 PM
#6
Thread Starter
Addicted Member
thanx for ur kind advice SkinLab.
But tell me if u can answer this?
I have tryied some reporting forums but not getting the correct solution.
can any pls help me
bye
-
Sep 16th, 2003, 03:25 AM
#7
Use the DataFiles() property to reference files in a different location. If your report only uses 1 table, it's easy:
CrystalReport1.DataFiles(0) = "C:\XYZ\MyFile.mdb"
If the report uses more than 1 table, you have to determine their ordinal position within the report and reference them accordingly. To find out their position within the report, open your report in Crystal, select Database|Set Location. The tables used by the report will be listed in their ordinal positions, so if your tables were listed as follows:
Names
Addresses
Orders
In this case:
Names would be DataFiles(0)
Addresses would be DataFiles(1)
Orders would be DataFiles(2) and so on.
If you only wanted to change the location of the Orders table, you would code:
CrystalReport1.DataFiles(2) = "C:\XYZ\MyFile.mdb"
Hope that helps.
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Sep 16th, 2003, 04:27 AM
#8
Frenzied Member
I always use ODBC driver (DSN) when running crystal reports from VB with Access. That way you're not stuck having the database in the exact location.
* Start|Settings|Control Panel|Administrative Tools|Data Source(ODBC)
* Click 'ADD'
* Choose Microsoft Access Driver
* Specify a Name for you Data Source - this can be anything but must be the same on the devlopers machine as on the users machine, as this is what the crystal report will look for
* Click 'Select Database'
* Navigate to the correct location
* OK
* OK
* OK
In your crystal:
* Choose Database from the menu
* Click ODBC
* Select the name you gave your datasource
* Choose the tables you require
-
Sep 16th, 2003, 07:09 AM
#9
Addicted Member
The first few pages of this document shows you how to change the location of a database for both the crystal ocx and rdc.
http://support.crystaldecisions.com/...8-ocxtordc.pdf
-
Oct 2nd, 2003, 01:48 PM
#10
Thread Starter
Addicted Member
Now i am using this code for report display.
CrystalReport1.ReportFileName = App.Path & "\label_fixed1.rpt"
CrystalReport1.DataFiles(0) = "C:\XYZ\TMPFILES.MDB"
CrystalReport1.DiscardSavedData = True
CrystalReport1.Destination = crptToWindow
CrystalReport1.WindowState = crptMaximized
CrystalReport1.ProgressDialog = True
CrystalReport1.WindowShowRefreshBtn = True
CrystalReport1.Action = 1
BUT the Report is Blank. When I click the REFRESH button, It shows the correct data.
Please help me in rectifying my problem.
Thanx
-
Oct 2nd, 2003, 01:57 PM
#11
Addicted Member
Did you install crystal reports service pack 2 yet?
If not, you can get it here: http://support.crystaldecisions.com/servicepacks
This might take care of your problem.
-
Oct 4th, 2003, 09:20 AM
#12
Thread Starter
Addicted Member
Thanx Ken
I will try that.
But Please tell me if i need to install the service pack on my development system or on user system or both.
Thanx
-
Oct 4th, 2003, 09:33 AM
#13
Thread Starter
Addicted Member
Thanx Ken
I will try that.
But Please tell me if i need to install the service pack on my development system or on user system or both.
Thanx
-
Oct 4th, 2003, 10:15 AM
#14
Addicted Member
On your development system.
If your users have crystal reports loaded on their pc, then you would want to install on those pcs. If not, you want to compare all the crystal files in your install and see any newer ones were install with the service pack. If there are any, create a new install and include these new files.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|