I'm displaying an RDLC file in a Reporting Viewer Control in an aspx page.
The page accepts parameters from a dropdownlist control. Intermittently, I'm
getting an error that the Viewer Control Object is in a read only state on my
aspx page. From the event viewer logs, it appears that this is coming from
my OnSelectedIndexChanged event.
at Microsoft.Reporting.WebForms.ReportViewer.OnReportChanged(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Microsoft.Reporting.WebForms.Report.OnChange()
at Microsoft.Reporting.WebForms.LocalReport.Refresh()
at mymktpage.ddlCCode_SelectedIndexChanged(Object sender, EventArgs e)
at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs
e)
at System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent()
at
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I do have the dropdown set to autopostback=true and the
onselectedindexchanged property set to go to the event
ddlCCode_SelectedIndexChanged, but I'm not really doing anything inside the
event. I'm just trying to trigger the postback when the value is changed on
the dropdown.
Any ideas on what's causing this?
|
|
0
|
|
|
|
Reply
|
Utf
|
12/4/2009 1:18:01 AM |
|
Hello,
Did you use any code behind on Report Viewer control in Initial, PageLoad
or other events which are executed before OnPreRenderCompleted event?
We have to modify the properties of Report Viewer or do some code on Report
Viewer after OnPreRenderComplete event. Otherwise, it will encounter the
client error "Viewer Control Object is in a read only state".
--
Sincerely,
Vince Xu
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
|
|
0
|
|
|
|
Reply
|
v
|
12/4/2009 7:57:25 AM
|
|
Yes, I do have logic--parameter processing--in the pageload event. How do I
get around the error?
"Vince Xu [MSFT]" wrote:
> Hello,
>
> Did you use any code behind on Report Viewer control in Initial, PageLoad
> or other events which are executed before OnPreRenderCompleted event?
> We have to modify the properties of Report Viewer or do some code on Report
> Viewer after OnPreRenderComplete event. Otherwise, it will encounter the
> client error "Viewer Control Object is in a read only state".
>
>
> --
> Sincerely,
>
> Vince Xu
>
> Microsoft Online Support
>
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>
> MSDN Managed Newsgroup support offering is for non-urgent issues where an
> initial response from the community or a Microsoft Support Engineer within
> 2 business day is acceptable. Please note that each follow up response may
> take approximately 2 business days as the support professional working with
> you may need further investigation to reach the most efficient resolution.
> The offering is not appropriate for situations that require urgent,
> real-time or phone-based interactions. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
> ==================================================
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/4/2009 6:50:01 PM
|
|
Hi,
You can put the related code on ReportViewer into OnPreRenderComplete event
instead of PageLoad.
--
Sincerely,
Vince Xu
Microsoft Online Support
--------------------
| Thread-Topic: Viewer Control Object is in a read only state
| thread-index: Acp1EpWEdGuNHKGWQlWznRSLqOCYgQ==
| X-WBNR-Posting-Host: 198.246.249.35
| From: checkraiser@community.nospam <checkraiser@community.nospam>
| References: <40606789-6E9B-4E65-B092-608AED5F1AC6@microsoft.com>
<8DxaydLdKHA.828@TK2MSFTNGHUB02.phx.gbl>
| Subject: RE: Viewer Control Object is in a read only state
| Date: Fri, 4 Dec 2009 10:50:01 -0800
| Lines: 40
| Message-ID: <80C7F906-BD47-4CC5-8CF4-AE2A337924B1@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:94801
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Yes, I do have logic--parameter processing--in the pageload event. How
do I
| get around the error?
|
| "Vince Xu [MSFT]" wrote:
|
| > Hello,
| >
| > Did you use any code behind on Report Viewer control in Initial,
PageLoad
| > or other events which are executed before OnPreRenderCompleted event?
| > We have to modify the properties of Report Viewer or do some code on
Report
| > Viewer after OnPreRenderComplete event. Otherwise, it will encounter
the
| > client error "Viewer Control Object is in a read only state".
| >
| >
| > --
| > Sincerely,
| >
| > Vince Xu
| >
| > Microsoft Online Support
| >
| >
| > ==================================================
| > Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
| >
| > MSDN Managed Newsgroup support offering is for non-urgent issues where
an
| > initial response from the community or a Microsoft Support Engineer
within
| > 2 business day is acceptable. Please note that each follow up response
may
| > take approximately 2 business days as the support professional working
with
| > you may need further investigation to reach the most efficient
resolution.
| > The offering is not appropriate for situations that require urgent,
| > real-time or phone-based interactions. Issues of this nature are best
| > handled working with a dedicated Microsoft Support Engineer by
contacting
| > Microsoft Customer Support Services (CSS) at
| > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
| > ==================================================
| >
| > .
| >
|
|
|
0
|
|
|
|
Reply
|
v
|
12/7/2009 6:25:00 AM
|
|
Hi,
Did you resolve this issue?
This is Vince Xu from MSDN Managed Newsgroup support team, since I
haven't seen your reply after I last posted my reply. Please feel free
to let me know if there's anything else I can help. Thanks.
--
Sincerely,
Vince Xu
Microsoft Online Support
|
|
0
|
|
|
|
Reply
|
v
|
12/9/2009 9:50:45 AM
|
|
Hi Vince,
Unfortunately, I ran into another problem. I'm adding parameters to the
datasource in Page Load. If I move the parameter add logic to the
pre-render event that you mention, the object data source which is a tag on
the aspx page, fires the getdata method PRIOR to the parameters being added
in the pre-render event. In contrast, when the parameters are added in the
page load event instead of the pre render event, the parameters get added
first and then the get data method fires off. So how do I get around this
issue?
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData"
TypeName="MyTableAdapters.MyTableAdapter">
</asp:ObjectDataSource>
"Vince Xu [MSFT]" wrote:
> Hi,
>
> Did you resolve this issue?
>
> This is Vince Xu from MSDN Managed Newsgroup support team, since I
> haven't seen your reply after I last posted my reply. Please feel free
> to let me know if there's anything else I can help. Thanks.
>
> --
> Sincerely,
>
> Vince Xu
>
> Microsoft Online Support
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/11/2009 1:23:01 AM
|
|
.aspx file
Hi,
You can't modify the properties of Report Viewerin Page Load, but you can
do it on Local DataSource in Page Load.
I listed a sample as below, hope that can help you.
HTML:
<rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana"
Font-Size="8pt" Height="400px" Width="400px">
<LocalReport ReportPath="TestReport.rdlc">
<DataSources>
<rsweb:ReportDataSource
DataSourceId="ObjectDataSource1"
Name="GalacticDataSet_Customer" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData"
TypeName="GalacticDataSetTableAdapters.CustomerTableAdapter">
</asp:ObjectDataSource>
Code Behind:
protected void Page_Load(object sender, EventArgs e)
{
ReportParameter rp = new ReportParameter("CustomerNO", "34938");
// Pass the value to the report parameter.
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp
});
ReportViewer1.LocalReport.Refresh();
}
--
Sincerely,
Vince Xu
Microsoft Online Support
--------------------
| Thread-Topic: Viewer Control Object is in a read only state
| thread-index: Acp6AHrQuQMx/QRETVS2ufm8+ucjMw==
| X-WBNR-Posting-Host: 198.246.249.35
| From: checkraiser@community.nospam <checkraiser@community.nospam>
| References: <40606789-6E9B-4E65-B092-608AED5F1AC6@microsoft.com>
<8DxaydLdKHA.828@TK2MSFTNGHUB02.phx.gbl>
<80C7F906-BD47-4CC5-8CF4-AE2A337924B1@microsoft.com>
<trgmaULeKHA.3976@TK2MSFTNGHUB02.phx.gbl>
| Subject: RE: Viewer Control Object is in a read only state
| Date: Thu, 10 Dec 2009 17:23:01 -0800
| Lines: 35
| Message-ID: <B0C36EF7-6A07-489F-A628-B38C211C0EF5@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:94996
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Vince,
|
| Unfortunately, I ran into another problem. I'm adding parameters to the
| datasource in Page Load. If I move the parameter add logic to the
| pre-render event that you mention, the object data source which is a tag
on
| the aspx page, fires the getdata method PRIOR to the parameters being
added
| in the pre-render event. In contrast, when the parameters are added in
the
| page load event instead of the pre render event, the parameters get added
| first and then the get data method fires off. So how do I get around
this
| issue?
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| SelectMethod="GetData"
| TypeName="MyTableAdapters.MyTableAdapter">
| </asp:ObjectDataSource>
|
| "Vince Xu [MSFT]" wrote:
|
| > Hi,
| >
| > Did you resolve this issue?
| >
| > This is Vince Xu from MSDN Managed Newsgroup support team, since I
| > haven't seen your reply after I last posted my reply. Please feel free
| > to let me know if there's anything else I can help. Thanks.
| >
| > --
| > Sincerely,
| >
| > Vince Xu
| >
| > Microsoft Online Support
| >
| > .
| >
|
|
|
0
|
|
|
|
Reply
|
v
|
12/15/2009 6:18:38 AM
|
|
Hi,
Did you resolve the issue? I look forword for you response.
--
Sincerely,
Vince Xu
Microsoft Online Support
--------------------
| X-Tomcat-ID: 25549944
| References: <40606789-6E9B-4E65-B092-608AED5F1AC6@microsoft.com>
<8DxaydLdKHA.828@TK2MSFTNGHUB02.phx.gbl>
<80C7F906-BD47-4CC5-8CF4-AE2A337924B1@microsoft.com>
<trgmaULeKHA.3976@TK2MSFTNGHUB02.phx.gbl>
<B0C36EF7-6A07-489F-A628-B38C211C0EF5@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-vincex@online.microsoft.com (Vince Xu [MSFT])
| Organization: Microsoft
| Date: Tue, 15 Dec 2009 06:18:38 GMT
| Subject: RE: Viewer Control Object is in a read only state
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <fwDW55UfKHA.5176@TK2MSFTNGHUB02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 94
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:95069
| NNTP-Posting-Host: tk2tomimport1.phx.gbl 10.230.18.247
|
|
| .aspx file
| Hi,
|
| You can't modify the properties of Report Viewerin Page Load, but you can
| do it on Local DataSource in Page Load.
|
| I listed a sample as below, hope that can help you.
|
| HTML:
|
| <rsweb:ReportViewer ID="ReportViewer1" runat="server"
| Font-Names="Verdana"
| Font-Size="8pt" Height="400px" Width="400px">
| <LocalReport ReportPath="TestReport.rdlc">
| <DataSources>
| <rsweb:ReportDataSource
| DataSourceId="ObjectDataSource1"
| Name="GalacticDataSet_Customer" />
| </DataSources>
| </LocalReport>
| </rsweb:ReportViewer>
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| SelectMethod="GetData"
| TypeName="GalacticDataSetTableAdapters.CustomerTableAdapter">
| </asp:ObjectDataSource>
|
| Code Behind:
|
| protected void Page_Load(object sender, EventArgs e)
| {
| ReportParameter rp = new ReportParameter("CustomerNO", "34938");
| // Pass the value to the report parameter.
| ReportViewer1.LocalReport.SetParameters(new ReportParameter[] {
rp
| });
| ReportViewer1.LocalReport.Refresh();
| }
|
|
| --
| Sincerely,
|
| Vince Xu
|
| Microsoft Online Support
|
| --------------------
| | Thread-Topic: Viewer Control Object is in a read only state
| | thread-index: Acp6AHrQuQMx/QRETVS2ufm8+ucjMw==
| | X-WBNR-Posting-Host: 198.246.249.35
| | From: checkraiser@community.nospam <checkraiser@community.nospam>
| | References: <40606789-6E9B-4E65-B092-608AED5F1AC6@microsoft.com>
| <8DxaydLdKHA.828@TK2MSFTNGHUB02.phx.gbl>
| <80C7F906-BD47-4CC5-8CF4-AE2A337924B1@microsoft.com>
| <trgmaULeKHA.3976@TK2MSFTNGHUB02.phx.gbl>
| | Subject: RE: Viewer Control Object is in a read only state
| | Date: Thu, 10 Dec 2009 17:23:01 -0800
| | Lines: 35
| | Message-ID: <B0C36EF7-6A07-489F-A628-B38C211C0EF5@microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Path: TK2MSFTNGHUB02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:94996
| | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Hi Vince,
| |
| | Unfortunately, I ran into another problem. I'm adding parameters to the
| | datasource in Page Load. If I move the parameter add logic to the
| | pre-render event that you mention, the object data source which is a
tag
| on
| | the aspx page, fires the getdata method PRIOR to the parameters being
| added
| | in the pre-render event. In contrast, when the parameters are added in
| the
| | page load event instead of the pre render event, the parameters get
added
| | first and then the get data method fires off. So how do I get around
| this
| | issue?
| |
| | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| | SelectMethod="GetData"
| | TypeName="MyTableAdapters.MyTableAdapter">
| | </asp:ObjectDataSource>
| |
| | "Vince Xu [MSFT]" wrote:
| |
| | > Hi,
| | >
| | > Did you resolve this issue?
| | >
| | > This is Vince Xu from MSDN Managed Newsgroup support team, since I
| | > haven't seen your reply after I last posted my reply. Please feel free
| | > to let me know if there's anything else I can help. Thanks.
| | >
| | > --
| | > Sincerely,
| | >
| | > Vince Xu
| | >
| | > Microsoft Online Support
| | >
| | > .
| | >
| |
|
|
|
|
0
|
|
|
|
Reply
|
v
|
12/17/2009 9:47:56 AM
|
|
|
7 Replies
652 Views
(page loaded in 0.341 seconds)
Similiar Articles: ActiveX controls and printing - microsoft.public.access ...... in the code window and select Object Browser. In the Topmost left Combo control ... of the library and how to read/write ... Configure Crystal ActiveX Report Viewer Control ... How do I stop the control wizrd from creating embedded macros ...... box in the Access Options - Object Designers ... April 21, 2007 4:26 AM clintc Reader ... The only way to have some degree of control is to define ... move to the right ... Snapshot of screen - microsoft.public.vb.general.discussion ...Say the intention is to assign the object (picture) to the control ... PC-based software, you typically only read ... Crystal Smart Viewer ActiveX control does not download ... How can I manually add rows to datagridview. - microsoft.public ...... datagridview that is bounded to bindingSource object. (Only ... adding user control to a cell in a DataGridView ... Change state of detached column of dataGridView ... Microsoft NewsgroupsMSGROUPS.NET give users free access to public newsgroups. Users can read or post articles to these newsgroups. Jump to a page, then select all the text on THAT page only ...(if only there was a control-A that applied just to that one ... select all the text on THAT page only ... The Range object has ... the document is locked because it is read-only public folder - invalid data - microsoft.public.exchange.admin ...If you > click cancel, the object will be displayed read-only and ... Invalid directory name restoring System state ... Control Point, Invalid Handle? - microsoft ... Embedding PDF file in Report - microsoft.public.access.reports ...... properties of my sub-report control ... Adobe Acrobat Reader itself only displays the ... page cannot be clearly read on one full screen. > > If my use of unbound object ... adobe reader - microsoft.public.word.newusersAdobe Reader: only "printing" with "Send to ... use an embedded ActiveX control to do this (like the Acrobat Reader ... ... Adobe Reader lets you read and print from any ... MICRImage... - microsoft.public.dotnet.languages.vbI think I'm the only person on the face of ... Does MagTek provide these for its reader? If so, then using the SerialPort object ... were to guess, you are trying to read ... Viewer control object is in a read only stateI have an ASP.Net 2 page with a report viewer that displays a local report. The report uses the results from a SQL Server 2005 stored procedure. ASP.Net ... viewer control object is in a read only stateviewer control object is in a read only state topic - viewer control object is in a read only state articles, guides, latest update, new information, trends, experts ... RE: Viewer Control Object is in a read only stateHi, You can put the related code on ReportViewer into OnPreRenderComplete event instead of PageLoad. -- Sincerely, Vince Xu Microsoft Online Support ... control object is in a read only state - Code NewsgroupsI have an ASP.Net 2 page with a Report Viewer control (sp1) that displays a local report. The report uses the results from a SQL Server 2005 stored Report Viewer - Microsoft Corporation: Software, Smartphones ...System.InvalidOperationException: Viewer control object is in a read only state at Microsoft.Reporting.WebForms.ReportViewer.OnReportChanged(Object sender ... 7/26/2012 6:09:31 PM
|