Pro SQL Server 2012 Reporting Services

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

You can now run your report, and the patient name will be displayed in red or black according to
the business logic in the Code element of the report.


 Note You will notice that the ExceedMaxCost function has a validation error when viewed through the


expression editor. This is normal and will not affect your report when building or viewing it.


Now that you have modified the report to use the ExceedMaxCost function, you can preview the
report to see it in action. To do this, select the Preview tab, and set the ServiceYear parameter to have a
value of 2010 while leaving all other parameters with their default values. Once you render the report,
you should now see one that looks similar to Figure 7-8.


Figure 7-8. Report with the embedded code

Free download pdf