FastReport and (x)harbour
Hi I am new with FastReport but I already love it!
Using 4.12.1 version
My problem seems to be simple but it bothers me a lot:
No "Addvariable()" function call yields the result
When the previev of the report loads, I can see the variable "CoName" in section "MyVars" and I can drag it an drop into the report
But when I run the preview of the report, the following dialog error shows:
"the following error(s) has occured:
CoName: Error in expression "BROKEN YOLK CAFFEE":";" expected
Using 4.12.1 version
My problem seems to be simple but it bothers me a lot:
cCompanyName := ALLTRIM(vcompany->TITLE)
private m_fr := frreportmanager():new()
// x = ALIAS()
// n = SELECT()
m_fr:SetWorkArea(x,n)Â Â Â Â //"xreport", n)
    // Now to define which FIELDS we want to show on the report
m_fr:SetFieldAliases(x,  "NAME;SSN;DATEENTER;TOTALH;TOTALL;TOTALB;BALANCEH;PAIDH;DEPARTMENT")        // DEPARTMENT is only needed if we sort by DEPARTMENT
    m_fr:LoadFromFile(m_pj)
    m_fr:AddVariable( "MyVars", "CoName",  " ' cCompanyName ' "  )
    //m_fr:AddVariable( "MyVars", "CoName",  '"cCompanyName"'  )
    //m_fr:AddVariable( "MyVars", "CoName",  "'" + cCompanyName +"'"  )
   Â
    m_fr:DesignReport()
    m_fr:DestroyFR()
    return nil
No "Addvariable()" function call yields the result
When the previev of the report loads, I can see the variable "CoName" in section "MyVars" and I can drag it an drop into the report
But when I run the preview of the report, the following dialog error shows:
"the following error(s) has occured:
CoName: Error in expression "BROKEN YOLK CAFFEE":";" expected
Comments
The syntax for string is
m_fr:AddVariable( "MyVars", "CoName", (cCompanyName +CRLF) )