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

Invalid Template Format

edited July 2005 in General
Hello

I am having a strange problem with loading a template from my SQL Server
2000 database.

I have defined the template field as text.

Below are the contents of the template for my "league" report

For some reason when I call load from database on this I get an Invalid
Template Format error.

Does anyone else?

object ppReport1: TppReport
AutoStop = False
DataPipeline = pipeHeaderData
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297128
PrinterSetup.mmPaperWidth = 210080
PrinterSetup.PaperSize = 9
Template.DatabaseSettings.DataPipeline = pipeVolumeReports
Template.DatabaseSettings.Name = 'League'
Template.DatabaseSettings.NameField = 'Name'
Template.DatabaseSettings.TemplateField = 'Template'
Template.FileName =
'C:\Source\New MultiDB STC Report Control\ReportBuilderReports\Te' +
'mplates\Another.rtm'
Template.Format = ftASCII
Units = utScreenPixels
AllowPrintToArchive = True
AllowPrintToFile = True
DeviceType = 'Excel Document'
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
OutlineSettings.Visible = True
ShowCancelDialog = False
ShowPrintDialog = False
TextFileName = 'c:\temp\test.xls'
TextSearchSettings.DefaultString = ''
TextSearchSettings.Enabled = False
Left = 131
Top = 213
Version = '9.02'
mmColumnWidth = 0
DataPipelineName = 'pipeHeaderData'
object ppHeaderBand1: TppHeaderBand
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 36513
mmPrintPosition = 0
object ppLabel1: TppLabel
UserName = 'Label1'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'League Report By Total Consumption'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 12
Font.Style = [fsBold]
Transparent = True
mmHeight = 5027
mmLeft = 40746
mmTop = 12171
mmWidth = 88106
BandType = 0
end
object ppShape8: TppShape
UserName = 'Shape2'
Brush.Color = 8454143
mmHeight = 17463
mmLeft = 127794
mmTop = 7673
mmWidth = 67733
BandType = 0
end
object ppLabel60: TppLabel
UserName = 'Label60'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Report Period'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 20638
mmWidth = 21960
BandType = 0
end
object ppLabel63: TppLabel
UserName = 'Label63'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 20638
mmWidth = 3969
BandType = 0
end
object ppLabel35: TppLabel
UserName = 'Label35'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 10054
mmWidth = 3969
BandType = 0
end
object ppLabel36: TppLabel
UserName = 'Label36'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 15346
mmWidth = 3969
BandType = 0
end
object ppLabel55: TppLabel
UserName = 'Label55'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Ranked By'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 15346
mmWidth = 16933
BandType = 0
end
object ppLabel56: TppLabel
UserName = 'Label56'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Location Selection'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 10054
mmWidth = 33338
BandType = 0
end
object ppShape1: TppShape
UserName = 'Shape1'
mmHeight = 5821
mmLeft = 5027
mmTop = 30163
mmWidth = 191030
BandType = 0
end
object ppLabel5: TppLabel
UserName = 'Label5'
AutoSize = False
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'RankedBy'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
Transparent = True
mmHeight = 4763
mmLeft = 64294
mmTop = 19844
mmWidth = 20108
BandType = 0
end
object ppDBText4: TppDBText
UserName = 'DBText4'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'RankedBy'
DataPipeline = pipeHeaderData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'pipeHeaderData'
mmHeight = 4763
mmLeft = 85461
mmTop = 19844
mmWidth = 32808
BandType = 0
end
object ppDBText1: TppDBText
UserName = 'DBText1'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'RankedBy'
DataPipeline = pipeHeaderData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
Transparent = True
DataPipelineName = 'pipeHeaderData'
mmHeight = 4233
mmLeft = 154252
mmTop = 14817
mmWidth = 32808
BandType = 0
end
end
object ppDetailBand1: TppDetailBand
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 5027
mmPrintPosition = 0
object subReportData: TppSubReport
UserName = 'subReportData'
ExpandAll = False
NewPrintJob = False
OutlineSettings.CreateNode = True
TraverseAllData = False
DataPipelineName = 'pipeReportData'
mmHeight = 5027
mmLeft = 0
mmTop = 0
mmWidth = 197380
BandType = 4
mmBottomOffset = 0
mmOverFlowOffset = 0
mmStopPosition = 0
object ppChildReport1: TppChildReport
AutoStop = False
DataPipeline = pipeReportData
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297128
PrinterSetup.mmPaperWidth = 210080
PrinterSetup.PaperSize = 9
Template.DatabaseSettings.DataPipeline = pipeVolumeReports
Template.DatabaseSettings.NameField = 'Name'
Template.DatabaseSettings.TemplateField = 'Template'
Template.SaveTo = stDatabase
Units = utScreenPixels
Version = '9.02'
mmColumnWidth = 0
DataPipelineName = 'pipeReportData'
object ppTitleBand1: TppTitleBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object ppDetailBand2: TppDetailBand
mmBottomOffset = 0
mmHeight = 4498
mmPrintPosition = 0
object ppShape2: TppShape
UserName = 'Shape1'
Brush.Style = bsClear
mmHeight = 4498
mmLeft = 5027
mmTop = 0
mmWidth = 191030
BandType = 4
end
object ppDBText2: TppDBText
UserName = 'DBText2'
AutoSize = True
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'LocationName'
DataPipeline = pipeReportData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
Transparent = True
DataPipelineName = 'pipeReportData'
mmHeight = 4233
mmLeft = 9790
mmTop = 265
mmWidth = 25019
BandType = 4
end
object ppDBText3: TppDBText
UserName = 'DBText3'
BlankWhenZero = True
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'Consumption'
DataPipeline = pipeReportData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
DataPipelineName = 'pipeReportData'
mmHeight = 4233
mmLeft = 158750
mmTop = 0
mmWidth = 32808
BandType = 4
end
end
object ppSummaryBand1: TppSummaryBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object raCodeModule1: TraCodeModule
ProgramStream = {00}
end
end
end
end
object ppFooterBand1: TppFooterBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object raCodeModule2: TraCodeModule
ProgramStream = {00}
end
object ppParameterList1: TppParameterList
end
end

