Report crashes at run time
I have a report that prints data about a job. A job can have several
classifications and sub jobs.
I create a group on the field pipeline.JobNumber and then I place all
DBTexts for job data in that group.Job Number header.
In the detail section I place the DBTexts for the classification data. In
the group.JobNumber footer I placed a subreport for the subjobs. I use two
queries, the first for job/classification data and the second for sub job
data. The report works great in the report designer. The issue arises at run
time. An "EDatabaseError" occurs stating "qrySubJobs: Field 'SJName' not
found. The field is found while in the designer mode.
Thanks
Tom Le Page
classifications and sub jobs.
I create a group on the field pipeline.JobNumber and then I place all
DBTexts for job data in that group.Job Number header.
In the detail section I place the DBTexts for the classification data. In
the group.JobNumber footer I placed a subreport for the subjobs. I use two
queries, the first for job/classification data and the second for sub job
data. The report works great in the report designer. The issue arises at run
time. An "EDatabaseError" occurs stating "qrySubJobs: Field 'SJName' not
found. The field is found while in the designer mode.
Thanks
Tom Le Page
This discussion has been closed.
Comments
Several things to look at:
1) What version of RB are you using?
2) How are you acessing your data? DADE? or is it via a TDataModule
3) Finally, export your report to an ASCII file and look at the field in
question. Check that the settings are correct.
HTH,
Ed Dressel
Team DM
2) We access the data via a TMMQuery component derived from TDataSet of our
own design (as MySQL components were not very good when we started used
MySQL) which has worked very well for us.
3) I'm not sure how or what to export. Could you explain more.
Also to add to the original post the presence of classifications and sub
jobs may or may not be present.
ppReport1.Template.Format := ftAscii; // or something like that
ppReport1.Template.FileName := 'C:\FileName.Txt';
ppReport1.Template.SaveToFile;
Then you can open up the file in a text editor and look at the definition
for the label.
Ed Dressel
Team DM
Here is the DBText that is the problem. It looks good to me, but that could
be part of the problem!
I can send you the whole file 7K if you like vs the group.
object ppDBText3: TppDBText
UserName = 'DBText3'
DataField = 'SJName'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 10
Font.Style = []
Transparent = True
DataPipelineName = 'plSubJobs'
mmHeight = 3969
mmLeft = 12700
mmTop = 1852
mmWidth = 17198
BandType = 4
end
It looks as if the pipeline2 is not opening it's query as the subreport will
not print if it's set to pipeline2. It will print OK if the pipeline is set
to pipeline1.
What can cause the pipeline to not open the query. The SQL statement is good
as it will run with results in a SQL Manager.
run