Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 7  USING CUSTOM .NET CODE WITH REPORTS

Figure 7-12. EmploYee?Cost textbox


Right-click, select Expression, and in the Edit Expression dialog box enter the code shown in
Listing 7-9.


Listing 7-9. Using the CostPerVisitXML Method in an Expression


=Pro_SSRS.Employee.CostPerVisitXML(Fields!EmployeeID.Value,
Fields!ChargeServiceStartDate.Value)* sum(Fields!Visit_Count.Value)


Now if you preview the report or build and deploy it, you should see a report similar to Figure 7-13.
You can use any parameters you want to generate an actual report. Once you do, expand both the
service type and patient name tree menu items to see the newly calculated cost estimate values.


Figure 7-13. Final report

Free download pdf