GetReportSection

Description

GetReportSection returns the information to create a section in the report. A section is composed of a title and a table.

Syntax

int GetReportSection(const unsigned int iunTestIndex, const unsigned int iunSectionIndex, wchar_t*& owszSectionTitle, unsigned int& ounSectionLineNb, unsigned int& ounSectionRowNb, wchar_t**& owszDescription);

Parameters

Input

  • iunTestIndex: the identification number of the test for which HOA asks you information about the section.
  • iunSectionIndex: the index of the section for which HOA asks information.

Output

  • owszSectionTitle: the title of the section.
  • ounSectionLineNb: the number of line the table must have in this section.
  • ounSectionRowNb: the number of row the table must have in this section.
  • owszDescritpion: the content of the table.

Return

(int): returns the identification number of the error if an error occurs or 0 if no error occurs.

Example

To get a full example of the API use, download the .Plugin

#define OPT_PLUGIN_NO_ERROR 0
int GetReportSection(const unsigned int iunTestIndex, const unsigned int iunSectionIndex, wchar_t*& owszSectionTitle, unsigned int& ounSectionLineNb, unsigned int& ounSectionRowNb, wchar_t**& owszDescription)
{
     switch (iunTestIndex)
     {
case 0:
    switch (iunSectionIndex)
    {
        case 0:
            owszSectionTitle = L"The title of my first section";
            ounSectionLineNb = 2;
            ounSectionRowNb = 1;
            wchar_t[100] V1 = L"First value";
            wchar_t[100] V2 = L"Second value";
            wchar_t** description = new wchar_t*[2];
            description[0] = V1;
            description[1] = V2;
            owszDescritpion = description;
        break;
        case 1:
            [...]
        break;
    }
break;
case 1:
    [...]
break;
case 2:
    [...]
break;
     }
     return OPT_PLUGIN_NO_ERROR;
}