On Mon, 5 Mar 2018, patspiper wrote:
TFPRreport and TFPJSONReport need some clarifications. Maybe MVC can
confirm/correct the below:
TFPRreport:
- Report design can be setup by code *only*.
Not correct. You can load from file. See WIKI, I added a section on that.
- TFPReportData components must be linked to TFRReport by code
This is always so, but:
The IDE contains a menu item in the component editor that
links the available datasets to the report to make this easier.
See also below for improvements in runtime.
- Can invoke the IDE integrated editor to design reports and open/save them
from/to file. But they are useless to TFPRreport.
Not correct. You can load the design from file.
It doesn't happen 'out of the box' of course.
TFPJSONReport:
- Report design can be setup by code.
Correct.
- Can load/save report designs from/to file/stream/json (discarding design
data if any).
Correct.
- TFPReportData components have to be linked to TFPJSONReport by code (sample
code is needed when the report is loaded from file)
Correct.
- Can invoke the IDE integrated editor to design reports that are
loaded/saved from/to the lfm only.
They can also be loaded/saved to file, if you so desire.
- The IDE integrated editor cannot open a report designed by the standalone
designer, or save a file to be used by the standalone designer. Note:
Actually it can currently open a file, but possibly with nasty side effects.
It should definitely be able to open it. What happens with the data,
this is up for discussion. Currently I am toying with the idea that the
IDE offers to add the missing data definitions to the form.
I want to refactor the data handling a little so it can be used outside the
designer - as you noticed, when loading a design from file, the data
definitions are discarded. Then the loading in IDE can be improved...
Please look at the WIKI, http://wiki.freepascal.org/FPReport, I added some
explanations. I will add the 'Lazarus support' page after lunch.
Michael.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus