I've built a report with RB7 in Delphi 6 using DBIsam tables. When I run the report only one record is shown. Executing the query in a grid for example results in far more records. I don't know exactly where to look, can somebody help me?
What does the dataview preview grid display for records? Is the WHERE clause correct in your SQL that you posted? Make sure that the Report | Data menu has the proper pipeline selected (the name of the dataview).
Comments
Is the report/sub report connected to the data pipeline? If so, what are the
settings for the data pipeline? (Post the DFM of it here).
Ed Dressel
DX Squad
Here's the content of the DFM you asked for. I hope you
can figure out what the problem is.
object repCatalogus: TppReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 19050
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297000
PrinterSetup.mmPaperWidth = 210000
PrinterSetup.PaperSize = 9
Template.FileName =
'C:\Documents and Settings\arjen\Mijn documenten\Delphi\BASYS DBI' +
'sam\StandaardRapporten\CatalogusBoeken.rtm'
Units = utMillimeters
DeviceType = 'Screen'
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
Left = 40
Top = 200
Version = '7.0'
mmColumnWidth = 0
object ppHeaderBand1: TppHeaderBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
object ppDetailBand1: TppDetailBand
mmBottomOffset = 0
mmHeight = 5027
mmPrintPosition = 0
object ppDBText1: TppDBText
UserName = 'DBText1'
DataField = 'BoekSoort'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 4000
mmLeft = 0
mmTop = 794
mmWidth = 3969
BandType = 4
end
object ppDBText2: TppDBText
UserName = 'DBText2'
DataField = 'BoekCode'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 4000
mmLeft = 4233
mmTop = 794
mmWidth = 10583
BandType = 4
end
object ppDBText4: TppDBText
UserName = 'DBText4'
DataField = 'Achternaam'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 4000
mmLeft = 25400
mmTop = 794
mmWidth = 56621
BandType = 4
end
object ppDBText5: TppDBText
UserName = 'DBText5'
DataField = 'BoekNummer'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = []
ParentDataPipeline = False
TextAlignment = taRightJustified
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 4000
mmLeft = 15081
mmTop = 794
mmWidth = 5292
BandType = 4
end
object ppDBText6: TppDBText
UserName = 'DBText6'
DataField = 'Titel'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 4000
mmLeft = 82550
mmTop = 794
mmWidth = 84402
BandType = 4
end
end
object ppFooterBand1: TppFooterBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
object ppGroup1: TppGroup
BreakName = 'ppDBText1'
BreakType = btCustomField
OutlineSettings.CreateNode = True
NewPage = True
UserName = 'Group1'
mmNewColumnThreshold = 0
mmNewPageThreshold = 0
DataPipelineName = ''
object ppGroupHeaderBand1: TppGroupHeaderBand
mmBottomOffset = 0
mmHeight = 8996
mmPrintPosition = 0
object ppDBText3: TppDBText
UserName = 'DBText3'
DataField = 'Omschrijving'
DataPipeline = daDBISAMQueryDataView2.Boeken
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 10
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Boeken'
mmHeight = 3969
mmLeft = 19050
mmTop = 794
mmWidth = 31221
BandType = 3
GroupNo = 0
end
object ppLabel1: TppLabel
UserName = 'Label1'
Caption = 'Boeksoort:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 10
Font.Style = []
Transparent = True
mmHeight = 4022
mmLeft = 0
mmTop = 794
mmWidth = 16849
BandType = 3
GroupNo = 0
end
object ppLabel2: TppLabel
UserName = 'Label2'
Caption = 'Titel'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = [fsUnderline]
Transparent = True
mmHeight = 3260
mmLeft = 82550
mmTop = 5556
mmWidth = 5376
BandType = 3
GroupNo = 0
end
object ppLabel3: TppLabel
UserName = 'Label3'
Caption = 'Schrijver'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 8
Font.Style = [fsUnderline]
Transparent = True
mmHeight = 3260
mmLeft = 25400
mmTop = 5556
mmWidth = 11007
BandType = 3
GroupNo = 0
end
end
object ppGroupFooterBand1: TppGroupFooterBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
end
object daDataModule1: TdaDataModule
object daDBISAMQueryDataView2: TdaDBISAMQueryDataView
UserName = 'Query_Boeken'
Height = 279
Left = 260
NameColumnWidth = 105
SizeColumnWidth = 35
SortMode = 0
Top = 10
TypeColumnWidth = 52
Width = 200
AutoSearchTabOrder = 0
object Boeken: TppChildDBPipeline
AutoCreateFields = False
UserName = 'Boeken'
object ppField1: TppField
FieldAlias = 'BoekSoort'
FieldName = 'BoekSoort'
FieldLength = 1
IsDetail = True
DisplayWidth = 1
Position = 0
TableName = 'Schrijvers'
end
object ppField2: TppField
FieldAlias = 'BoekCode'
FieldName = 'BoekCode'
FieldLength = 4
IsDetail = True
DisplayWidth = 4
Position = 1
TableName = 'Schrijvers'
end
object ppField3: TppField
FieldAlias = 'BoekNummer'
FieldName = 'BoekNummer'
FieldLength = 0
DataType = dtLongint
DisplayWidth = 10
Position = 2
TableName = 'Boeken'
end
object ppField4: TppField
FieldAlias = 'Voorletters'
FieldName = 'Voorletters'
FieldLength = 20
IsDetail = True
DisplayWidth = 20
Position = 3
TableName = 'Schrijvers'
end
object ppField5: TppField
FieldAlias = 'Tussenvoegsels'
FieldName = 'Tussenvoegsels'
FieldLength = 20
IsDetail = True
DisplayWidth = 20
Position = 4
TableName = 'Schrijvers'
end
object ppField6: TppField
FieldAlias = 'Achternaam'
FieldName = 'Achternaam'
FieldLength = 40
IsDetail = True
DisplayWidth = 40
Position = 5
TableName = 'Schrijvers'
end
object ppField7: TppField
FieldAlias = 'Titel'
FieldName = 'Titel'
FieldLength = 50
DisplayWidth = 50
Position = 6
TableName = 'Boeken'
end
object ppField8: TppField
FieldAlias = 'SubTitel'
FieldName = 'SubTitel'
FieldLength = 50
DisplayWidth = 50
Position = 7
TableName = 'Boeken'
end
object ppField9: TppField
FieldAlias = 'Categorie'
FieldName = 'Categorie'
FieldLength = 2
DisplayWidth = 2
Position = 8
TableName = 'Boeken'
end
object ppField10: TppField
FieldAlias = 'InvoerDatum'
FieldName = 'InvoerDatum'
FieldLength = 0
DataType = dtDate
DisplayWidth = 10
Position = 9
TableName = 'Boeken'
end
object ppField11: TppField
FieldAlias = 'Barcode'
FieldName = 'Barcode'
FieldLength = 15
DisplayWidth = 15
Position = 10
TableName = 'Boeken'
end
object ppField12: TppField
FieldAlias = 'Omschrijving'
FieldName = 'Omschrijving'
FieldLength = 30
IsDetail = True
DisplayWidth = 30
Position = 11
TableName = 'BoekSoorten'
end
end
object daSQL2: TdaSQL
DatabaseName = 'dbBasys'
DatabaseType = dtDBISAM
DataPipelineName = 'Boeken'
LinkColor = clNavy
MaxSQLFieldAliasLength = 25
SQLText.Strings = (
'SELECT Schrijvers.BoekSoort, Schrijvers.BoekCode, '
' Boeken.BoekNummer, Schrijvers.Voorletters, '
' Schrijvers.Tussenvoegsels, '
' Schrijvers.Achternaam, Boeken.Titel, '
' Boeken.SubTitel, Boeken.Categorie, '
' Boeken.InvoerDatum, Boeken.Barcode, '
' BoekSoorten.Omschrijving'
'FROM Boeken Boeken'
' INNER JOIN Schrijvers Schrijvers ON '
' (Schrijvers.BoekSoort = Boeken.BoekSoort)'
' AND (Schrijvers.BoekCode = Boeken.BoekCode)'
' INNER JOIN BoekSoorten BoekSoorten ON '
' (BoekSoorten.BoekSoort = Schrijvers.BoekSoort)'
'WHERE ( BoekSoorten.BoekSoort = '#39'G'#39' )'
'ORDER BY Boeken.Barcode')
SQLType = sqSQL2
object daCriteria1: TdaCriteria
ChildType = 7
Level = 0
Value = 'G'
object TdaField
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
SQLFieldName = 'BoekSoort'
TableAlias = 'BoekSoorten'
TableName = 'BoekSoorten'
TableSQLAlias = 'BoekSoorten'
end
end
object daField1: TdaField
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
IsDetail = True
SQLFieldName = 'BoekSoort'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField2: TdaField
Alias = 'BoekCode'
DisplayWidth = 4
FieldAlias = 'BoekCode'
FieldLength = 4
FieldName = 'BoekCode'
IsDetail = True
SQLFieldName = 'BoekCode'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField3: TdaField
Alias = 'BoekNummer'
DataType = dtLongint
DisplayWidth = 10
FieldAlias = 'BoekNummer'
FieldLength = 0
FieldName = 'BoekNummer'
SQLFieldName = 'BoekNummer'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField4: TdaField
Alias = 'Voorletters'
DisplayWidth = 20
FieldAlias = 'Voorletters'
FieldLength = 20
FieldName = 'Voorletters'
IsDetail = True
SQLFieldName = 'Voorletters'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField5: TdaField
Alias = 'Tussenvoegsels'
DisplayWidth = 20
FieldAlias = 'Tussenvoegsels'
FieldLength = 20
FieldName = 'Tussenvoegsels'
IsDetail = True
SQLFieldName = 'Tussenvoegsels'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField6: TdaField
Alias = 'Achternaam'
DisplayWidth = 40
FieldAlias = 'Achternaam'
FieldLength = 40
FieldName = 'Achternaam'
IsDetail = True
SQLFieldName = 'Achternaam'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField7: TdaField
Alias = 'Titel'
DisplayWidth = 50
FieldAlias = 'Titel'
FieldLength = 50
FieldName = 'Titel'
SQLFieldName = 'Titel'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField8: TdaField
Alias = 'SubTitel'
DisplayWidth = 50
FieldAlias = 'SubTitel'
FieldLength = 50
FieldName = 'SubTitel'
SQLFieldName = 'SubTitel'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField9: TdaField
Alias = 'Categorie'
DisplayWidth = 2
FieldAlias = 'Categorie'
FieldLength = 2
FieldName = 'Categorie'
SQLFieldName = 'Categorie'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField10: TdaField
Alias = 'InvoerDatum'
DataType = dtDate
DisplayWidth = 10
FieldAlias = 'InvoerDatum'
FieldLength = 0
FieldName = 'InvoerDatum'
SQLFieldName = 'InvoerDatum'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField11: TdaField
Alias = 'Barcode'
DisplayWidth = 15
FieldAlias = 'Barcode'
FieldLength = 15
FieldName = 'Barcode'
SQLFieldName = 'Barcode'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daField12: TdaField
Alias = 'Omschrijving'
DisplayWidth = 30
FieldAlias = 'Omschrijving'
FieldLength = 30
FieldName = 'Omschrijving'
IsDetail = True
SQLFieldName = 'Omschrijving'
TableAlias = 'BoekSoorten'
TableName = 'BoekSoorten'
TableSQLAlias = 'BoekSoorten'
end
object daField13: TdaField
ChildType = 2
Alias = 'Barcode'
DisplayWidth = 15
FieldAlias = 'Barcode'
FieldLength = 15
FieldName = 'Barcode'
SQLFieldName = 'Barcode'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
object daTable1: TdaTable
ChildType = 5
Alias = 'Boeken'
JoinType = dajtNone
SQLAlias = 'Boeken'
TableAlias = 'Boeken'
TableName = 'Boeken'
end
object daTable2: TdaTable
ChildType = 5
Alias = 'Schrijvers'
SQLAlias = 'Schrijvers'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
object daTableJoin1: TdaTableJoin
ChildType = 6
object daField15: TdaField
ChildType = 3
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
SQLFieldName = 'BoekSoort'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField14: TdaField
ChildType = 4
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
SQLFieldName = 'BoekSoort'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
end
object daTableJoin2: TdaTableJoin
ChildType = 6
object daField17: TdaField
ChildType = 3
Alias = 'BoekCode'
DisplayWidth = 4
FieldAlias = 'BoekCode'
FieldLength = 4
FieldName = 'BoekCode'
SQLFieldName = 'BoekCode'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
object daField16: TdaField
ChildType = 4
Alias = 'BoekCode'
DisplayWidth = 4
FieldAlias = 'BoekCode'
FieldLength = 4
FieldName = 'BoekCode'
SQLFieldName = 'BoekCode'
TableAlias = 'Boeken'
TableName = 'Boeken'
TableSQLAlias = 'Boeken'
end
end
end
object daTable3: TdaTable
ChildType = 5
Alias = 'BoekSoorten'
SQLAlias = 'BoekSoorten'
TableAlias = 'BoekSoorten'
TableName = 'BoekSoorten'
object daTableJoin3: TdaTableJoin
ChildType = 6
object daField19: TdaField
ChildType = 3
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
SQLFieldName = 'BoekSoort'
TableAlias = 'BoekSoorten'
TableName = 'BoekSoorten'
TableSQLAlias = 'BoekSoorten'
end
object daField18: TdaField
ChildType = 4
Alias = 'BoekSoort'
DisplayWidth = 1
FieldAlias = 'BoekSoort'
FieldLength = 1
FieldName = 'BoekSoort'
SQLFieldName = 'BoekSoort'
TableAlias = 'Schrijvers'
TableName = 'Schrijvers'
TableSQLAlias = 'Schrijvers'
end
end
end
end
end
correct in your SQL that you posted? Make sure that the Report | Data menu
has the proper pipeline selected (the name of the dataview).
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Indeed the report/data menu didn't have the proper pipeline selected.
Now it works fine,
Thanks
Arjen