This blog post is about how to create a report using Report data provider.
The objects that we will be creating are

I have implemented SysOperationValidatable class so that we can validate the input parameters. You can implement your logic in validate method as shown above.

This class should extend SRSReportDataProviderBase class. The parameter attribute/Query attribute or both should be linked to the DP class. In my case i am using DC class as a parameter, hence SRSReportParameterAttribute is TestCustContractCls.

We need to create a method which has SRSReportDataSetAttribute attribute which will return data in the TempTable to the reporting services.

The business logic is handle in the doProcess method. In this method, we will insert the records into the temporary table.

Click on Query > Select the DP class you created. In my case it is 'TestCustReportDPCls'.



Choose all the fields you want in the report.
Create a design for your report. For the sake of simplicity, i have used a auto design over precision design.
Right click on Design > Auto design > Drag and drop the dataSource customer onto it.
Set the ObjectType property to 'SSRSReport' and Object to 'TestReport'.

Add the menu Item to a menu bar.
Save > Deploy the report> build the solution.
The objects that we will be creating are
- Data contract class - For parameters of the report
- Temporary table - For storing the records to be displayed in the report
- Data provider class - For processing the business logic of the report
- Action Menu Item - For front end display
- Report - As the name suggests, the report that will be used.
- First we will create a Data Contract(DC) class

I have implemented SysOperationValidatable class so that we can validate the input parameters. You can implement your logic in validate method as shown above.
- Create a Temporary table for storing data. Set the Table property to 'InMemory' so that its a tempTable.

- Create a Data Provider(DP) class to handle the business logic.
This class should extend SRSReportDataProviderBase class. The parameter attribute/Query attribute or both should be linked to the DP class. In my case i am using DC class as a parameter, hence SRSReportParameterAttribute is TestCustContractCls.

We need to create a method which has SRSReportDataSetAttribute attribute which will return data in the TempTable to the reporting services.

The business logic is handle in the doProcess method. In this method, we will insert the records into the temporary table.

- A new report 'TestReport' is created.
Click on Query > Select the DP class you created. In my case it is 'TestCustReportDPCls'.



Choose all the fields you want in the report.
Create a design for your report. For the sake of simplicity, i have used a auto design over precision design.
Right click on Design > Auto design > Drag and drop the dataSource customer onto it.
- Create a Output menu item for displaying the report.
Set the ObjectType property to 'SSRSReport' and Object to 'TestReport'.

Add the menu Item to a menu bar.
Save > Deploy the report> build the solution.
Comments
Post a Comment