Project::GetReportTree

Description

Find the report tree in the project given its corresponding UID

Syntax

BOOL GetReportTree( TreeNode & tr, uint ReportUID, Datasheet & wks = NULL, int nType = GRT_TYPE_RESULTS )

Parameters

tr
[output] the tree that was used in SetReportTree
ReportUID
[input] the UID of the report range
wks
[output] to receive the sheet where the report is located
nType
[input] A report might also have corresponding tree branches that are not shown, like GRT_TYPE_GUI branch that can also be obtained with this function

Return

true if the project has the requested report, false if not found

Examples

EX1

//Find the report tree in the project given its corresponding UID 
//Before run this example. Pls create a worksheet, set some numbers and do some analysis like Fit Linear.
#include <OperationManager.h>
void Project_GetReportTree_ex1()
{
        OperationManager opManager;
        opManager = Project.Operations;
        
        if( opManager.GetCount() > 0 )
        {
                OperationBase& opBase = opManager.GetOperation(0);
                
                int nOuts = opBase.GetOutputCount();
                for( int index = 0; index < nOuts; ++index )
                {
                        DataRange drOut;
                        if( opBase.GetOutput(drOut, index) )
                        {                     
                                Tree tr;
                                Project.GetReportTree(tr, drOut.GetUID(true));
                                out_tree(tr);
                        }
                }
        }
}

Remark

See Also

Project::GetTree

Header to Include

origin.h