DEVELOPING
SSRS REPORT WITH CHART USING RDP CLASS
Requirement
is getting Count of Records in SalesTable based on SalesStatus.
Step
1:
Create
temporary table(ChartTemp) in AOT.Create new Integer field as Count.
Step 2:
Create
a RDP class and make coding..
ClassDeclaration:
class
ChartClassDP extends
SRSReportDataProviderBase
{
ChartTemp
chartTempp;
}
New
method:
[SRSReportDataSetAttribute(tablestr('ChartTemp'))]
public
ChartTemp getChartTemp()
{
select
chartTempp;
return
chartTempp;
}
Override
method:
public
void
processReport()
{
SalesTable
salesTable;
;
while
select
count(RecId)
from
salesTable
group
by
SalesStatus
{
chartTempp.SalesStatus=salesTable.SalesStatus;
chartTempp.Count=salesTable.RecId;
chartTempp.insert();
}
}
Step 3:
In
visual studio create new project and add dataset.
Step 4:
In
Design node select precision design and inside the designing window
insert-->chart.
Step 5:
Right
click on the chart,chart--> chart properties-->set Dataset name
as our Dataset Name.
Step 6:
Assign
values for X,Y axis. Here we Assign SalesStatus for X-axis and Count
for Y-axis.