Savvoulidis said:
Well, I have created a form that loads all the controls (or those that I
need) from the database, after I have exported all the properties I need
(form name, control name, left, top, width, height). Then, using that form,
the user can move/resize the controls as he wishes. This works, but only
when the report is in design mode. I really need it in preview, because,
the printout will be on preprinted paper (receipt) so the user has to deal
with the exact positions on that paper, and not me.
You defintely do not want users operating in design mode.
As I said before, you can do this at run time using code
within the report. As long as you have a table that
identifies the report and each control along with the
desired positional info, you can do this in the Format event
of the section containing the controls OR if the settings
apply to entire report (as opposed to each detail), use the
report's Open event procedure.
Open a recordset on the table containing the settings,
filtering it to the report name. Then loop through the
recordset, manipulating the control properties. Since
setting the properties is not being done in design view,
these settings will not be save in the report, but they will
be applied each time the report is opened (i.e. makes no
effective difference).
I still think this is the easy part. I don't understand
what you are describing about the form, but I think getting
the users to use the form to set the properties in a sane
way, is the difficult aspect of your problem.