or
Using Silverlight, I can show a simple telerik report passing parm using code like below. What I need to do is generate the same report for a different list of subjects. I need to be able to print them all at the same time. I was going to try to use a report book for this. Would this make sense in the situation? How do I add/pass all the parameters to the report book? I'm guessing I would need to pass all the parameters plus the list of subjects and then in the report book, programatically loop through the subjects and add a new report for each one?
public
FormLetterBasicReportViewerView()
{
InitializeComponent();
reportViewer1.RenderBegin +=
new
RenderBeginEventHandler(reportViewer1_RenderBegin);
}
void
reportViewer1_RenderBegin(
object
sender, RenderBeginEventArgs args)
{
args.ParameterValues[
"LetterDate"
] = CurrentViewModel.FormLetterInformation.LetterDate;
args.ParameterValues[
"Greeting"
] = CurrentViewModel.FormLetterInformation.Greeting;
args.ParameterValues[
"ReplyToName"
] = CurrentViewModel.FormLetterInformation.ReplyToName;
args.ParameterValues[
"ReplyToAddress"
] = CurrentViewModel.FormLetterInformation.ReplyToAddress;
args.ParameterValues[
"ReplyToPhoneNumber"
] = CurrentViewModel.FormLetterInformation.ReplyToPhoneNumber;
args.ParameterValues[
"MailToName"
] = CurrentViewModel.FormLetterInformation.MailToName;
args.ParameterValues[
"MailToAddress"
] = CurrentViewModel.FormLetterInformation.MailToAddress;
args.ParameterValues[
"Re"
] = CurrentViewModel.FormLetterInformation.Re;
args.ParameterValues[
"Paragraphs"
] =
string
.Join(
"\n\n"
, CurrentViewModel.FormLetterInformation.Paragraphs);
...
<
html
style
=
"height: 100%"
>
<
head
id
=
"Head1"
runat
=
"server"
></
head
>
<
body
style
=
"height: 100%"
>
<
form
id
=
"Form1"
runat
=
"server"
style
=
"height: 100%"
method
=
"post"
action
=
""
>
<
div
id
=
"Content1"
style
=
"border: solid 2px red; height: 100%;"
>
<
telerik:ReportViewer
ID
=
"ReportViewer1"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
></
telerik:ReportViewer
>
</
div
>
</
form
>
</
body
>
</
html
>
public static decimal hellodecimal(decimal arg1) { return arg1; }