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?
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
==================================================
"Vince Xu [MSFT]" wrote:
> .
>
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: check...@community.nospam <check...@community.nospam>
| References: <40606789-6E9B-4E65...@microsoft.com>
<8DxaydL...@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...@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
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.
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:
> .
>
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: check...@community.nospam <check...@community.nospam>
| References: <40606789-6E9B-4E65...@microsoft.com>
<8DxaydL...@TK2MSFTNGHUB02.phx.gbl>
<80C7F906-BD47-4CC5...@microsoft.com>
<trgmaULe...@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...@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
|
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...@microsoft.com>
<8DxaydL...@TK2MSFTNGHUB02.phx.gbl>
<80C7F906-BD47-4CC5...@microsoft.com>
<trgmaULe...@TK2MSFTNGHUB02.phx.gbl>
<B0C36EF7-6A07-489F...@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-vi...@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: <fwDW55Uf...@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