Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Migration from BDE to dbExpress

edited May 2003 in End User
Hello,

I have a problem with the migration of my reporter project from BDE to
dbExpress.
I would like to re-use my old reports.
If I start a report I receive the following error message:
"Engine configuration not found" (BDE engine ? )

After removing the unit daDBBDE I get the error message:
"Class TdaBDEQueryDataview not found"

In the report template I found:

object ppReport1: TppReport
AutoStop = False
DataPipeline = daBDEQueryDataView1.Source <---------
NoDataBehaviors = [ndMessageDialog, ndBlankReport]
PassSetting = psTwoPass
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.Orientation = poLandscape
PrinterSetup.PaperName = 'A4'
..
..
object ppDBRichText2: TppDBRichText
UserName = 'DBRichText2'
KeepTogether = True
DataField = 'REMARK'
DataPipeline = daBDEQueryDataView1.Source <--------
Stretch = True
DataPipelineName = 'Source'
mmHeight = 4233
mmLeft = 233628
mmTop = 794
mmWidth = 50800
BandType = 4
mmBottomOffset = 0
mmOverFlowOffset = 0
mmStopPosition = 0
end
...
..
..


It looks in such a way, as if in templates is defined that a BDE - a
Dataview should to be used
How can I use reports under dbExpress, which were created with BDE?


Old configuration:
Delphi 5.0 (Build 6.18)
ReportBuilder 6.03
Windows 2000


New configuration:
Delphi 7.0 (Build 4.453)
ReportBuilder 7.02
Windows 2000



Thanks

Alex Sarwas

Comments

  • edited May 2003
    When you get "Engine configuration not found" this means you have to at
    least restart Delphi. If that doesn't help, then reboot the machine. The BDE
    leaks resources and eventually it goes south and won't run anymore. This is
    why the 3rd party data access components are so popular as BDE alternatives.

    When you get 'Class TdaBDEQueryDataview not found' it means you should add
    daDBBDE back to the uses clause:) This is necessary for the BDE dataviews to
    stream up correctly.

    Reports that were created with the BDE need to have their dataview
    definitions converted to DBExpress. Open daDBExpress.pas and daDBBDE.pas.
    Compare these class names. For example, there are two query dataview
    descendents TdaBDEQueryDataview and TdaSQLQueryDataView. In your report
    template, there is a TdqBDEQueryDataview object streamed down, much like you
    would see in a form's DFM file. For example, you can open a DFM and edit it
    manually, ie. change a class name and then open the form and it will change
    the component to the new class given it can find the class definition in
    Delphi. So, you can do something similar with RB. The goal is to change the
    classes in the dataview from BDE to their DBExpress plugin counterparts.

    This question comes up a lot, so I'm going to build an example of porting a
    BDE template to ADO, and I'm thinking it should have two plugins, one for
    the current plugin classes and then the desired plugin classes, so you can
    register simple plugin classes with the strings as properties to easily move
    from BDE to ADO to DOA and back. It is going to need a table extension
    filter to trim the BDE. db extensions. I'll assume table and field names are
    going to be the same though.

    If you want to try it, essentially, you need to load the report template at
    runtime into a stringlist to edit the strings. You won't want to load it in
    to a report object. Now you can change the dataview class name, the database
    name and then save it back down to file. Then you can load it into a report
    object with the new uses clause that doesn't have daDBBDE but rather has
    daDBExpress in its uses clause. Here is an example that lets you load a
    binary template as ascii text so you can edit it and save it back down in
    binary format:
    http://www.digital-metaphors.com/tips/ConvertBinaryTemplateToASCII.zip

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.