Home General

Report showing only 1 record, where dataset contains 6 records

edited April 2011 in General
Hi,

I am a complete newbie at this.
I am using Delphi XE calling a report via runtime procedure:
Using RB 12.04

rbReportViewer.Template.DatabaseSettings.Name := ''Default Shelf
Ticket';
rbReportViewer.Template.LoadFromDatabase;
ParamList := TppParameterList.Create(nil);
ParamList.Add('INID_BTCH_MNT',dtInteger,1);
ParamList.Add('SUBDEPTLEVEL',dtInteger,3);
ParamList.Add('BUSINESSUNITID',dtInteger,1);
ParamList.Add('FL_INITIAL',dtString,'N');
ParamList.Add('INID_LB_FRMT_ITM',dtInteger,1);
ParamList.Add('INID_FLT',dtInteger,1);
rbReportViewer.Parameters.AssignValues(ParamList);
FreeAndNil(ParamList);
rbReportViewer.Print;

using these same parameters in sql I get 6 records.
However report is showing only 1 record what could be wrong?
We need to get this working urgently.

There is also a problem with setting datatype of parameter to dtLargeInt.
After doing this it is no longer possible to set a value for the parameter.

Kind Regards,

Robert.

Report in database is:

object rbReport: TppReport
Columns = 2
ColumnPositions.Strings = (
'3970'
'109538')
PageLimit = 100000
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'ppReport1'
PrinterSetup.PaperName = 'Letter'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.SaveDeviceSettings = False
PrinterSetup.mmMarginBottom = 11938
PrinterSetup.mmMarginLeft = 3970
PrinterSetup.mmMarginRight = 3970
PrinterSetup.mmMarginTop = 11938
PrinterSetup.mmPaperHeight = 279401
PrinterSetup.mmPaperWidth = 215900
PrinterSetup.PaperSize = 1
SaveAsTemplate = True
Template.DatabaseSettings.DataPipeline = ppItemUpdate
Template.DatabaseSettings.Name = 'Default Shelf Ticket'
Template.DatabaseSettings.NameField = 'NM_RS'
Template.DatabaseSettings.TemplateField = 'NA_RPT'
Template.SaveTo = stDatabase
Template.Format = ftASCII
DeviceType = 'Screen'
EmailSettings.ReportFormat = 'PDF'
LanguageID = 'Default'
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = False
OutlineSettings.Visible = False
PDFSettings.EmbedFontOptions = [efUseSubset]
PDFSettings.EncryptSettings.AllowCopy = True
PDFSettings.EncryptSettings.AllowInteract = True
PDFSettings.EncryptSettings.AllowModify = True
PDFSettings.EncryptSettings.AllowPrint = True
PDFSettings.EncryptSettings.Enabled = False
PDFSettings.FontEncoding = feAnsi
RTFSettings.DefaultFont.Charset = DEFAULT_CHARSET
RTFSettings.DefaultFont.Color = clWindowText
RTFSettings.DefaultFont.Height = -13
RTFSettings.DefaultFont.Name = 'Arial'
RTFSettings.DefaultFont.Style = []
TextSearchSettings.DefaultString = ''
TextSearchSettings.Enabled = False
Left = 440
Top = 120
Version = '12.04'
mmColumnWidth = 101600
object ppReport1ColumnHeaderBand1: TppColumnHeaderBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object ppReport1DetailBand1: TppDetailBand
Background1.Brush.Style = bsClear
Background1.Gradient.EndColor = clWhite
Background1.Gradient.StartColor = clWhite
Background1.Gradient.Style = gsNone
Background2.Brush.Style = bsClear
Background2.Gradient.EndColor = clWhite
Background2.Gradient.StartColor = clWhite
Background2.Gradient.Style = gsNone
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 25375
mmPrintPosition = 0
object ppReport1Shape1: TppShape
UserName = 'ppReport1Shape1'
Gradient.EndColor = clWhite
Gradient.StartColor = clWhite
Gradient.Style = gsNone
mmHeight = 25375
mmLeft = 0
mmTop = 0
mmWidth = 101336
BandType = 4
end
object ppDBBarCode1: TppDBBarCode
UserName = 'DBBarCode1'
AlignBarCode = ahLeft
BarCodeType = bcMSI
BarColor = clBlack
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
DataField = 'PLU'
DataPipeline = daV2QueryDataView1.Labels_For_a_Store
ParentDataPipeline = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Courier New'
Font.Size = 8
Font.Style = []
Transparent = True
DataPipelineName = 'Labels_For_a_Store'
mmHeight = 14817
mmLeft = 53446
mmTop = 2381
mmWidth = 45508
BandType = 4
mmBarWidth = 254
mmWideBarRatio = 76200
end
object ppDBText1: TppDBText
UserName = 'DBText1'
HyperlinkColor = clBlue
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
DataField = 'RETAILPRICE'
DataPipeline = daV2QueryDataView1.Labels_For_a_Store
DisplayFormat = '$#,0.00;-$#,0.00'
Ellipsis = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'Labels_For_a_Store'
mmHeight = 4763
mmLeft = 3704
mmTop = 17992
mmWidth = 32808
BandType = 4
end
object ppDBText2: TppDBText
UserName = 'DBText2'
CharWrap = True
HyperlinkColor = clBlue
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
DataField = 'ITEMDESCRIPTION'
DataPipeline = daV2QueryDataView1.Labels_For_a_Store
Ellipsis = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
ParentDataPipeline = False
Transparent = True
WordWrap = True
DataPipelineName = 'Labels_For_a_Store'
mmHeight = 14817
mmLeft = 3704
mmTop = 2381
mmWidth = 49213
BandType = 4
end
end
object ppReport1ColumnFooterBand1: TppColumnFooterBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object daDataModule1: TdaDataModule
object daV2QueryDataView1: TdaV2QueryDataView
UserName = 'Query_Labels_For_a_Store'
Height = 320
Left = 10
NameColumnWidth = 149
SizeColumnWidth = 70
SortMode = 0
Top = 10
TypeColumnWidth = 76
Width = 857
AutoSearchTabOrder = 0
object Labels_For_a_Store: TppChildDBPipeline
AutoCreateFields = False
UserName = 'Labels_For_a_Store'
object ppField1: TppField
FieldAlias = 'PLU'
FieldName = 'PLU'
FieldLength = 80
DisplayWidth = 80
Position = 0
end
object ppField2: TppField
FieldAlias = 'RETAILPRICE'
FieldName = 'RETAILPRICE'
FieldLength = 0
DataType = dtDouble
DisplayWidth = 10
Position = 1
end
object ppField3: TppField
FieldAlias = 'FL_TAX'
FieldName = 'FL_TAX'
FieldLength = 1
DisplayWidth = 1
Position = 2
end
object ppField4: TppField
FieldAlias = 'SUBDEPARTMENTID'
FieldName = 'SUBDEPARTMENTID'
FieldLength = 0
DataType = dtInteger
DisplayWidth = 10
Position = 3
end
object ppField5: TppField
FieldAlias = 'DEPARTMENTID'
FieldName = 'DEPARTMENTID'
FieldLength = 0
DataType = dtInteger
DisplayWidth = 10
Position = 4
end
object ppField6: TppField
FieldAlias = 'ITEMDESCRIPTION'
FieldName = 'ITEMDESCRIPTION'
FieldLength = 50
DisplayWidth = 50
Position = 5
end
object ppField7: TppField
FieldAlias = 'QU_UOM'
FieldName = 'QU_UOM'
FieldLength = 0
DataType = dtDouble
DisplayWidth = 10
Position = 6
end
object ppField8: TppField
FieldAlias = 'TY_UOM'
FieldName = 'TY_UOM'
FieldLength = 0
DataType = dtInteger
DisplayWidth = 10
Position = 7
end
object ppField9: TppField
FieldAlias = 'FL_WD'
FieldName = 'FL_WD'
FieldLength = 1
DisplayWidth = 1
Position = 8
end
end
object daSQL1: TdaSQL
DatabaseName = 'conDB'
DatabaseType = dtFirebird
DataPipelineName = 'Labels_For_a_Store'
EditSQLAsText = True
LinkColor = clMaroon
LinkType = ltParameterizedSQL
MaxSQLFieldAliasLength = 0
SQLText.Strings = (
'SELECT SUBSTR( M.PLU, 2, 14 ) AS PLU'
', M.RETAILPRICE'
', M.FL_TAX'
', M.SUBDEPARTMENTID'
', M.DEPARTMENTID'
', M.ITEMDESCRIPTION'
', M.QU_UOM'
', M.TY_UOM'
', M.FL_WD'
'FROM PROC_CRT_ITM_MA( :INID_BTCH_MNT, :SUBDEPTLEVEL'
' ,:BUSINESSUNITID, :FL_INITIAL'
' ,:INID_LB_FRMT_ITM, :INID_FLT ) M')
SQLType = sqSQL2
object daField1: TdaField
Alias = 'PLU'
DisplayWidth = 80
FieldAlias = 'PLU'
FieldLength = 80
FieldName = 'PLU'
SQLFieldName = 'PLU'
end
object daField2: TdaField
Alias = 'RETAILPRICE'
DataType = dtDouble
DisplayWidth = 10
FieldAlias = 'RETAILPRICE'
FieldLength = 0
FieldName = 'RETAILPRICE'
SQLFieldName = 'RETAILPRICE'
end
object daField3: TdaField
Alias = 'FL_TAX'
DisplayWidth = 1
FieldAlias = 'FL_TAX'
FieldLength = 1
FieldName = 'FL_TAX'
SQLFieldName = 'FL_TAX'
end
object daField4: TdaField
Alias = 'SUBDEPARTMENTID'
DataType = dtInteger
DisplayWidth = 10
FieldAlias = 'SUBDEPARTMENTID'
FieldLength = 0
FieldName = 'SUBDEPARTMENTID'
SQLFieldName = 'SUBDEPARTMENTID'
end
object daField5: TdaField
Alias = 'DEPARTMENTID'
DataType = dtInteger
DisplayWidth = 10
FieldAlias = 'DEPARTMENTID'
FieldLength = 0
FieldName = 'DEPARTMENTID'
SQLFieldName = 'DEPARTMENTID'
end
object daField6: TdaField
Alias = 'ITEMDESCRIPTION'
DisplayWidth = 50
FieldAlias = 'ITEMDESCRIPTION'
FieldLength = 50
FieldName = 'ITEMDESCRIPTION'
SQLFieldName = 'ITEMDESCRIPTION'
end
object daField7: TdaField
Alias = 'QU_UOM'
DataType = dtDouble
DisplayWidth = 10
FieldAlias = 'QU_UOM'
FieldLength = 0
FieldName = 'QU_UOM'
SQLFieldName = 'QU_UOM'
end
object daField8: TdaField
Alias = 'TY_UOM'
DataType = dtInteger
DisplayWidth = 10
FieldAlias = 'TY_UOM'
FieldLength = 0
FieldName = 'TY_UOM'
SQLFieldName = 'TY_UOM'
end
object daField9: TdaField
Alias = 'FL_WD'
DisplayWidth = 1
FieldAlias = 'FL_WD'
FieldLength = 1
FieldName = 'FL_WD'
SQLFieldName = 'FL_WD'
end
end
end
end
object ppParameterList3: TppParameterList
object ppParameter2: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = '3'
DataType = dtInteger
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 3
UserName = 'SUBDEPTLEVEL'
end
object ppParameter3: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = '5'
DataType = dtInteger
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 5
UserName = 'BUSINESSUNITID'
end
object ppParameter4: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = 'N'
DataType = dtString
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 'N'
UserName = 'FL_INITIAL'
end
object ppParameter5: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = '1'
DataType = dtInteger
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 1
UserName = 'INID_LB_FRMT_ITM'
end
object ppParameter6: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = '1'
DataType = dtInteger
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 1
UserName = 'INID_FLT'
end
object ppParameter1: TppParameter
AutoSearchSettings.LogicalPrefix = []
AutoSearchSettings.Mandatory = True
AutoSearchSettings.SearchExpression = '213592'
DataType = dtInteger
LookupSettings.DisplayType = dtNameOnly
LookupSettings.SortOrder = soName
Value = 213592
UserName = 'INID_BTCH_MNT'
end
end
end

Comments

  • edited April 2011
    Hi Robert,

    It does not look like your report is connected to any data. Do this by
    setting the DataPipeline property of the report or using the Report |
    Data option in the main menu of the designer.

    I highly suggest spending some time with the Developer's Guide and
    included tutorials before continuing with ReportBuilder.


    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2011
    Welcome to RB. :)

    Here is a list of resources for getting started...

    http://www.digital-metaphors.com:8080/General/Getting_Started/Resources_for_Learning_RB

    You can set parameter values using the following syntax..

    myReport.Parameters['ParamName'].Value := 1;

    There is now an RB 12.04 patch for available to fix the dtLargeInt issue.
    Registered RB 12.04 users can email support@ and request the patch.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Thank you Nico.
    That was it I did not know that the report itself had to be connected to a
    datapipeline.
    I remember I made this error with quickreports about 15 years ago :->

    Always miss the obvious stuff.

    Kind Regards,

    Robert.


  • edited April 2011
    Sent an email off to support.

    Kind Regards,

    Robert.

This discussion has been closed.