Attaching Actions To Report DataLast Updated: 10/31/2018 Introduced in Version: 3.2
In this example integrate with a database Table in Decisions. This table contains ID, First Name, Last Name, and Email Address fields. Begin by creating a Report on the External Table with the ability to pull Account Information and Actions by clicking Report Data.
- Note: ID field in the external Table is matching Account Id in Decisions.
Start with Adding a database Table.
In the Portal, navigate to the Designer Folder and choose Add Table from Datatypes/Database > Database Integration category on the Folder Actions Panel.
Choose an existing local connection or create a new database integration. For this example, a local connection is selected.
Select an internal Database to Integrate with. Choose dbo.entity.account for this example.
Select a Table from the Table Name drop-down list. Next, choose from the Fields available. The Feilds that are selected will generate for this Table integration. Select a Table Key choose Next to save the table integration.
Back in the Designer Folder we click Create Report/Page > Create Report on the Folder Actions Panel and Name the Report and click Create to proceed to the Report Designer. In the Report Designer add the Integrated Table as Data Source for our Report. We expand Data Sources > Common > SampleDB and add dbo.Emails table as Data Source.
Next, we add desirable columns from our Data Source to populate Report with Data.
Add Actions To The Report Data on a report. This can be done with the Override Action Context feature located in the Reports properties tab.
At this point, if we save our Report and Run it, we will not have any Actions on our Data. To add Account actions to our Data we check Override Action Context check-box in Report Configuration Settings > Actions category.
Expand the properties Tab to make sure each Action can be read in the drop-down. Then, in Action Context Type we search for ‘account’ and pick DecisionsFramework.ServiceLayer.Services.Accounts.Account type.
Next, from the Actions Context ID Field drop-down, we pick ID column. And this completes our Report design. We can save Report and close Report Designer.
locate Run Report from the orange action panel at the top of the report and select Run Report. A window opens with a Report Viewer of a Running Report. Select any Row Data on the Report. This will display information about the Account with the same ID that can be viewed on the bottom of the page.
Right click any Row Data on the Report to view available Account Actions.