DBxtra Documentation

DBxtra Documentation

How Can We Help?

Place a Total Field in the Detail Band

You are here:
< All Topics

Sometimes you might prefer to place a Total Field into the Detail Band instead of a Group Footer.

  • Set the Total field to Visible = No.

  • Select the Reports scripting language.

  • Select the Total field and enter the following code on BeforePrint.

Private Sub OnBeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs)
If sender.Report.CurrentRowIndex=sender.Report.RowCount-1 orelse GetCurrentColumnValue(“Invoice”) <> “” & sender.Report.GetNextColumnValue(“Invoice”) Then
End If
End Sub

Note! “txtTotal” is the Total Field.

Final Result:

Now each Group Total is placed beside the last detail instead in the Group Footer.

Next Surround a value with a special character
Table of Contents