Hi,
I have the following statements in my report codebehind ( NeedDataSource) :
It works fine.
But if this report is executed as a subreport from another Report i have :
Unable to cast object of type 'System.Char' to type 'System.Collections.IEnumerable'.
on foreach line.
so i tried :
same problem, but now i can see the value of ie is the first char of the current kl element,
that is if the kl element is "Bye" ie value is "B". Then is obvious i get a casting eroor.
But why i have a different behaviour (report, subreport) and how to solve it?
Any idea?
I have the following statements in my report codebehind ( NeedDataSource) :
IEnumerable kl;
kl =(IEnumerable)Report.ReportParameters[
0
].Value;
List<
string
> ls =
new
List<
string
>();
foreach
(IEnumerable ie
in
kl)
{
ls.Add((
string
)ie);
}
It works fine.
But if this report is executed as a subreport from another Report i have :
Unable to cast object of type 'System.Char' to type 'System.Collections.IEnumerable'.
on foreach line.
so i tried :
IEnumerable kl;
kl =(IEnumerable)Report.ReportParameters[0].Value;
List<
string
> ls =
new
List<
string
>();
foreach
(var ie
in
kl)
{
ls.Add((
string
)ie);
}
same problem, but now i can see the value of ie is the first char of the current kl element,
that is if the kl element is "Bye" ie value is "B". Then is obvious i get a casting eroor.
But why i have a different behaviour (report, subreport) and how to solve it?
Any idea?