config question - client server app and web app
Hello: I currently have a client server app (created in visual studio 2005) that connects to an sql server (2008). The db is located on a web server.
Now, I'm trying to decide how to set up the reports. I was thinking it would be nice to have the reports on the web server so both the types of users...e.g. employees and customers can have access to the reports.
I therefore, was thinking of creating a web application inside the current client server's application's solution. Either that or i could just create a separate web application that doesn't reside inside the client app.
I wasn't sure which was the best way to go...so I wanted to run it by you guys to see if I could get some input in order to make a decision.
thanks,
Proctor
Re: config question - client server app and web app
You don't need a web application at all. Presumably you're using SQL Server Reporting Services, and there's a WinForms version of the ReportViewer control.
Re: config question - client server app and web app
jmcilhinney: thank you for your response.
I'm still confused....are you saying that i can still use the report viewer in my client-server app? I'd like to run these reports of the web server.
also...can you please explain about SQL Server Reporting Services?
thanks again,
Proctor
Re: config question - client server app and web app
Reporting Services are part of ms sql server so the users will hit a url and view a reporting screen.You can set up roles(employee,customer) to manage how views what.Ok here 'm not sure if you can do that without an active directory,haven't ever tried it.
If you definitely want to use reports inside your app,you may want to try crystal reports that are embedded in visual studio.
(Although i would have used sql reporting services individually)
Re: config question - client server app and web app
You install SQL Server Reporting Services on a server and you install Business Intelligence Development Studio on your development system. BIDS is a VS 2008 component for designing reports. You can then add a ReportViewer to your Windows Form and point it to the appropriate server and report.
I've recently (in the last year) worked on a WinForms app that uses SQL Server Reporting Services. Here's the code that I used to load a report at run time. The code is C# but it should be fairly clear what it's doing.
csharp Code:
/// <summary>
/// Displays the appropriate view for a report.
/// </summary>
/// <param name="report">
/// The report to display.
/// </param>
/// <param name="descriptionLabel">
/// The <see cref="Label"/> containing the report's description.
/// </param>
/// <param name="viewer">
/// The <see cref="ReportViewer"/> containing the report output.
/// </param>
/// <param name="rootFolderName">
/// The folder containing the reports.
/// </param>
private void UpdateReportView(ReportData report,
Label descriptionLabel,
ReportViewer viewer,
string rootFolderName)
{
if (report == null || report.IsFolder)
{
// No report is selected.
this.ClearReport(descriptionLabel,
viewer);
}
else
{
this.DisplayReport(report.Name,
report.Description,
string.Format("/{0}/{1}/{2}",
Program.Options.PacisReportsPath,
rootFolderName,
report.Path),
descriptionLabel,
viewer);
}
}
/// <summary>
/// Displays the output of a report.
/// </summary>
/// <param name="reportName">
/// The name of the report.
/// </param>
/// <param name="description">
/// The long description of the report.
/// </param>
/// <param name="path">
/// The path of the report file.
/// </param>
/// <param name="descriptionLabel">
/// The <b>Label</b> in which to display the report description.
/// </param>
/// <param name="viewer">
/// The <b>ReportViewer</b> in which to display the report output.
/// </param>
private void DisplayReport(string reportName,
string description,
string path,
Label descriptionLabel,
ReportViewer viewer)
{
descriptionLabel.Text = description;
viewer.ServerReport.ReportServerUrl = new Uri(Program.Options.ReportingServicesWebServiceUrl);
viewer.ServerReport.DisplayName = reportName;
viewer.ServerReport.ReportPath = path;
viewer.RefreshReport();
viewer.Show();
}