How To Print Text Between Databands ?

I need to produce a report that has the following:

Report Title

Header with Column Titles & Section Sub-heading
MasterDataBand 1 - Payments
MasterDataBand 2 - Receipts

Footer with totals of above

Header with Section Sub-Heading
MasterDataBand 3 - Payments
MasterDataBand 4 - Receipts

Report Summary with various information

I have everything working except for the Header between MasterDataBands 2 &3.

The text is on the Header but it just will not print. ;)

I need to get this finished quickly, so I'll be grateful for any assistance.

Comments

  • dschuchdschuch Dresden,Germany
    edited January 2006
    mistake
  • dschuchdschuch Dresden,Germany
    edited 9:00AM
    Make a supreport for

    MasterDataBand 1 - Payments
    MasterDataBand 2 - Receipts


    and one Subreport for the others. This will work.

    Daniel
  • edited 9:00AM
    Sorry to take so long to get back here. Other things took over, unfortunately.

    I've tried what you suggested and, investigating further, it seems that the problems are when there is no data in a given dataset e.g.

    On 1st subreport if there is no data to be printed for MasterDataBand 2 then the footer will not be printed

    On 2nd subreport if there is no data to be printed for MasterDataBand 3 then the header will not be printed

    When there is data present in all MasterDataBands then everything works as expected, as soon as a band has no data available then headers/footers are not printed.

    I believe I have set all the PrintIfEmpty options for Page, databands etc but I still can't get this work.

    Do you have any other ideas as to what I might be missing here.

    Thanks very much for your help.

  • gordkgordk St.Catherines On. Canada.
    edited 9:00AM
    Hi Graham
    here is somthing you can try
    for the master band set print if detail empty move the subreport into a detailband do not associate the detailband to a dataset set its rowcount to 0.
    ;)
  • edited 9:00AM
    Hi Gord

    We're getting there, I had to associate the detailbands to datasets to get the data printed.

    I now seem to have discovered, by accident using a different set of data, that the case is:

    If the first masterband on the subreport is NOT empty, then the header, data & footer(i.e. totals) are printed correctly, even if the second masterband IS empty.

    OTOH, if the first masterband on the subreport IS empty, then nothing is printed for that subreport, even if the second masterband on the subreport is NOT empty, so I get no header, data or footer in this case.

    Do you have any more ideas on this one? ;)

    Thanks a lot for your help.
  • gordkgordk St.Catherines On. Canada.
    edited 9:00AM
    Hi Graham
    Your are probably using the wrong bands for what you want to achieve.
    just from the description of whats on the masterbands, i would expect payments and receceipts to be detaildata belonging to either orders or customers as the master.

    I need to know how your data is related and how it is connected to the report,
    table or query
    ;)
  • edited 9:00AM
    Hi Gord

    Quite possible, I'm still learning with FR. I'll try and give you a quick synopsis of what I'm trying to do.

    Basically it's a reconciliation of a bank account, from an accounting app which has an ODBC driver that is not ODBC standards compliant. Therefore I extract the info I need to my own compliant db using combined queries/delphi programming.

    Bottom line, the info doesn't actually have any relationships with such as customers, orders etc.

    The report bands are populated by a separate query for each band:

    1) Unreconciled debits(payments)
    2) Unreconciled credits(Receipts)
    3) Reconciled debits(payments) after reconcilation date
    4) Reconciled credits(receipts) after reconciliation date

    The queries are run against my own db memory table which holds all info for a given bank account extracted from the accounting app.

    Queries 3 & 4 would not be very common but they do happen and are needed to show proof to accountants that the accounting app bank balance and the bank statement balance differ by the totals of these queries, after the relevant arithmetic, of course.

    The reason it's so complicated is that I need to use ABS and other common commands/functions in queries and the accounting app ODBC driver does not support them.

    Sorry to drivel on but I hope it makes it clearer what I am trying to achieve.
  • gordkgordk St.Catherines On. Canada.
    edited 9:00AM
    there are many possibilities here.
    first remember that a band is only a place holder on the design page
    even tho we have a master and detail band names they are not necessarily related to master/ detail data only 2 each others position on the outputpage.
    think data level1 datalevel2 and so on
    ie masterdata1 prints rec1 followed by all the detail records then prints masterdata record2 followed by all the level2 data records.
    the number of times a band prints is controlled by either the number of recs avail in the datasource of the frxdbdataset to which the band is connected, or frxuserdataset or a static rowcount
    the data relationship is controlled at the table/query level.
    when a masterdaband is placed on the design page it must have data or a rowcount or nothing will be produced.
    here is a posible layoutt
    mdb header
    mdb1 rowcount 1
    det1headr
    detail1) Unreconciled debits(payments)
    det1footer
    det2header
    detail2) Unreconciled credits(Receipts)
    det2footer
    mdb1footr
    repeat the same type of set up for items below
    mdb2 rowcount 1
    detail3) Reconciled debits(payments) after reconcilation date
    detail4) Reconciled credits(receipts) after reconciliation date

    with that said their is the possibilities of using nested grouping
    one joined query retreiving all data from all the tables with and orderby clause that will order the data in the order of the groupheaders field conditions

    you could probably simplify your queries needs of abs as fr has the abs function supplied and a memo can contain expressions ie
    [abs(<dataset."fieldname")]
    or display format for a memo can be set
    sounds like i'm prattling on also

  • edited 9:00AM
    Hi Gord,

    You're certainly giving me some ideas to do plenty of lateral thinking about. Some things I'm wondering why I didn't think of before and, could well make it easier in the long run.

    One thing that had me stumped was that I can't figure out how to print things in certain columns e.g. print debits in one column and credits in another.

    Hmm, if I leave the arithmetical sign intact in the data instead of using abs() on it before getting to the report I wonder if it's possible to set the data band up to print in one column if the value is a plus one or the other column if it's a minus value. Would you happen to know if this can be done?

    Thanks again for the really valuable help, I must try and make time to get deeper into FR, unfortunately I seem to be accountant driven at the moment.
  • gordkgordk St.Catherines On. Canada.
    edited 9:00AM
    Hi Graham.
    yes its that time of year.
    if you want to control the band position read the chapter on using the engine object in the user manual.
    the real question is, do we wanto to move the position of the band or the memo that contains the datafield, either way write code in obp event of the band or the object to modify an objects properties. seemingly lazyway use 2 memos containing same field in obp of band test the datafield value against 0 set the visible prop of the memos accordingly, unfortinately you will also then need to add your own variables to track totals.
    ;)
  • edited 9:00AM
    Hi Gord,

    Just after I sent the post I started thinking along your lines. I found the question was, if I use the same field in 2 memos, which one do I want to have printed, credit or debit. This would simplify the queries I am using. As I'm already using variables to track certain totals using more is not a problem.

    Maybe it's this cold weather here in Scotland, though IIRC it's a lot colder where you are, Canada right?

    Again thanks a lot for all the kind help.
  • gordkgordk St.Catherines On. Canada.
    edited 9:00AM
    Actually we are having an unusually mild winter I'm in St.Catharines Ont.
    just outside Niagara falls yesterday was +8c. normally would be -8 and a foot of snow, today rain, east coast of Canada is getting really bad cold and snow.

    From an accounting view there isn't a report that can't be handled in FR, that is it's root of origin. Fr Is a very powerfull tool, i started using it in my accounting apps way back at it's inception 5 or 6 years ago. the biggest concepts to get in hand are where and when the bands print and when the events fire.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.