TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Francis Bastin
NA
166
1.5k
Return ReportViewer from wcf service
May 17 2018 4:48 AM
Hi,
I want return report viewer as an out variable from wcf service to client application.
because I am using SSRS report and report authentication should be taken where the wcf
service was installed. After fetch data in wcf I want to return a result to client application and display in report viewer.
Below are the code in wcf service but not working:
public
ReportViewer GetReportSSRS(CustomDataReport customeReport,
string
_outputIDs,
string
reportName)
{
ReportViewer report =
new
ReportViewer();
report.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
report.ServerReport.ReportServerUrl =
new
Uri(
"http://Testserver/ReportServer"
);
Microsoft.Reporting.WinForms.ReportParameter _from =
new
Microsoft.Reporting.WinForms.ReportParameter(
"Start"
, customeReport.Start.ToString());
Microsoft.Reporting.WinForms.ReportParameter _to =
new
Microsoft.Reporting.WinForms.ReportParameter(
"Finish"
, customeReport.Finish.ToString());
Microsoft.Reporting.WinForms.ReportParameter _OutputId =
new
Microsoft.Reporting.WinForms.ReportParameter(
"OutputValue"
, _outputIDs);
Microsoft.Reporting.WinForms.ReportParameter _name =
new
Microsoft.Reporting.WinForms.ReportParameter(
"Name"
, customeReport.Name);
Microsoft.Reporting.WinForms.ReportParameter _dataGroup =
new
Microsoft.Reporting.WinForms.ReportParameter(
"DataGroupName"
, customeReport.DataGroup.Name);
Microsoft.Reporting.WinForms.ReportParameter _displayTotal =
new
Microsoft.Reporting.WinForms.ReportParameter(
"DisplayTotal"
, customeReport.DisplayTotal.ToString());
eport.ServerReport.ReportPath =
"/Report/CustomDataReport"
;
Microsoft.Reporting.WinForms.ReportParameter _Logo =
new
Microsoft.Reporting.WinForms.ReportParameter(
"LogoPath"
,
"Logo.jpg"
);
report.ServerReport.SetParameters(
new
Microsoft.Reporting.WinForms.ReportParameter[] { _from, _to, _OutputId, _name, _dataGroup, _displayTotal, _Logo });
report.ShowParameterPrompts =
false
;
report.ServerReport.DisplayName = reportName;
return
report;
}
Reply
Answers (
0
)
Error while Install visual studio community 2015
How to create a table in excel from datatable in C#