none
Generating reports in VS2010 based on multiple sql queries RRS feed

  • Question

  • I am having a hard time understanding how ReportViewer can help me generate statistics regarding certain results. I am writing a Visual C# winform application that stores answers to questions (multiple choice, short answer, etc) in the database and part of the functionality required for the application is to show how many people answered a specific question, and then for each question show how many people (percentage wise) answered a specific choice.

    Example: Suppose I ask a question that says, "The meals at this facility are satisfying and nutritious" and I gave them choices such as "Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree, N/A"

    Let's say 100 people gave answers to this question. 25 said they strongly agree, 36 said they agree, 10 neutral, 15 disagree, 8 strongly disagree, and 6 did not answer the question.

    I can currently store these answers in the database and can write queries to display these results. I am going for the following layout...:

    Question                                Response #       Strongly Agree    Agree       Neutral     Disagree    Strongly Disagree         N/A
    The meals at this facility....           100                  25%                 36%           10%            15%                 8%                            6%

    Then for each question following there would be different numbers to each of the above categories. So far I don't see how I can do this in ReportViewer, I've looked at the tutorials on msdn (http://msdn.microsoft.com/en-us/library/ms252094.aspx) and youtube/vimeo but they show me how to generate reports of one's information and do not show me how I can use a database with multiple tables to generate results like those shown above. Can someone shed some light and get me going?

    Thanks





    Friday, May 6, 2011 4:45 AM