Link to home
Start Free TrialLog in
Avatar of mario_34
mario_34

asked on

Problems with formatting in (Digital Metaphors) Report Builder

Hi,
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" ).

Example:
¨¨¨¨¨¨¨¨

  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.

Thanx



Avatar of mario_34
mario_34

ASKER

Sorry if the example isn't displayed correctly...
ASKER CERTIFIED SOLUTION
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mario_34:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
https://www.experts-exchange.com/help/closing.jsp

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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer