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

RE: end-user report explorer issue

edited July 2005 in General
Version of Delphi: (Enterprise) 6.240
Version of ReportBuilder: (Professional Edition) 6.03

I have successfully run CreateEndUserTables.sql, but this script doesn't
include any triggers (did you mean indexes?). Remember, the modified demo
code points to this database too and it is working perfectly.

Here is the dfm source code of the datamodule in my project:
-------------------------------------------------
object EndUserReportDM: TEndUserReportDM
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 362
Top = 247
Height = 421
Width = 409
object tblFolder: TTable
DatabaseName = 'dbPosim'
TableName = 'rb_folder'
Left = 11
Top = 11
end
object dsFolder: TDataSource
DataSet = tblFolder
Left = 43
Top = 11
end
object plFolder: TppBDEPipeline
DataSource = dsFolder
UserName = 'plFolder'
Visible = False
Left = 75
Top = 12
end
object ppReportExplorer1: TppReportExplorer
Designer = ppDesigner1
FolderFieldNames.FolderId = 'folder_id'
FolderFieldNames.Name = 'folder_name'
FolderFieldNames.ParentId = 'parent_id'
FolderPipeline = plFolder
ItemFieldNames.Deleted = 'deleted'
ItemFieldNames.FolderId = 'folder_id'
ItemFieldNames.ItemId = 'item_id'
ItemFieldNames.Modified = 'modified'
ItemFieldNames.Name = 'item_name'
ItemFieldNames.Size = 'item_size'
ItemFieldNames.Template = 'template'
ItemFieldNames.ItemType = 'item_type'
ItemPipeline = plItem
FormCaption = 'Report Explorer'
FormIcon.Data = {}
FormPosition = poDesigned
FormHeight = 200
FormLeft = 20
FormTop = 20
FormWidth = 600
Left = 168
Top = 52
end
object ppReport1: TppReport
AutoStop = False
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'Letter'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 279401
PrinterSetup.mmPaperWidth = 215900
PrinterSetup.PaperSize = 1
Template.DatabaseSettings.DataPipeline = plItem
Template.DatabaseSettings.NameField = 'Name'
Template.DatabaseSettings.TemplateField = 'Template'
Template.SaveTo = stDatabase
DeviceType = 'Screen'
Left = 289
Top = 142
Version = '6.03'
mmColumnWidth = 0
object ppHeaderBand1: TppHeaderBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
object ppDetailBand1: TppDetailBand
mmBottomOffset = 0
mmHeight = 28840
mmPrintPosition = 0
end
object ppFooterBand1: TppFooterBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
end
object ppDesigner1: TppDesigner
AllowDataSettingsChange = True
Caption = 'ReportBuilder Pro'
DataSettings.DatabaseName = 'DBDEMOS'
DataSettings.SessionType = 'BDESession'
DataSettings.AllowEditSQL = True
DataSettings.CollationType = ctASCII
DataSettings.DatabaseType = dtParadox
DataSettings.DataDictionary = ppDataDictionary1
DataSettings.IsCaseSensitive = True
DataSettings.SQLType = sqBDELocal
DataSettings.UseDataDictionary = True
Position = poScreenCenter
Report = ppReport1
IniStorageType = 'IniFile'
IniStorageName = '($WINSYS)\RBuilder.ini'
WindowHeight = 400
WindowLeft = 100
WindowTop = 50
WindowWidth = 600
Left = 170
Top = 140
end
object tblItem: TTable
DatabaseName = 'dbPosim'
TableName = 'rb_item'
Left = 15
Top = 93
end
object dsItem: TDataSource
DataSet = tblItem
Left = 46
Top = 94
end
object plItem: TppBDEPipeline
DataSource = dsItem
UserName = 'plItem'
Visible = False
Left = 77
Top = 94
end
object ppDataDictionary1: TppDataDictionary
BuilderSettings.DatabaseName = 'DBDEMOS'
BuilderSettings.SessionType = 'BDESession'
FieldFieldNames.AutoSearch = 'autosearch'
FieldFieldNames.DataType = 'datatype'
FieldFieldNames.FieldName = 'field_name'
FieldFieldNames.FieldAlias = 'field_alias'
FieldFieldNames.Mandatory = 'mandatory'
FieldFieldNames.Searchable = 'searchable'
FieldFieldNames.Selectable = 'selectable'
FieldFieldNames.Sortable = 'sortable'
FieldFieldNames.TableName = 'table_name'
FieldPipeline = plField
JoinFieldNames.TableName1 = 'TableName1'
JoinFieldNames.TableName2 = 'TableName2'
JoinFieldNames.JoinType = 'JoinType'
JoinFieldNames.FieldNames1 = 'FieldNames1'
JoinFieldNames.FieldNames2 = 'FieldNames2'
JoinFieldNames.Operators = 'Operators'
TableFieldNames.TableName = 'table_name'
TableFieldNames.TableAlias = 'table_alias'
TablePipeline = plTable
UserName = 'DataDictionary1'
ValidateFieldNames = False
ValidateTableNames = False
Left = 168
Top = 234
end
object tblTable: TTable
DatabaseName = 'dbPosim'
TableName = 'rb_table'
Left = 73
Top = 324
end
object dsTable: TDataSource
DataSet = tblTable
Left = 105
Top = 324
end
object plTable: TppBDEPipeline
DataSource = dsTable
UserName = 'Table'
Visible = False
Left = 137
Top = 324
end
object tblField: TTable
DatabaseName = 'dbPosim'
TableName = 'rb_field'
Left = 190
Top = 325
end
object dsField: TDataSource
DataSet = tblField
Left = 222
Top = 325
end
object plField: TppBDEPipeline
DataSource = dsField
UserName = 'Field'
Visible = False
Left = 254
Top = 325
end
object dbPosim: TDatabase
AliasName = 'Posim'
DatabaseName = 'dbPosim'
LoginPrompt = False
Params.Strings = (
'USER NAME=dba'
'PASSWORD=*****')
SessionName = 'Default'
Left = 288
Top = 56
end
end
-------------------------------------------------

If I implement this event, that's when things go bad (as described before):
-------------------------------------------------
procedure TEndUserReportDM.DataModuleCreate(Sender: TObject);
begin
tblFolder.DatabaseName:='Posim';
tblItem.DatabaseName:='Posim';
tblTable.DatabaseName:='Posim';
tblField.DatabaseName:='Posim';
end;
-------------------------------------------------



Comments

  • edited July 2005
    Hi Tyler,

    If you assign the database name at design time rather than when the
    datamodule is created, do you still get the same behavior?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Good question and the answer is "Yes". I used the runtime assignment to
    illustrate the seemingly insignificant change.

  • edited July 2005
    Hi Tyler,

    The Dataset is supposed to refresh the server and local datasets when it is
    updated on the fly, but apparently in some cases this does not happen
    automatically. The fact that you are able to load the Explorer and interact
    with it tells me you have everything set up properly. Try setting the
    Pipeline.RefreshAfterPost property to True for the Folders and Items tables.
    This will manually open then close the datasets in order to refresh the
    local data properly.


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project MyProj.exe raised exception class EDBEngineError with message 'Table
    does not support this operation because it is not uniquely indexed.'.
    Process stopped. Use Step or Run to continue.
    ---------------------------
    OK Help
    ---------------------------

    Any other ideas?

  • edited July 2005
    Hi Tyler,

    If you are able to get the demo working correctly then there has to be a
    difference between that and your application. Try deleting all the rb
    tables and re-running the SQL script included with ReportBuilder. Also
    double check that all settings for the pipelines and components are
    identical to the demo.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.