-
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
-
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.
-
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.
-
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
-
<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>
-
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
-
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.
-
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
-
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
-
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
-
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.
-
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
-
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
-
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.