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:
Please see the Walkthrough on how to Add Report Viewer Web Control on you web page
http://msdn.microsoft.com/en-us/library/ms252123.aspx
http://msdn.microsoft.com/en-us/library/ms251692.aspx
http://msdn.microsoft.com/en-us/library/ms251682.aspx