Durng a drillthrouogh or back event of the ReportViewer. I want to assign
my own dataset to the "jump".
I want to obtain the parameter that I have assigned to the hyperlink actions
for a textbox in a repport. Then I want to use this paramter as part of a
filter with a dataTable.Select method to filter and merge data into a new
dataTable then use that new table as the DataSource for reportViewer for the
resulting "Jump" (drill in or out).
What I need to know for this post is;
1.) How do I access this parameter in code?
2.) Does the hyperlink action perform any built-in behaviors that would get
in the way of my desired goal? (and if so how should I get around those
behaviors?)
Thanks,
Doug
Hi Doug,
Regarding your two questions, please see my answers below.
1. You can first get the parameters collection of your local report and
then get the parameter by indexer. For example:
ReportParameterInfoCollection pInfo =
reportViewer1.LocalReport.GetParameters();
ReportParameterInfo p = pInfo["MyParameter"];
IList<string> dvList = p.Values;
int t;
if (dvList.Count != 0)
{
t = 1;
foreach (string dv in dvList)
{
if (t != dvList.Count)
{
t++;
Console.Write(dv + ", ");
}
else
{
if (t == 1)
Console.WriteLine(dv);
else
Console.WriteLine("or " + dv);
}
}
}
else
{
Console.WriteLine("<no default values defined>");
}
2. I am not sure what your meaning of built-in behaviors meant here,
however by using URL parameters for those hyperlinks, you can refresh your
web page, judge the parameters values, filter the dataset and refresh your
reportviewer after you click the hyperlink.
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
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.
============================================================

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
dbuchanan - 17 Jul 2008 07:32 GMT
Charles,
Using your code I get the following errors;
Error 1 The non-generic type 'System.Collections.IList' cannot be used with
type arguments
Error 2 foreach statement cannot operate on variables of type
'IList<string>' because 'IList<string>' does not contain a public definition
for 'GetEnumerator'
I am using a name value pair. I know the value is there. How do I simply get
the value associated with the name?
Is there a way to do that?
Thanks,
Doug
Charles Wang [MSFT] - 21 Jul 2008 10:15 GMT
Hi Doug,
The generic IList is under the namespace System.Collections.Generic. After you reference the
namespace, the error should go way.
If you want to store a name-value pair in your IList, you may simply create a structure (Name
string, Val string) and pass it to IList's parameter.
Hope this helps. Please feel free to let me know if you have any other questions or concerns.
Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
=========================================================

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================