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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

621 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