BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
using Syncfusion.Windows.Reports.Viewer;
using Syncfusion.Windows.Reports;
namespace LightSwitchApplication
{
public partial class SLReport
{
partial void SLReport_Activated()
{
this.FindControl("ScreenContent").ControlAvailable += SLReport_ControlAvailable;
}
void SLReport_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
ReportViewer viewer = e.Control as ReportViewer;
//Sets the report path
viewer.ReportPath = "/Report Project1/InvoiceParameterReport";
//Sets the report server Url
viewer.ReportServerUrl = "http://76.74.153.81/ReportServer";
//Sets the report service URL
viewer.ReportServiceURL = "/ReportingService.svc";
//viewer.ReportServiceURL = "http://localhost:50073/ReportingService.svc";
//Sets the processing mode
viewer.ProcessingMode = ProcessingMode.Remote;
//Sets the report server credential
viewer.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
//Refresh the report
viewer.RefreshReport();
viewer.ReportLoaded += (Sender, arg) =>
{
//Sets the data source credentials
var crdentials = new List<DataSourceCredentials>();
foreach (var datasource in viewer.GetDataSources())
{
var credn = new DataSourceCredentials();
credn.Name = datasource.Name;
credn.UserId = "ssrs1";
credn.Password = "RDLReport1";
crdentials.Add(credn);
}
viewer.SetDataSourceCredentials(crdentials);
//Sets the default parameter
List<ReportParameter> parameters = new List<ReportParameter>();
ReportParameter param = new ReportParameter();
param.Labels.Add("10251");
param.Values.Add("10251");
param.Name = "InvoiceID";
parameters.Add(param);
viewer.SetParameters(parameters);
};
}
}
}
This gave me hope, but for some reason I still cannot make it to work. Is the following required for it to work properly?
viewer.ReportServiceURL = "/ReportingService.svc
There is also
viewer.ReportPath = "/Report Project1/InvoiceParameterReport"
Does the same path need to be included in Properties of the control as well?
As pictures are worth more than 1000 words, I was wondering if you would be so kind and record short video showing how you configure the project in Visual Studio 2013 for remote SSRS reports with authentication from start to finish, please? I have talked to few people and they couldn't work this out either, hence having visual instructions would be really helpful.
Thank you very much in advance for your help and support in this matter.
Kind regards,
Tom
Good Afternoon,I am trying to use your Report Viewer control for desktop client and I cannot run the report which sits on a remote server. I have read few other threads about SSRS here and I know that this is not officially supported. However I have found this:"[...] adding Silverlight ReportViewer as custom control in LightSwitch screen allows you to render SSRS reports in Lightswitch platform."One of the samples I've found contains this code:using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
using Syncfusion.Windows.Reports.Viewer;
using Syncfusion.Windows.Reports;
namespace LightSwitchApplication
{
public partial class SLReport
{
partial void SLReport_Activated()
{
this.FindControl("ScreenContent").ControlAvailable += SLReport_ControlAvailable;
}
void SLReport_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
ReportViewer viewer = e.Control as ReportViewer;
//Sets the report path
viewer.ReportPath = "/Report Project1/InvoiceParameterReport";
//Sets the report server Url
viewer.ReportServerUrl = "http://76.74.153.81/ReportServer";
//Sets the report service URL
viewer.ReportServiceURL = "/ReportingService.svc";
//viewer.ReportServiceURL = "http://localhost:50073/ReportingService.svc";
//Sets the processing mode
viewer.ProcessingMode = ProcessingMode.Remote;
//Sets the report server credential
viewer.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
//Refresh the report
viewer.RefreshReport();
viewer.ReportLoaded += (Sender, arg) =>
{
//Sets the data source credentials
var crdentials = new List<DataSourceCredentials>();
foreach (var datasource in viewer.GetDataSources())
{
var credn = new DataSourceCredentials();
credn.Name = datasource.Name;
credn.UserId = "ssrs1";
credn.Password = "RDLReport1";
crdentials.Add(credn);
}
viewer.SetDataSourceCredentials(crdentials);
//Sets the default parameter
List<ReportParameter> parameters = new List<ReportParameter>();
ReportParameter param = new ReportParameter();
param.Labels.Add("10251");
param.Values.Add("10251");
param.Name = "InvoiceID";
parameters.Add(param);
viewer.SetParameters(parameters);
};
}
}
}
This gave me hope, but for some reason I still cannot make it to work. Is the following required for it to work properly?
viewer.ReportServiceURL = "/ReportingService.svc
There is also
viewer.ReportPath = "/Report Project1/InvoiceParameterReport"
Does the same path need to be included in Properties of the control as well?
As pictures are worth more than 1000 words, I was wondering if you would be so kind and record short video showing how you configure the project in Visual Studio 2013 for remote SSRS reports with authentication from start to finish, please? I have talked to few people and they couldn't work this out either, hence having visual instructions would be really helpful.
Thank you very much in advance for your help and support in this matter.
Kind regards,
Tom
Query |
Response | ||||
I am trying to use your Report Viewer control for desktop client and I cannot run the report which sits on a remote server. I have read few other threads about SSRS here and I know that this is not officially supported. However I have found this:
"[...] adding Silverlight ReportViewer as custom control in LightSwitch screen allows you to render SSRS reports in Lightswitch platform."
|
Our LightSwitch Silverlight ReportViewer extension didn’t have support to Load/View SSRS RDL reports. But we can achieve this by using Silverlight ReportViewer as custom control inside lightswitch screen. We have prepared a sample for you reference and it can be downloaded from below location.
We have prepared a document to create Report Viewer Lightswitch Silverlight application and it can be downloaded from the following location.
| ||||
This gave me hope, but for some reason I still cannot make it to work. Is the following required for it to work properly?
viewer.ReportServiceURL = "/ReportingService.svc
There is also
viewer.ReportPath = "/Report Project1/InvoiceParameterReport"
Does the same path need to be included in Properties of the control as well?
|
Kindly refer the below table for more details on Reportviewer properties.
| ||||
In addition to my first post, could you please tell me where I can find Syncfusion.Reports.Server assembly? I'm trying to add WCF, but it is missing from all Assemblies folder etc. |
You can find the “Syncfusion.Reports.Server” assembly from following installed location of our Essential Studio.
C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41(Product Version)\Assemblies\4.0. |
Thanks for contacting Syncfusion support.
Query Response I am trying to use your Report Viewer control for desktop client and I cannot run the report which sits on a remote server. I have read few other threads about SSRS here and I know that this is not officially supported. However I have found this:"[...] adding Silverlight ReportViewer as custom control in LightSwitch screen allows you to render SSRS reports in Lightswitch platform." Our LightSwitch Silverlight ReportViewer extension didn’t have support to Load/View SSRS RDL reports. But we can achieve this by using Silverlight ReportViewer as custom control inside lightswitch screen. We have prepared a sample for you reference and it can be downloaded from below location.We have prepared a document to create Report Viewer Lightswitch Silverlight application and it can be downloaded from the following location. This gave me hope, but for some reason I still cannot make it to work. Is the following required for it to work properly?viewer.ReportServiceURL = "/ReportingService.svcThere is alsoviewer.ReportPath = "/Report Project1/InvoiceParameterReport"Does the same path need to be included in Properties of the control as well? Kindly refer the below table for more details on Reportviewer properties.
Property Description ReportServiceURL You have to specify the ServiceURL to access the ReportServer . In our shared sample we have given the sample with WCF Reporting service embedded in application. Set the WCF service URL to the ReportServiceURL property as shown below.
ReportViewer.ReportServiceURL="/ReportingService.svc";
//viewer.ReportServiceURL="http://ssrs.syncfusion.com/ReportingService/ReportingService.svc";Kindly refer the below link for creating a WCF service. In addition to my first post, could you please tell me where I can find Syncfusion.Reports.Server assembly? I'm trying to add WCF, but it is missing from all Assemblies folder etc. You can find the “Syncfusion.Reports.Server” assembly from following installed location of our Essential Studio.C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41(Product Version)\Assemblies\4.0.Regards,Vinoth S.
Hi Tomasz,We have shared the “Syncfusion.Reports.Server” assembly in both versions (14.1.0.41 and 14.2.0.26), and it can be downloaded from the below location. Please replace the assemblies to your required location.Regards,Vinoth S.