Problems with formatting in (Digital Metaphors) Report Builder

Posted on 2003-03-08
Medium Priority
Last Modified: 2010-04-04
i have problems with formatting in report builder - I have to print a master-detail report and do some calculations. In the master table there are records which do not necessarily have related records in the detail table (this is important for the formatting; i'll show by example). Each record in the master and the detail table has a field "amount to pay" and "amount payed". The first refers to the amount of money that is to be payed for this account, and the second is the amount already payed. However, the fields "amount payed" in the master table and the related field(s) "amount to pay" in the detail table are always 0 (so the record in the master table holds information of the amount to pay, and the records in the detail store information on payements for that account). I have to display the difference between the "amount to pay" and the "amount payed" (in the example i'll call that field "difference" ).


  accountNo    "amount to pay"    "amount payed"  "remaining"  
MR   1             10000                 0           10000    <--(has no detail records)
MR   2             50000                 0                    <--(has 2 detail records)
DR   2               0                 10000                  <--(first detail record)
DR   2               0                  5000         35000    <--(second detail record)

MR - master record, DR - detail record

In the above example i showed how two accounts should be printed. As you can see the field "remaining" isn't printed in the first two records of the second example. The problem is: How can i set (which properties/code) the "remaining" field to achieve that effect? The problem is that i print the master record and then in a subreport the reamining related fields (if there are any, as in the second example). So, in the first example i should somehow evaluate if the subreport is empty and then simply display the value (10000); in the second, i should display the result only when also the related records in the detail table are printed (50000-10000-5000=35000).

I think i should use (well, i already use :-) two TppVariable fields - one in the main report's detail band (if there aren't any related fields in the detail table), and the other in the subreport's detail band, but the problem is how to corectly show and hide them.

Any suggestions would be GREATLY appreciated.


Question by:mario_34
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 8095586
Sorry if the example isn't displayed correctly...

Accepted Solution

ITugay earned 1000 total points
ID: 8102273
Hi Mario,

at first, I think that would be good always place "remaining" in detail band instead of subreport and switch an appearence. It make report's format "fixed" and more readable. The problem is in counting value before details printed. I hope you can add some extra text in your SQL statement to calculate "remainig" for details. This is the way I would use.


Expert Comment

ID: 9316886
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 10090417
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: ITugay

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.


EE Cleanup Volunteer

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question