Backward compatibility problems loading old version reports
We are working now with version 10.04. Is backward compatibility supported
for version 6.02?. I'm having problems opening old reports in the new
components. For example "OnPageRequest Invalid property value". Also we
created this reports using BDE, and in the new Report explorer I'm using
the NativeDB and I got some unknown classes "TdaBDEQueryDataView not
found". Need some input on this matter, we have a lot of reports and we
already have the new version. I need to know if this reports are going to
be reusable or if we have to rewrite everything.
Thanks
--- posted by geoForum on http://delphi.newswhat.com
for version 6.02?. I'm having problems opening old reports in the new
components. For example "OnPageRequest Invalid property value". Also we
created this reports using BDE, and in the new Report explorer I'm using
the NativeDB and I got some unknown classes "TdaBDEQueryDataView not
found". Need some input on this matter, we have a lot of reports and we
already have the new version. I need to know if this reports are going to
be reusable or if we have to rewrite everything.
Thanks
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
We have had many customers successfully upgrade from RB 6 to RB 10.04.
ReportBuilder is backward compatible. This may be a corrupt installation if
you still receive errors. Take a look at the article at the bottom of this
message to completely reinstall if you still encounter errors.
Which device were you implementing the OnPageRequest event?
The TdaBDEQueryDataView is still present in RB 10.04. It is located inside
the daDBBDE.pas file that should be recognized automatically when you create
a dataview using the BDE in Dade.
--------------------------------------------
Article: Cleaning up a Corrupt Installation
--------------------------------------------
If you have been advised by Digital Metaphors technical support that you may
have a corrupt installation, or if you are having difficulty installing,
compiling or running applications after a ReportBuilder install, then it may
be necessary to manually remove all ReportBuilder files from your system.
Corrupt installations usually result when you are installing over a previous
version of ReportBuilder which was not installed into the default directory,
which was recompiled from the source, or when ReportBuilder files were
manually moved from the default install location. Cleaning up a corrupt
installation, consists of locating all ReportBuilder related files, and
deleting them from your system. The first step is to use the uninstall
program to remove as much of ReportBuilder as possible.
Run the uninstall program
1. Exit Delphi, and all other applications. You should have no applications
running except the uninstall, otherwise you may lose some of your work.
2. Select Start | Settings | Control Panel from your Windows desktop.
3. Double-click the Add/Remove programs icon.
4. Locate the version of ReportBuilder you wish uninstall and double-click
it.
5. The first page of the Uninstall Wizard allows you to choose between an
Automatic or Custom uninstall. Choose Custom and click the Next button.
6. Click the Select All button, then the Next button. Repeat these steps
until you reach the last page of the wizard.
7. Click the Finish button. All of the items you selected will be removed
from the system.
8. After all the ReportBuilder files are removed, you may be prompted to
reboot the system. If this is the case, reboot the system.
Delete the ReportBuilder root directory (and all subdirectories)
1. Using the Windows Explorer, locate the ReportBuilder root directory. The
default directory is:
C:\Program Files\Borland\DelphiX\RBuilder
2. Once you have located this directory, inspect it. If you have any custom
work in this directory which you would like to keep, move it to another
directory.
3. Delete the ReportBuilder root directory.
Delete all remaining ReportBuilder files
1. Using the Windows Explorer, search the entire hard drive for all
occurrences of:
dclRB*.bpl
dclRB*.dcp
rb*.bpl
rb*.dcp
2. Delete any occurrences which correspond to the version you are removing.
All packages are named with the convention NN, where the first number
is the ReportBuilder version and the second number is the Delphi version.
Thus, a typical package name for Delphi 5 would be rbRCL45.bpl. The same
package for Delphi 4 would be: rbRCL44.bpl. Check Installing ReportBuilder
for a list of the packages associated with each version.
3. Using the Windows Explorer, search your hard drive for all occurrences
of:
pp*.*
da*.*
ra*.*
4. These are the prefixes used by individual ReportBuilder units. 'pp' is
used for ReportBuilder units, 'da' is used for DADE units, and 'ra' is used
for RAP units. Depending on which ReportBuilder you have (Standard,
Professional or Enterprise) you may not have all of these unit types.
Additional Notes
1. Never have Delphi running when installing ReportBuilder.
2. All ReportBuilder related files should be stored in the root directory
$(DELPHI)\RBuilder.
3. All ReportBuilder run-time packages should be stored in the
Windows\System directory.
4. You should never have ReportBuilder files in Delphi\Lib, Delphi\Bin or
Delphi\Projects\Bpl.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
After reading your post again, I realized what is happening.
The report templates are not compatible across database plugins. For
instance, DataViews created with the BDE, will not automatically function
with NativeDB. You will need to convert your BDE templates to use the
NativeDB Dade classes in order to get them working with the new
connectivity. Take a look at the following article on how to convert from
BDE to ADO. The same concepts apply.
-------------------------------------------------
Tech Tip: Convert BDE Template Dataviews To ADO
-------------------------------------------------
Currently when DADE is used to create dataviews, the DatabaseName is stored
as part of the query definition. (This is consistent with Delphi's approach
to specifying a database connection for a Query object).
When you created the reports originally, the daDBBDE.pas BDE DADE plugin was
used. Now you want to use ADO. You've already changed the
Designer.Datasettings but this had no effect on the old reports. They still
try to use the BDE connection. Changing the Designer.DAtaSettings only works
for new dataviews that are created, because the new query dataviews are
using the daADO.pas ADO DADE plugin.
In order to convert the templates from BDE to ADO, at the minimum you have
to change the database name and the DADE plugin class names that are stored
in the templates. When a BDE dataview is created, its class type is a
TdaBDEQueryDataview. When an ADO dataview is created, its class type is
TdaADOQueryDataview. These class types are stored in the template. These
have to be changed before the template is loaded into a report.
First, compare a BDE report template to an ADO report template which both
connect to the same database table. Save a BDE and an ADO based report
template to separate ASCII text files. Now compare the dataview definitions.
Change the TdaBDEQueryDataview class name to TdaADOQueryDataview in the BDE
template. Change the BDE alias to your ADOConnection object. Then compare
the table name and field names of the BDE template to the ADO template and
change them accordingly, removing the .db extension on the table name is
necessary. Now load the converted BDE template in your ADO end user
application.
The first step is to make a backup of all your templates before continuing
with a programatic approach. You can convert the templates programatically
by loading the ASCII template files to a TStringList object. Then loop
through the lines of the list and change the text programatically. You can
loop through the files in a directory using ppFileUtils.pas calling the
GetFileNamesForDirectory procedure to load the file names.
If you have binary report templates, you'll also be able to convert these
with an extra couple of steps. You can load the binary template file into
ASCII format, modify it, and then save it back to binary as shown in the
example links below. Keep in mind the conversion is performed without
loading the report template into a TppReport.
This example shows how to load reports stored to the ReportExplorer database
tables and convert them to ascii text.
http://www.digital-metaphors.com/tips/EditTemplatesAsText.zip
This example shows how to convert an .rtm file to asii text
http://www.digital-metaphors.com/tips/ConvertBinaryTemplateToASCII.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
could be done.
--- posted by geoForum on http://delphi.newswhat.com
My first suggestion would be to recreate one of your reports from scratch,
then compare that working template text to a converted template text. They
should essentially be identical.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Did that and still I have some problems when I open the new report with no
BDE classes. I have to go to the Data tab, click on the Tables and OK, and
save it. After that it works fine. I don't see where else the report store
the info about BDE if the class name is not there anymore.
Thanks,
Suyin
was
works
definitions.
database
--- posted by geoForum on http://delphi.newswhat.com
lowercase :-)).
Thank you
--- posted by geoForum on http://delphi.newswhat.com