My form file is

object Form1: TForm1
Left = 248
Top = 322
Width = 870
Height = 640
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object ppReport1: TppReport
AutoStop = False
DataPipeline = pipeHeaderData
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297128
PrinterSetup.mmPaperWidth = 210080
PrinterSetup.PaperSize = 9
Template.DatabaseSettings.DataPipeline = pipeVolumeReports
Template.DatabaseSettings.Name = 'League'
Template.DatabaseSettings.NameField = 'Name'
Template.DatabaseSettings.TemplateField = 'Template'
Template.FileName =
'C:\Source\New MultiDB STC Report Control\ReportBuilderReports\Te' +
'mplates\Another.rtm'
Template.SaveTo = stDatabase
Units = utScreenPixels
AllowPrintToArchive = True
AllowPrintToFile = True
DeviceType = 'Excel Document'
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
OutlineSettings.Visible = True
ShowCancelDialog = False
ShowPrintDialog = False
TextFileName = 'c:\temp\test.xls'
TextSearchSettings.DefaultString = ''
TextSearchSettings.Enabled = False
Left = 131
Top = 213
Version = '9.02'
mmColumnWidth = 0
DataPipelineName = 'pipeHeaderData'
object ppHeaderBand1: TppHeaderBand
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 36513
mmPrintPosition = 0
object ppLabel1: TppLabel
UserName = 'Label1'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'League Report By Total Consumption'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 12
Font.Style = [fsBold]
Transparent = True
mmHeight = 5027
mmLeft = 40746
mmTop = 12171
mmWidth = 88106
BandType = 0
end
object ppShape8: TppShape
UserName = 'Shape2'
Brush.Color = 8454143
mmHeight = 17463
mmLeft = 127794
mmTop = 7673
mmWidth = 67733
BandType = 0
end
object ppLabel60: TppLabel
UserName = 'Label60'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Report Period'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 20638
mmWidth = 21960
BandType = 0
end
object ppLabel63: TppLabel
UserName = 'Label63'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 20638
mmWidth = 3969
BandType = 0
end
object ppLabel35: TppLabel
UserName = 'Label35'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 10054
mmWidth = 3969
BandType = 0
end
object ppLabel36: TppLabel
UserName = 'Label36'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = ':'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
TextAlignment = taRightJustified
Transparent = True
mmHeight = 3440
mmLeft = 149490
mmTop = 15346
mmWidth = 3969
BandType = 0
end
object ppLabel55: TppLabel
UserName = 'Label55'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Ranked By'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 15346
mmWidth = 16933
BandType = 0
end
object ppLabel56: TppLabel
UserName = 'Label56'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'Location Selection'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Verdana'
Font.Size = 8
Font.Style = [fsBold]
Transparent = True
mmHeight = 3440
mmLeft = 129646
mmTop = 10054
mmWidth = 33338
BandType = 0
end
object ppShape1: TppShape
UserName = 'Shape1'
mmHeight = 5821
mmLeft = 5027
mmTop = 30163
mmWidth = 191030
BandType = 0
end
object ppLabel5: TppLabel
UserName = 'Label5'
AutoSize = False
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
Caption = 'RankedBy'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
Transparent = True
mmHeight = 4763
mmLeft = 64294
mmTop = 19844
mmWidth = 20108
BandType = 0
end
object ppDBText4: TppDBText
UserName = 'DBText4'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'RankedBy'
DataPipeline = pipeHeaderData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
ParentDataPipeline = False
Transparent = True
DataPipelineName = 'pipeHeaderData'
mmHeight = 4763
mmLeft = 85461
mmTop = 19844
mmWidth = 32808
BandType = 0
end
object ppDBText1: TppDBText
UserName = 'DBText1'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'RankedBy'
DataPipeline = pipeHeaderData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
Transparent = True
DataPipelineName = 'pipeHeaderData'
mmHeight = 4233
mmLeft = 154252
mmTop = 14817
mmWidth = 32808
BandType = 0
end
end
object ppDetailBand1: TppDetailBand
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 5027
mmPrintPosition = 0
object subReportData: TppSubReport
UserName = 'subReportData'
ExpandAll = False
NewPrintJob = False
OutlineSettings.CreateNode = True
TraverseAllData = False
DataPipelineName = 'pipeReportData'
mmHeight = 5027
mmLeft = 0
mmTop = 0
mmWidth = 197380
BandType = 4
mmBottomOffset = 0
mmOverFlowOffset = 0
mmStopPosition = 0
object ppChildReport1: TppChildReport
AutoStop = False
DataPipeline = pipeReportData
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297128
PrinterSetup.mmPaperWidth = 210080
PrinterSetup.PaperSize = 9
Template.DatabaseSettings.DataPipeline = pipeVolumeReports
Template.DatabaseSettings.NameField = 'Name'
Template.DatabaseSettings.TemplateField = 'Template'
Template.SaveTo = stDatabase
Units = utScreenPixels
Version = '9.02'
mmColumnWidth = 0
DataPipelineName = 'pipeReportData'
object ppTitleBand1: TppTitleBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object ppDetailBand2: TppDetailBand
mmBottomOffset = 0
mmHeight = 4498
mmPrintPosition = 0
object ppShape2: TppShape
UserName = 'Shape1'
Brush.Style = bsClear
mmHeight = 4498
mmLeft = 5027
mmTop = 0
mmWidth = 191030
BandType = 4
end
object ppDBText2: TppDBText
UserName = 'DBText2'
AutoSize = True
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'LocationName'
DataPipeline = pipeReportData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
Transparent = True
DataPipelineName = 'pipeReportData'
mmHeight = 4233
mmLeft = 9790
mmTop = 265
mmWidth = 25019
BandType = 4
end
object ppDBText3: TppDBText
UserName = 'DBText3'
BlankWhenZero = True
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1
DataField = 'Consumption'
DataPipeline = pipeReportData
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Name = 'Verdana'
Font.Size = 10
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
DataPipelineName = 'pipeReportData'
mmHeight = 4233
mmLeft = 158750
mmTop = 0
mmWidth = 32808
BandType = 4
end
end
object ppSummaryBand1: TppSummaryBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object raCodeModule1: TraCodeModule
ProgramStream = {00}
end
end
end
end
object ppFooterBand1: TppFooterBand
mmBottomOffset = 0
mmHeight = 0
mmPrintPosition = 0
end
object raCodeModule2: TraCodeModule
ProgramStream = {00}
end
object ppParameterList1: TppParameterList
end
end
object pipeReportData: TppJITPipeline
InitialIndex = 0
RecordCount = 99999999
UserName = 'pipeReportData'
Left = 124
Top = 110
object LocationName: TppField
FieldAlias = 'LocationName'
FieldName = 'LocationName'
FieldLength = 10
DisplayWidth = 10
Position = 0
end
object Consumption: TppField
FieldAlias = 'Consumption'
FieldName = 'Consumption'
FieldLength = 10
DataType = dtDouble
DisplayWidth = 10
Position = 1
end
end
object pipeHeaderData: TppJITPipeline
InitialIndex = 0
RecordCount = 99999999
UserName = 'pipeHeaderData'
Left = 55
Top = 157
object RankedBy: TppField
FieldAlias = 'RankedBy'
FieldName = 'RankedBy'
FieldLength = 10
DisplayWidth = 10
Position = 0
end
object pipeMainDetailsppField1: TppField
FieldAlias = 'LocationSelection'
FieldName = 'LocationName'
FieldLength = 10
DisplayWidth = 10
Position = 1
end
object ReportPeriod: TppField
FieldAlias = 'ReportPeriod'
FieldName = 'ReportPeriod'
FieldLength = 10
DisplayWidth = 10
Position = 2
end
end
object dbConn: TADOConnection
Connected = True
ConnectionString =
'Provider=SQLOLEDB.1;Password=98521018;Persist Security Info=True' +
';User ID=sa;Initial Catalog=dbSTCReports;Data Source=STC-MAINSVR' +
';Use Procedure for Prepare=1;Auto Translate=True;Packet Size=409' +
'6;Use Encryption for Data=False;Tag with column collation when p' +
'ossible=False'
CursorLocation = clUseServer
LoginPrompt = False
Provider = 'SQLOLEDB.1'
Left = 238
Top = 15
end
object tblReportTemplates: TADOTable
Active = True
Connection = dbConn
CursorLocation = clUseServer
TableName = 'tblReportTemplates'
Left = 246
Top = 69
object tblReportTemplatesReportID: TAutoIncField
FieldName = 'ReportID'
ReadOnly = True
end
object tblReportTemplatesName: TWideStringField
FieldName = 'Name'
Size = 50
end
object tblReportTemplatesTemplate: TMemoField
FieldName = 'Template'
BlobType = ftMemo
end
end
object dsReportTemplates: TDataSource
DataSet = tblReportTemplates
Left = 242
Top = 123
end
object pipeVolumeReports: TppDBPipeline
DataSource = dsReportTemplates
UserName = 'pipeVolumeReports'
Left = 237
Top = 183
object pipeVolumeReportsppField1: TppField
Alignment = taRightJustify
FieldAlias = 'ReportID'
FieldName = 'ReportID'
FieldLength = 0
DataType = dtLongint
DisplayWidth = 0
Position = 0
end
object pipeVolumeReportsppField2: TppField
FieldAlias = 'Name'
FieldName = 'Name'
FieldLength = 50
DisplayWidth = 50
Position = 1
end
object pipeVolumeReportsppField3: TppField
FieldAlias = 'Template'
FieldName = 'Template'
FieldLength = 0
DataType = dtMemo
DisplayWidth = 10
Position = 2
Searchable = False
Sortable = False
end
end
end

