Print Page | Close Window

BUG: Wrong position for group row summaries

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24332
Printed Date: 14 May 2024 at 5:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG: Wrong position for group row summaries
Posted By: mgampi
Subject: BUG: Wrong position for group row summaries
Date Posted: 11 October 2022 at 12:16pm
Hi!

I use this code to put in a summary in several levels of group rows for a column in a report control.
To create the summary I use this code:
for (int i = 0; i < TheRows->GetCount(); i++) {
    CXTPReportRow* TheRow = TheRows->GetAt(i);

    if (TheRow->IsGroupRow()) {
      CXTPReportGroupRow* GroupRow = reinterpret_cast<CXTPReportGroupRow*>(TheRow);

      double Value=0.0;
      
      Value=DoCalculateChildren(TransactionType, GroupRow->GetChilds(), 0.0);
     ...

      NumberFormatter_.str(L"");
      NumberFormatter_ << std::dec << std::fixed << std::setprecision(Precision) << round(Value, Precision);

      auto GroupCaption=fmt::format(L"{} [{}] {} {}", GroupRow->GetCaption().GetString(), Column, NumberFormatter_.str(), Unit);

      GroupRow->SetCaption(GroupCaption.c_str());
      GroupRow->SetFormula(L"x");
    }
  }

Calculation of the summaries for each level and formatting for the group captions including the summary column is correct, but the the higher the level of the group row the more is the caption of the summary column shifted to the right. In level 0 (first group row) the placement is ok!
Here's a screenshot to show the problem:


The problem can be reproduced in v19.1 up to including v20.3! I didn't test older versions.

How can I fix this annoying displacement?

TIA


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net