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

end-user report explorer issue

edited July 2005 in General
I have successfully opened and modified the demo in "RBuilder\Demos\3.
EndUser\1. Report Explorer" to use a Sybase database. (I've already applied
the "RBuilder\Demos\4. EndUser Databases\Sybase ASA
6\CreateEndUserTables.sql" script.) For each TTable on the form, I have
changed the DatabaseName property to "MyDatabase" and set the Active
property to false. When I run the project, I get a database login prompt,
then everything behaves as expected.

The trouble arises when I copy this same code to my own project. When I
launch the form, the connection to "MyDatabase" has already been
established, so I don't receive the database login prompt. If I create a
new folder named "Test" beneath "All Folders", and then click "All Folders"
(to refresh), the folder "Test" does NOT show up on the right side of the
explorer (contents window). New reports exhibit the same behavior. When I
close the explorer and reopen, the folder I had named "Test" is now "New
Folder".

Any ideas what is happening here? Thanks.

Comments

  • edited July 2005
    Hi Tyler,

    Which version of ReportBuilder/Delphi are you currently using?

    The ReportExplorer uses the Folders and Items tables to keep track of them
    in the explorer window. Be sure you successfully executed the
    CreateEndUserTables.sql with your separate database and that all triggers
    were added as well. Also be sure you have access to these tables in your
    app.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Version of Delphi: (Enterprise) 6.240
    Version of ReportBuilder: (Professional Edition) 6.03

    I have succesfully 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 = {
    0000010001002020100000000000E80200001600000028000000200000004000
    0000010004000000000080020000000000000000000000000000000000000000
    0000000080000080000000808000800000008000800080800000C0C0C0008080
    80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000884000000000000
    000083BBBBB34003BBBBB800000000000004BBBBBBBB308BBBBBBB0000000000
    00003BBBBBB3403BBBBBB3000000000000000BBBBBB404BBBBBB300000000000
    000003BBBBB008BBBBBB800000000000000003BBBBB003BBBBBB000000000000
    000003BBBBB48BBBBBB3000000000000000003BBBBBBBBBBBB30000000000000
    000003BBBBBBBBBBB800000000000000000003BBBBB33BBBBB80000000000000
    000003BBBBB003BBBBB4000000000000000003BBBBB003BBBBB8000000000000
    000003BBBBB003BBBBB300000000000000000BBBBBB84BBBBBB8000000000000
    00043BBBBBBBBBBBBBB00000000000000004BBBBBBBBBBBBB340000000000000
    0000433888883338400000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    000000000000000000000000000000000000000000000000000000000000FFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFF00
    603FFE00403FFF00403FFF80807FFF81807FFF8180FFFF8000FFFF8001FFFF80
    03FFFF8001FFFF8180FFFF8180FFFF8180FFFF8000FFFE0001FFFE0001FFFF00
    07FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
    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;
    -------------------------------------------------



This discussion has been closed.