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
|
|||
|
|||
printing with RTF2 control from Lebans
I have a question regarding the RTF2 control by Stephen Lebans. I am
investigating using it in an Access 2003 report. It seems like a great control, and it works very well until I try to print the report. During the Detail_Format event, I set the value of RTFtext in the RTF2 control. This works fine in print preview, but causes the following error to pop up when printing or exporting to a Snapshot file: "Property is read only". I have seen other newsgroups postings where Lebans said that this error will occur when a property is set in the Open event of a report rather than a later event. However, I cannot tell how this relates to the Detail_Format even when printing. If anyone has a clue about this, it would help me out. Thanks Dan Keck |
#2
|
|||
|
|||
printing with RTF2 control from Lebans
Do you have code in any other event that tries to reference the RTF2
control? -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Dan Keck" wrote in message ... I have a question regarding the RTF2 control by Stephen Lebans. I am investigating using it in an Access 2003 report. It seems like a great control, and it works very well until I try to print the report. During the Detail_Format event, I set the value of RTFtext in the RTF2 control. This works fine in print preview, but causes the following error to pop up when printing or exporting to a Snapshot file: "Property is read only". I have seen other newsgroups postings where Lebans said that this error will occur when a property is set in the Open event of a report rather than a later event. However, I cannot tell how this relates to the Detail_Format even when printing. If anyone has a clue about this, it would help me out. Thanks Dan Keck |
#3
|
|||
|
|||
printing with RTF2 control from Lebans
I am also receiving the exact same error. I created a multi page
report in A2K using RTF2 v1.8 last year. The report opened in preview and printed perfectly. Earlier this year I upgraded the computers in my office to A2003. Only today have I needed to run this report. When I open the report to preview, there are no errors. When I print the report it throws an error for each instance in the report. I still have one PC that has A2K on it. When I open the db on that PC once again it previews and prints perfectly. I run my code in the GroupHeader_Format section. Based on the fact that the same db prints fine on A2K but not on A2003 possibly indicates an issue with RTF2 and A2003 |
#4
|
|||
|
|||
printing with RTF2 control from Lebans
Well you should not be getting that error when printing the report. Access
is complaining that you are writing to the RTF2 control when it is not available to be written to. I just tested with Access 2003, both with Unbound and Bound RTF2 controls...no errors. There is something in your configuration that must be different from mine. How do we find out? I'm just not sure. Can you send me the MDB containing your report so that we can eliminate the possibility that it is specific reports that are causing the issue. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Kranman" wrote in message oups.com... I am also receiving the exact same error. I created a multi page report in A2K using RTF2 v1.8 last year. The report opened in preview and printed perfectly. Earlier this year I upgraded the computers in my office to A2003. Only today have I needed to run this report. When I open the report to preview, there are no errors. When I print the report it throws an error for each instance in the report. I still have one PC that has A2K on it. When I open the db on that PC once again it previews and prints perfectly. I run my code in the GroupHeader_Format section. Based on the fact that the same db prints fine on A2K but not on A2003 possibly indicates an issue with RTF2 and A2003 |
#5
|
|||
|
|||
printing with RTF2 control from Lebans
Stephen,
I wish I could comply with your request; however the MDB consists of a front end and back end, both rather large and containing confidential information. I can post screen shots of my report with controls and code behind, which there is not much of. I would be willing to make any changes to the above at your request for troubleshooting purposes. I am still not sure that it is a specific report that is causing the issue as the exact same report prints fine in A2K, but not A2003 (by the way both PCs using WinXP pro). Maybe Dan could send his MDB. I will try to create a sample MDB with similar code to see if I can generate the same error. I could then forward it on to you if successful. Thanks and Best Regards, Steve |
#6
|
|||
|
|||
printing with RTF2 control from Lebans
Stephen,
I was able to export the problem report along with its sub-report to a new MDB. I did not port over any tables or queries that the reports' controls are bound to. You can open the report although there are data errors. The report still throws the "Property is Read Only" error when printing in Access 2003. However I did test this new MDB on a A2K PC and the report prints without error. I will email you through your web site, and you can respond with directions on how to send you the MDB. Steve |
#7
|
|||
|
|||
printing with RTF2 control from Lebans
Hi Steve,
you are misunderstanding how to load RTF text into the control. Your code is trying to use the Selxxx props to set Font properties. You simply cannot do this with an ActiveX control on a report at runtime as there is no active user interface available. What you need to do is build the RTF string, including the desired Fonts props, and then set the RTFtext prop in the format event of the relevant section. -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Kranman" wrote in message ps.com... Stephen, I was able to export the problem report along with its sub-report to a new MDB. I did not port over any tables or queries that the reports' controls are bound to. You can open the report although there are data errors. The report still throws the "Property is Read Only" error when printing in Access 2003. However I did test this new MDB on a A2K PC and the report prints without error. I will email you through your web site, and you can respond with directions on how to send you the MDB. Steve |
#8
|
|||
|
|||
printing with RTF2 control from Lebans
Hello Stephen
I've just installed your RTF control. In the past we've used the Total Access Memo in our Access Reports. But Total Access Memo don't work in Access 2007. The RTF2 control (ID = rtfMemo) ist in a subreport called UbeRtfMemo. This subreport is placed on the Detail1 section of the main report two times. The IDs of the subreport controls are UbeRtfFooter and UbeRtfHeader. In the Detail1_Format event, I try to set the RTFtext property with this code: Me.UbeRtfFooter.Report!rtfMemo.Object.rtfText = Me.rtfFooter Me.UbeRtfHeader.Report!rtfMemo.Object.rtfText = Me.rtfHeader This event is the only place where I reference the control. Now I get the message "The property is read only" if I try to preview or print the report. But the strange thing is, everything works fine (accept the message :-)). The RTF text is shown and printed well. This happens only in Access 2003 und 2007. Do you have a solution? |
#9
|
|||
|
|||
printing with RTF2 control from Lebans
I do not have Access 2007 installed yet so I cannot debug this issue.
This error message signifies that the control's Properties are not available to be written at this time. Prior to A2007, you could legally write to the control in the format event of the relevant section containing the control. But it may simply be a Subreport issue. Does the control work in A2007 without using a subreport? If so then you will have to call your code from the Format event of one of the sections directly on the SubReport. HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Gulliwahn" wrote in message ... Hello Stephen I've just installed your RTF control. In the past we've used the Total Access Memo in our Access Reports. But Total Access Memo don't work in Access 2007. The RTF2 control (ID = rtfMemo) ist in a subreport called UbeRtfMemo. This subreport is placed on the Detail1 section of the main report two times. The IDs of the subreport controls are UbeRtfFooter and UbeRtfHeader. In the Detail1_Format event, I try to set the RTFtext property with this code: Me.UbeRtfFooter.Report!rtfMemo.Object.rtfText = Me.rtfFooter Me.UbeRtfHeader.Report!rtfMemo.Object.rtfText = Me.rtfHeader This event is the only place where I reference the control. Now I get the message "The property is read only" if I try to preview or print the report. But the strange thing is, everything works fine (accept the message :-)). The RTF text is shown and printed well. This happens only in Access 2003 und 2007. Do you have a solution? |
#10
|
|||
|
|||
printing with RTF2 control from Lebans
Hello Stephen
This error message signifies that the control's Properties are not available to be written at this time. Yes, should be! But it still works! The RTF-Text is set correctly! This happens in Access 2003 also! I agree that this could be a subreport issue! But the problem is, that this reports are used by 100 customers. So we need a easy solution to switch from Total Access Memo to RTF2 without changing all of the reports. Can you create a new RTF2-Control which will work without this message for us? We will pay for it! How much would it cost? Best regards Stefan Guler "Stephen Lebans" wrote: I do not have Access 2007 installed yet so I cannot debug this issue. This error message signifies that the control's Properties are not available to be written at this time. Prior to A2007, you could legally write to the control in the format event of the relevant section containing the control. But it may simply be a Subreport issue. Does the control work in A2007 without using a subreport? If so then you will have to call your code from the Format event of one of the sections directly on the SubReport. HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Gulliwahn" wrote in message ... Hello Stephen I've just installed your RTF control. In the past we've used the Total Access Memo in our Access Reports. But Total Access Memo don't work in Access 2007. The RTF2 control (ID = rtfMemo) ist in a subreport called UbeRtfMemo. This subreport is placed on the Detail1 section of the main report two times. The IDs of the subreport controls are UbeRtfFooter and UbeRtfHeader. In the Detail1_Format event, I try to set the RTFtext property with this code: Me.UbeRtfFooter.Report!rtfMemo.Object.rtfText = Me.rtfFooter Me.UbeRtfHeader.Report!rtfMemo.Object.rtfText = Me.rtfHeader This event is the only place where I reference the control. Now I get the message "The property is read only" if I try to preview or print the report. But the strange thing is, everything works fine (accept the message :-)). The RTF text is shown and printed well. This happens only in Access 2003 und 2007. Do you have a solution? |
Thread Tools | |
Display Modes | |
|
|