Active Report is not total

Posted by: dongtrien on 4 August 2017, 3:20 pm EST

  • Posted 4 August 2017, 3:20 pm EST

    <span id="result_box" class=""><span class="hps">Active</span> <span class="hps">Report</span> <span class="hps">is</span> <span class="hps">not</span> <span class="hps">total</span><span class="">,</span> <span class="hps">you</span> <span class="hps">see</span> <span class="hps">the attachment</span><span class="">.</span></span><span id="result_box" class=""><span class=""></span> <span class="hps">one</span> <span class="hps">sample</span> <span class="hps">=</span> <span class="hps">sum</span> <span class="hps">of</span> <span class="hps">two</span> <span class="hps">fields</span> <span class="hps">together, can you help me ?<br></span></span>
    2011/03/not sum question.JPG
  • Replied 4 August 2017, 3:20 pm EST

    Hello,<br><br>In order to have the correct  summary values to show up for the calculated fields, please implement the following steps.<br><br>1) Add a Field to the report with code as<br><br>Private Sub ActiveReport_DataInitialize()<br>   Me.Fields.Add ("Calc")<br>End Sub<br><br>2) In the fetch data event use code as following to generate values of the calculated field<br><br>Private Sub ActiveReport_FetchData(EOF As Boolean)<br>   Me.Fields("Calc").Value = Me.Fields("PerCopyPrice") * Me.Fields("Sales").Value<br>End Sub<br><br>3) Set the datafield property of the Field displaying the calculated field to the name of your calculated field eg :-Calc<br><br><br>Please find the attached sample in this regard.<br><br>Regards,<br>Prantik
    2011/03/Sample-3.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels