Reporting - AddVar - OnReadFormulaVar

  • Hy!

    I try to get my reporting work, but the OnReadFormulaVar event is never raised. I think the Problem is that my Formula is not written correct in my template.
    I tried this:
    ehTDeditor2.Report.AddVar("AnzahlPreis", "Summe1", "Zwischensumme", "*","=0", "CUR=€", "", 0, "+=ReLeistungen.Anzahl * ReLeistungen.Preis", "", 0);

    and get this:
    {\field{\*\fldinst{MERGEFIELD AnzahlPreis}}{\*\wpfldparam{Summe1}}{\fldrslt{Summe1}}}
    (done by the ShowRepository-Dialog)
    so the field evaluates as a normal Mergefield?!

    What I am doing wrong? I need the formula Fields to calculate and sum.
    BTW, I am using ADO.net and not DAO.

    Thank you for any hint!
    Robert

    • Offizieller Beitrag

    Hi,

    Maybe you can save your file as demo.WPT and I can check here how it is converted to RTF. I can also see the structure of the report.

    Maybe you better use a mergefield, you can use any name for your sum, too.

    The variables are a bit complex.