How to add Microsoft Report Viewer in ASP.NET

1.8k Views Asked by At

I created one table and inside it there is field like Company (i.e., name of a company), Question and Answer. I also wrote a stored procedure for this, to retrieve Question, Answer and Company on the basis of the company name.

Now I want to add Microsoft Report Viewer, to display question and answer along with company name in the top.

The code of the stored procedure is:

ALTER Proc [dbo].[sp_GenerateReport]
(
    @CompanyName varchar(50)
)
AS
BEGIN

SELECT 
      Company,
      Question,
      avg(Answer)
FROM tbl_Answer 
where tbl_Answer.Company=@CompanyName
group by Question,Company

END

The column in the table:

Id            int               Unchecked
Company       varchar(50)       Checked
Dimension     int               Checked
Section       varchar(50)       Checked
Question      int               Checked
Answer        int               Checked

I want report in the format of a graph as seen in the example image below. In the top there should be the company name, and on the axes Season should be Question and Points should be Answer:

Wanted graph

2

There are 2 best solutions below

0
On
0
On

you can use SSRS Sql server Reporting Service in order to make report but you have to get BI (Business Intelligence) it allow you to make report easily