Simple SSRS Report by RDP Class

Rdp Class has to extends SRSReportDataProviderBase Class.

2. It Requires one Temp Table, if the table contains more than 1000 records then Table Property TableType should be set to TempDB and if the table contains less than 1000 records then it should be set to Inmemory.

Firstly, Create one class which extends SRSReportDataProviderBase Class and in the Class Declaration, declare table buffers which you need including temp table buffer.

class EmpRdpClass extends SRSReportDataProviderBase
{

TempFilterDemo tempFilterDemo;
FilterDemo filterDemo;

}
This method retrieves data from temp table
[SRSReportDataSetAttribute(“TempFilterDemo”)]
public TempFilterDemo getFilterDemo()
{

select * from tempFilterDemo;
return tempFilterDemo;

}
This method will insert data into temp table
private void insertTmpTable()
{

whileselect * from filterDemo
{

tempFilterDemo.EmplId = filterDemo.EmplId;
tempFilterDemo.Name = filterDemo.Name;
tempFilterDemo.Salary = filterDemo.Salary;
tempFilterDemo.Gender = filterDemo.Gender;
tempFilterDemo.insert();

}

}
this will over-all logic of DP class
[SysEntryPointAttribute(false)]
public void ProcessReport()
{

this.insertTmpTable();

}

Now you left with SSRS part.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: