If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Change the positions of controls on preview ?
How can I change the positions of controls on reports that are on preview
state ? I want to do that, so that the new positions are saved on db (and retrieved back on format/print events) for reports that need to be changed by the user him/herself. I wouldn't like to send new versions of the program for these kind of changes, to the users (I give a MDE file to the users) TIA |
#2
|
|||
|
|||
Savvoulidis Iordanis wrote:
How can I change the positions of controls on reports that are on preview state ? I want to do that, so that the new positions are saved on db (and retrieved back on format/print events) for reports that need to be changed by the user him/herself. I wouldn't like to send new versions of the program for these kind of changes, to the users (I give a MDE file to the users) You can use the Format event of the section containing the controls to change the control's Left and Top properties. Considering that a report is a static display with no input mechanism, how do you propose to let the users specify the controls' desired position and how are you going to prevent them from specifying positions outside the report's print area? -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Thanks for the reply.
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. I;m looking forward to reading more ideas on this (if Access let us do it of course) TIA Savvoulidis Iordanis Greece |
#4
|
|||
|
|||
Savvoulidis Iordanis wrote:
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. -- Marsh MVP [MS Access] |
#5
|
|||
|
|||
The Corp Tech Demos has a sample form where you can drag a control around in
form view (not design view). When you let go of the control, the top and left values are stored in a table. I suppose you could use similar code to move and resize several controls. Corp Tech Demos is at http://www.invisibleinc.com/divFiles.cfm?divDivID=4. -- Duane Hookom MS Access MVP "Marshall Barton" wrote in message ... Savvoulidis Iordanis wrote: 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. -- Marsh MVP [MS Access] |
#6
|
|||
|
|||
Thanks for the reply M. Barton.
All the things you describe, already done but want the users to actually see what they actually moving. That's why I use the popup form with the positional info. After the user clicks on an arrow to move the column around (only in the same section of course) in the report previewed, I want the column to move before his/her eyes, not only check it out on the next preview/print. Is seems Access does not show changes done after the report goes on preview. It would untie my hands if it did |
#7
|
|||
|
|||
Savvoulidis Iordanis wrote:
Thanks for the reply M. Barton. All the things you describe, already done but want the users to actually see what they actually moving. That's why I use the popup form with the positional info. After the user clicks on an arrow to move the column around (only in the same section of course) in the report previewed, I want the column to move before his/her eyes, not only check it out on the next preview/print. Is seems Access does not show changes done after the report goes on preview. It would untie my hands if it did As I said before, a report preview is just a screen representation of the paper you'd get by printing the report. You wouldn't expect to be able to move columns around on the paper, would you? You can do that sort of thing with a form, but then you wouldn't want to print a form either. I guess my bottom line is that you're not likely to make this as easy for the users as want to. I haven't looked a Duane's example, but it might give you some ideas to pursue. -- Marsh MVP [MS Access] |
#8
|
|||
|
|||
Something similar to my solution would allow the user to move a control
around. There could also be code to resize the control. The dimensions and size would need to be updated in a table of control properties. These could then be used to resize and position controls on a report. As Marsh suggests, this is not a walk-in-the-park. -- Duane Hookom MS Access MVP -- "Marshall Barton" wrote in message ... Savvoulidis Iordanis wrote: Thanks for the reply M. Barton. All the things you describe, already done but want the users to actually see what they actually moving. That's why I use the popup form with the positional info. After the user clicks on an arrow to move the column around (only in the same section of course) in the report previewed, I want the column to move before his/her eyes, not only check it out on the next preview/print. Is seems Access does not show changes done after the report goes on preview. It would untie my hands if it did As I said before, a report preview is just a screen representation of the paper you'd get by printing the report. You wouldn't expect to be able to move columns around on the paper, would you? You can do that sort of thing with a form, but then you wouldn't want to print a form either. I guess my bottom line is that you're not likely to make this as easy for the users as want to. I haven't looked a Duane's example, but it might give you some ideas to pursue. -- Marsh MVP [MS Access] |
#9
|
|||
|
|||
Well, not all things should be done by simple users. But those who have
admin rights could get a lot of burden off the programmers hands, don't you think? The column movement could be allowed only to users with certain rights. I' m downloading the Duane's solution to check it out, and I' be back soon Thank you all... |
#10
|
|||
|
|||
Duane, are there any examples on reports, or all of them are on forms?
|
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Global Margin Change | John Smith | Publisher | 1 | December 15th, 2004 09:56 PM |
change the print preview size? | iamjillian | General Discussion | 2 | November 24th, 2004 07:31 AM |
MS Word, how do you change the auto check/spelling controls p... | Paige | General Discussion | 1 | November 11th, 2004 10:21 PM |
Cumulative Change | r. howell | Running & Setting Up Queries | 3 | August 23rd, 2004 01:41 PM |
Change Start Dates without Changing Due Dates | Beth | General Discussion | 0 | August 19th, 2004 03:44 PM |