Custom Report Groups Classifications - FalconFT/FalconDocs GitHub Wiki

Custom Asset Classifications for Reports Overview

When creating custom classifications for reports such as Portfolio Composition, Performance Attribution Falcon allows us to extend the system custom list 39 (Asset Portfolios Classification) with new groups, and these groups can be customized for each client.

This classification corresponds to the table [list].[ListItemNames]:

SELECT TOP (1000) [ListItemNameId]`
    ,[ListNameId]`
    ,[Name]`
    ,[Description]`
    ,[Priority]`
    ,[MultiselectBitValue]`
FROM [Falcon].[list].[ListItemNames]`
WHERE [ListNameId] = 39` --Asset Portfolios Classification List

image

Note

The new items created will have an ID greater than 1.000.000 (custom items)

Steps for Classification and Translation

To ensure correct classification and avoid issues where new items appear as #NT (not translated) in reports, follow these steps:

image

(example of new custom group misclassified or without transactions)

Classify New Items

Each newly created item must be classified with new ID and order position it within the report groups in the following tables:

  1. Create a record with a unique ID (Default Position) for each list item.
  • [analysis].[MapAssetPortfolioClassificationToAssetReportIdGroup]

image

(new list items with new created unique IDs 25 and 26)

  1. Create a record specifying the order (Default Position) for each list item.
  • [analysis].[MapAssetPortfolioClassificationToAssetReportOrderGroup]

image

(new list items with custom order position 25 and 26, in this case is the same as ID but may vary)

  1. Provide Translations

After classification, translations must be added to ensure they display correctly in reports. The translations should be inserted into the table [analysis].[LocalizationServiceReportsItems] with the following properties:

  • ObjectId → Unique ID assigned during classification.
  • ObjectName → "ResolveAssetTypeGroupName"
  • ReportTypeName → Since this column does not allow NULL values, an empty string should be used.

image

(don't forget to add translations to the new custom list items)

Important Notes

  • If translations are not provided, the items will appear as #NT (not translated) in reports.
  • Ensure that all newly created classification items have corresponding translation records.
  • Follow the correct order for classification and translation to maintain consistency in reports.

By following these steps, Falcon's reporting system will properly recognize and display custom classifications. 🚀

Debug from source code

If there is any item in a report that cannot be translated it can be debuged using Visual Studio.

  1. Go to project 'Falcon.Client.Analysis.Core' and open LocalizationServiceDatabase in folder Services.
  2. Search for the 'TranslateItem' method
private string TranslateItem(
    string ReportTypeName, int ObjectId, string ObjectName, int languageId, string NOT_FOUND = "#NT")
{
    LocalizationServiceReportItemDTO item = null;
    if (ReportTypeName == string.Empty)
    {
        item = ReportItems.FirstOrDefault(
            p => p.ObjectId == ObjectId && p.ObjectName == ObjectName);
    }
    else
    {
        item = ReportItems.FirstOrDefault(
            p => p.ReportTypeName == ReportTypeName && p.ObjectName == ObjectName);
    }            
    if (item == null)
        return $"{NOT_FOUND}";
    else
    {
        return languageId switch
        {
            1 => item.Lang1CustomValue ?? item.Lang1DefaultValue,
            2 => item.Lang2CustomValue ?? item.Lang2DefaultValue,
            3 => item.Lang3CustomValue ?? item.Lang3DefaultValue,
            4 => item.Lang4CustomValue ?? item.Lang4DefaultValue,
            _ => NOT_FOUND,
        };
    };
}
  1. Put a breakpoint in both NOT_FOUND lines
  2. Execute Falcon, show the report and wait for hitting the breakpoint

Useful information will be provided in the method parameters 😃

⚠️ **GitHub.com Fallback** ⚠️