PAS File is

unit unReports;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ppDB, ppDBJIT, ppParameter, ppBands, ppModule, raCodMod,
ppReport, ppStrtch, ppSubRpt, ppCtrls, ppPrnabl, ppClass, ppCache,
ppComm, ppRelatv, ppProd, ppDBPipe, DB, ADODB;

type
TForm1 = class(TForm)
ppReport1: TppReport;
ppHeaderBand1: TppHeaderBand;
ppLabel1: TppLabel;
ppShape8: TppShape;
ppLabel60: TppLabel;
ppLabel63: TppLabel;
ppLabel35: TppLabel;
ppLabel36: TppLabel;
ppLabel55: TppLabel;
ppLabel56: TppLabel;
ppShape1: TppShape;
ppLabel5: TppLabel;
ppDBText4: TppDBText;
ppDBText1: TppDBText;
ppDetailBand1: TppDetailBand;
subReportData: TppSubReport;
ppChildReport1: TppChildReport;
ppTitleBand1: TppTitleBand;
ppDetailBand2: TppDetailBand;
ppShape2: TppShape;
ppDBText2: TppDBText;
ppDBText3: TppDBText;
ppSummaryBand1: TppSummaryBand;
raCodeModule1: TraCodeModule;
ppFooterBand1: TppFooterBand;
raCodeModule2: TraCodeModule;
ppParameterList1: TppParameterList;
pipeReportData: TppJITPipeline;
LocationName: TppField;
Consumption: TppField;
pipeHeaderData: TppJITPipeline;
RankedBy: TppField;
pipeMainDetailsppField1: TppField;
ReportPeriod: TppField;
dbConn: TADOConnection;
tblReportTemplates: TADOTable;
tblReportTemplatesReportID: TAutoIncField;
tblReportTemplatesName: TWideStringField;
tblReportTemplatesTemplate: TMemoField;
dsReportTemplates: TDataSource;
pipeVolumeReports: TppDBPipeline;
pipeVolumeReportsppField1: TppField;
pipeVolumeReportsppField2: TppField;
pipeVolumeReportsppField3: TppField;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

end.

Comments

  • edited July 2005
    Hi Paul,

    Usually this error is received when ReportBuilder expects a binary template
    but gets an ASCII one or vice versa. The Template field should always be
    defined as a Blob field and saved into binary code. Check to be sure you
    are not trying to load the report as text from the database. Which
    connectivity are you using? Do you only get this error when loading the
    template from database? In my testing with the template posted below, the
    report loaded as expected.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Hello this error seems to have vanished now no idea what I did!

  • edited July 2005
    Hi Paul,

    Fantastic! Out of curiosity, were you using the BDE to connect to your
    database? If so you may want to consider changing this for a future project
    to avoid similar issues.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Hi Nico

    No I am not using BDE would never use BDE out of choice lol

    Am just using SQL Server with ADO

    Cheers

    Paul

This discussion has been closed.