Create an RDL File

Note: These steps describe how to create the file and add the needed parameters, embedded data source, and embedded data set for the OLTP version of the report. The steps are similar for the data warehouse versions. But the stored procedures executed by the datasets in those versions are located in the data warehouse database. However, the data warehouse versions still access the OLTP database to populate the available values for the prospect plan type parameter. This could also be done from the data warehouse. But as of writing, that would require an additional extension to the data warehouse.

  1. Open Visual Studio 2008 with Business Intelligence Development Studio functionality installed.

    For more information, see Microsoft's MSDN article at Introducing Business Intelligence Development Studio.

  2. To create a new Report Server project, click FileNew > Project. The New Project screen appears.

    Otherwise skip this and the next step and open your existing Report Server project.

  3. Select the Report Server Project template from the Business Intelligence Projects type templates, enter a name, and click OK. The new project appears.

  4. From Solution Explorer, right-click Reports and select AddNew Item.

    The Add New Item screen appears.

  5. From Categories, select Report Project and from Templates select Report.

  6. Enter a name and click Add.

    The report appears in the designer.

  7. Connect the RDL to your Blackbaud Infinity OLTP database.

    From the Report Data window, right-click Data Sources and select Add Data Source.

  8. The Data Source Properties screen appears. Enter a name such as BBInfinity.

  9. Select Embedded connection and from Type, select Microsoft SQL Server.

  10. Click the Edit button next to Connection string. The Connection Properties screen appears.

  11. From Server Name, select the name of the server which hosts your OLTP database.

  12. From Connect to a databaseSelect or enter a database name, select the name of your OLTP database such as BBInfinity.

  13. Click OK. You return to the Data Source Properties screen.

  14. Click OK. The Data Source is added to the RDL file.

  15. From Report Data, create a data set from your Blackbaud Infinity OLTP database. Right-click Datasets and select Add Dataset. The Dataset Properties screen appears.

  16. The goal is to create a dataset for each stored procedure in the report.

    Enter a name such as USR_USP_REPORT_PLANSTAGEDURATIONSCONSECUTIVE and select Use a dataset embedded in my report.

  17. From Data source, select the data source you created for the OLTP database.

  18. From Query type, select Stored Procedure.

  19. From Select or enter stored procedure name, select the name of the stored procedure in your Report Spec.

    Note: If you create the RDL file first, you can temporarily add the stored procedure to your development database with SQL Server Management Studio. If you create the Report Spec first, you load the spec with LoadSpec. This way when you select the stored procedure, the fields and parameters will be recognized by the dataset.

  20. Click Refresh Fields. If the stored procedure exists in the database in your connection, the other tabs of the Dataset Properties screen will be updated. This is easier than filling those out manually.

  21. Open the Fields tab of the Dataset Properties screen and confirm the fields were found.

  22. Click the Parameters tab of the Dataset Properties screen.

  23. There is no report parameter to map the dataset parameter to yet. Click OKVisual Studio will probably recognize the discrepancy and add the parameter. If not, right-click Parameters and add the PROSPECTPLANTYPECODEID parameter.

  24. We need to populate the available values for the PROSPECTPLANTYPECODEID parameter. Add a new dataset for that. Right-click Datasets and select Add Dataset.

  25. For Name, enter ProspectPlanTypeCode.

  26. Select User a dataset embedded in my report.

  27. Select the OLTP data source you created.

  28. Select Query typeText.

  29. In the Query field, enter:

    select [ID], [DESCRIPTION] from [PROSPECTPLANTYPECODE]
  30. Click OK.

  31. Return to the Parameter Properties screen for the PROSPECTPLANTYPECODEID parameter.

  32. From Available Values, select Get values from a query.

  33. From Dataset, select ProspectPlanTypeCode.

  34. From Value field, select ID.

  35. From Label field, select DESCRIPTION.

  36. Click OK.

  37. Return to the Parameters tab on the Dataset Properties screen for the stored procedure dataset.

  38. You can now select a parameter value for the parameter. But click the function button next to the Parameter Value field. The Expression screen appears.

  39. Enter this expression.

    =Parameters!PROSPECTPLANTYPECODEID.Value
  40. Click OK twice to exit those screens.

  41. Right-click the PROSPECTPLANTYPECODEID parameter and select Parameter Properties.

  42. Create datasets for the other two stored procedures:

    USR_USP_REPORT_PLANSTAGEDURATIONSNONCONSECUTIVE
    USR_USP_REPORT_PLANSTAGEDURATIONSOVERLAPPING
  43. Create a parameter for user ID. Right-click Parameters and select Add Parameter.

  44. From Name, enter ALTREPORTUSERID and from Prompt enter Alt Report UserID.

  45. From the Default Values tab, select Specify values.

  46. Click the function button next to the Value field. The Expression screen appears.

  47. From the Set expression for: Value field, enter:

    =User!UserID
  48. Click OK twice.

  49. Save the RDL file.