Hi
Using RB 7.04
When we start the query wizard i get an index out of bounds(1) error:
code:
NewRep: TppReportWizardClass;
DsgnrW := TppDesignerWindow(mod_rep.dsg_repo.Form); // dsg_repo:
TppDesigner;
DsgnrW.NewReport;
DsgnrW.ShowModal;
The rb_table table is filled
Comments
Some more info
The strange thing is that if i comment the call to the code with the second
session, the error is gone.
No clue where to search.
Eric
- Are you running a standard EndUser solution like those in the
RBuilder\Demos\EndUser and RBuilder\Demos\EndUserDatabases?
- The Designer.DataSettings.Database should reference the database
connection object used for the reporting data. The rb_item, rb_folder tables
can reside in a different database, in which case you should connect the
tblItem and tblFolder dataset objects to a different connection.
- The Query tools can only work with a single database at a time - the one
reference by Designer.DataSettings.Database.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
No
It does. What kind of propertyeditor does RB use? When will i see a database
in the drop down?
Ok, but we are using 1 database.
If i put a showmessage in the afteropen of the rb_table, rb_fields and
rb_joins datasets i get the correct nr of records so the tables to be used
are filled.
What causes the "Index out of bounds", if i know when this error is raised i
perhaps have a clue to search for
Eric
debugger to break on exceptions. Then run your project and examine the call
stack when the error occurs.
- List index out of bounds is a generic Delphi run-time error that can occur
when code tried to access an item in a list (StringList, TList, array, etc)
for which the index does not exist. For example if the list is empty or if
there are 3 items (0, 1, 2) and the code tries to use an index value of 3.
- Database property editor uses the DADE plug-in information. The
SessionType will be used to specify which DADE plug-in to use. Then the DADE
plug-in tells the property editor which class of object to look for. For
example ADOSesison is the ADO plug-in and it will tell the property error to
build a list of objects of type ADOConnection.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I need to compile RB with debug, what is the easiest way to do this?
Eric
What is the designer doing with the database?
Eric
We noticed the following:
When we start the designer without the thread , it works fine.
The query wizard uis showing the tables.
When we close the designer, free the datamodule on which the designer
resides, go to sql and delete all records in rb_table,
start up the designer by creating the datamodule , the query wizard still
shows the records in rb_table.
Strange while we deleted all records.
Can you explain this?
Eric
We noticed the following:
- if we do not use the second session before we started the designer the
designer works fine.
- when we use the second session after we have openend the designer once, it
keeps working.
We have the feeling that things are cached somewhere in RB.
Eric
Even when calling dictionary.reset on datamodule create , the query wizard
shows the tables even when rb_table is deleted in between.
a Showmessage of the recordcount in the after open of the dataset reading
rb_table shows 0 record.
Eric
Tech Tip: Clearing the Meta Data Cache
----------------------------------------
There is a global meta data cache that the ReportBuilder uses to cache
information about the available database tables and fields. You can clear
the meta data cache using the following code.
uses
daMetaDataManager;
begin
gMetaDataManager.Clear;
end;
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
The nativedb caused the index out of bounds in their code:
procedure TdaNDBSession.GetDatabaseNames(aList: TStrings);
.
.
for liIndex := 0 to aList.Count - 1 do
aList[liIndex] := NDBAliasList[liIndex];
.
end;
Alist has 2 records, NDBAliasList just one!
Bij creating our second session at runtime and free-ing when not needed
anymore we have a temperary fix.
Will will notify NativeDB on what we have found.
Thanks fro the support.
Eric
Glad to hear you solved it!
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com