The code for this is located in these files, which are included in the customization source code examples available from customer support.
Source\SPF\Server Module Projects\Training\Schema\Interface\Default\ IExCustomAdhocReportDefault.vb
Source\SPF\Server Module Projects\Training\Custom Reporting\ Custom Reporting Quick Guide.doc
Source\Models\SPF\Training\SCHEMA_Training_CustomAdHocReportSchema.xml