Repositioning Sub (and/or) Main Reports
Hello All !
I am using RB and Delphi 2007!
I am looking at a hypothetical situation. If I currently have a group of
reports, none of which have a sub report (i.e. Main Report only),
is it possible to do the following, and if so, what advice could you offer
to me?
1. Add a "simple" sub report with just a memo field with an initial visible
setting of "false" for the subreport
2. Insure that this new sub report can have its visible property enabled via
a "flag" set from within my app
3. Reposition the new sub report either further up or further down with
regards to it being before or after the "main" report at any time.
If anyone has any information about possibly doing this, I would really
appreciate it.
Regards,
Everett
I am using RB and Delphi 2007!
I am looking at a hypothetical situation. If I currently have a group of
reports, none of which have a sub report (i.e. Main Report only),
is it possible to do the following, and if so, what advice could you offer
to me?
1. Add a "simple" sub report with just a memo field with an initial visible
setting of "false" for the subreport
2. Insure that this new sub report can have its visible property enabled via
a "flag" set from within my app
3. Reposition the new sub report either further up or further down with
regards to it being before or after the "main" report at any time.
If anyone has any information about possibly doing this, I would really
appreciate it.
Regards,
Everett
This discussion has been closed.
Comments
My recommendation would be to create a report with only a detail band.
Place two Section style subreports inside the detail band (one for the main
report, one for the sub report). These reports will print one after the
other on their own pages and you can control their print order using the
ZOrder property of the subreports.
Another option would be to dynamically load saved templates into each
subreport based on which order you want to view them.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you very much for your reply! Both are excellent ideas !
I have two last questions. First, can ZOrder be set dynamically via my app?
(example?).
Second, can someone lead me to an example of loading saved templates into a
subreport (example?).
Thank you kindly!
Everett
1. Yes, you can set the ZOrder by using the TppSubreport.ZOrder property.
You will want to set this property before the report prints.
2. There is an example of dynamically loading subreports located in the
\RBuilder\Demos\3. EndUser\5. Dynamic Subreport Loading\... directory.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I really do appreciate you pointing me into the right direction!
Regards,
Everett!