Really confused... Now you see it, now you don't
I have a form with a few TppReports on it.
One is called rptRunTime and one is called rptDesignTime.
I use the rptDesignTime component to format the report at design time. At
runtime I assign the properties (report template etc.) to the rptRunTime
component and it *was* working fine.
Now things are not working. At design time when I double click on the
rptDesignTime component I can see the report as it should be in the design
tab of the IDE. When I choose the preview tab now, the report is blank and
when I switch back to the design tab the fields of the report are blank and
no longer seem to be associated to the field it was assigned to. Nothing
short of closing the Delphi form and reopening it will get the IDE to look
as it should.
I have tried placing a new DataPipeline, TppReport, TDatasource, and
TADOStoredProc on the form and setting the properties the same, and pointing
to the same template filename. This still does not work. All I get is an
entirely blank form.
Also, if I set the "SaveAsTemplate" property to TRUE will it always save the
report formatting, etc. to the physical template on disk?
Can someone help?
--
Reid Roman
Future Generation Software
http://www.fgsoft.com
One is called rptRunTime and one is called rptDesignTime.
I use the rptDesignTime component to format the report at design time. At
runtime I assign the properties (report template etc.) to the rptRunTime
component and it *was* working fine.
Now things are not working. At design time when I double click on the
rptDesignTime component I can see the report as it should be in the design
tab of the IDE. When I choose the preview tab now, the report is blank and
when I switch back to the design tab the fields of the report are blank and
no longer seem to be associated to the field it was assigned to. Nothing
short of closing the Delphi form and reopening it will get the IDE to look
as it should.
I have tried placing a new DataPipeline, TppReport, TDatasource, and
TADOStoredProc on the form and setting the properties the same, and pointing
to the same template filename. This still does not work. All I get is an
entirely blank form.
Also, if I set the "SaveAsTemplate" property to TRUE will it always save the
report formatting, etc. to the physical template on disk?
Can someone help?
--
Reid Roman
Future Generation Software
http://www.fgsoft.com
This discussion has been closed.
Comments
Do not set SaveAsTemplate to true. When set to False, the report is saved
as an object embedded within the form or parent report (for subreports).
This is the default. When set to True, the report is saved based on the
settings of the Template property. Try building your report over again
completely without using templates and see if the data will show up. Then
once you can see the data again, try adding the SaveAsTemplate capability
back into your report.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm sorry if I was a bit unclear. What I meant to say was to try to get one
report working first the way you need, then start adding other reports into
the mix. For the end-user to save, all they have to do is use the file menu
on the designer or you can give them an interface where they can call
Report.Template.SaveToFile or Report.Template.SaveToDatabase. There is a
Designer.AllowSaveToFile property so that you can save to file from the
end-user solution.
You should still only use one TppReport object and load all your templates
in that.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com