Results 1 to 5 of 5

Thread: config question - client server app and web app

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    513

    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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    513

    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

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    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)
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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:
    1. /// <summary>
    2. /// Displays the appropriate view for a report.
    3. /// </summary>
    4. /// <param name="report">
    5. /// The report to display.
    6. /// </param>
    7. /// <param name="descriptionLabel">
    8. /// The <see cref="Label"/> containing the report's description.
    9. /// </param>
    10. /// <param name="viewer">
    11. /// The <see cref="ReportViewer"/> containing the report output.
    12. /// </param>
    13. /// <param name="rootFolderName">
    14. /// The folder containing the reports.
    15. /// </param>
    16. private void UpdateReportView(ReportData report,
    17.                               Label descriptionLabel,
    18.                               ReportViewer viewer,
    19.                               string rootFolderName)
    20. {
    21.     if (report == null || report.IsFolder)
    22.     {
    23.         // No report is selected.
    24.         this.ClearReport(descriptionLabel,
    25.                          viewer);
    26.     }
    27.     else
    28.     {
    29.         this.DisplayReport(report.Name,
    30.                            report.Description,
    31.                            string.Format("/{0}/{1}/{2}",
    32.                                          Program.Options.PacisReportsPath,
    33.                                          rootFolderName,
    34.                                          report.Path),
    35.                            descriptionLabel,
    36.                            viewer);
    37.     }
    38. }
    39.  
    40. /// <summary>
    41. /// Displays the output of a report.
    42. /// </summary>
    43. /// <param name="reportName">
    44. /// The name of the report.
    45. /// </param>
    46. /// <param name="description">
    47. /// The long description of the report.
    48. /// </param>
    49. /// <param name="path">
    50. /// The path of the report file.
    51. /// </param>
    52. /// <param name="descriptionLabel">
    53. /// The <b>Label</b> in which to display the report description.
    54. /// </param>
    55. /// <param name="viewer">
    56. /// The <b>ReportViewer</b> in which to display the report output.
    57. /// </param>
    58. private void DisplayReport(string reportName,
    59.                            string description,
    60.                            string path,
    61.                            Label descriptionLabel,
    62.                            ReportViewer viewer)
    63. {
    64.     descriptionLabel.Text = description;
    65.     viewer.ServerReport.ReportServerUrl = new Uri(Program.Options.ReportingServicesWebServiceUrl);
    66.     viewer.ServerReport.DisplayName = reportName;
    67.     viewer.ServerReport.ReportPath = path;
    68.     viewer.RefreshReport();
    69.     viewer.Show();
    70. }
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width