Hello Chris,
As for the ReportViewer Control's "ViewButton", based on my research, it is
encapsulated as an "ViewReportButton" class which is an internal Type. I've
tried reference to this button instance from ReportViewer control's
Controls collection and change it Text, but that didn't work. I think it is
internally assigned the "View Report" text value. Actually since
Reportviewer is a well encapsulated webcontrol, there hasn't much options
for us to customize its individual settigns.
So far what I can get are the following two options if we want to provide a
custom parameterArea or button:
1. Still use the ReportViewer's built-in parameterArea and
ViewReportButton, however, we can only change the button's text by using
clent-side script(find the submit button and change its value), e.g:
==========================
<script language="javascript">
function AdjustViewButton()
{
var div = document.getElementById("ReportViewer1");
elems = form1.getElementsByTagName("INPUT");
var i;
for(i=0;i<elems.length;i++)
{
if(elems[i].type == "submit" && elems[i].value == "View Report")
{
elems[i].value = "View";
}
}
}
.................................
<body onload="AdjustViewButton();" >
....................
=============================
2. Do not use the built-in parametersArea of the ReportViewer control(hide
it by setting ShowParameterPrompt=false), and provide our own UI(like label
and textbox ) to accept parameters from user, also add our own View Report
Button, and in the button's click event, we need to use custom code to add
parameters into ReportViewr.serverReport's parameters collection and render
the report.
Hope this helps some. If you have any other ideas, please feel free to let
me know.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 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 or complex
project analysis and dump analysis issues. 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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.