master-detail (detail dies)

Hi,

I have a master-detail report using dbx components built into the designer and am coordinating them using parameters. Everything works fine until the report hits a detail for which there are not records. Every master that follows the offending one returns no detail. I have print if detail empty turned on.

master table
Field1
A
B
C
D
E

detail table
field1 field2
A dtail1
A dtail2
B dtail3
D dtail4
E dtail5

Report
A
dtail1
dtail2
B
dtail3
C
D
E

If i alter the master query to include AND FIELD1<>'C' then I get

A
dtail1
dtail2
B
dtail3
D
dtail4
E
dtail5

Its as if when the detail fails, the query becomes disfunctional.

Any ideas?



Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:27PM
    Hi
    i expect this may be your problem.
    If i alter the master query to include AND FIELD1<>'C'
    this wil now return only records where field 1 is not c
    you may want to use a where clause
    regards ;)
  • gordkgordk St.Catherines On. Canada.
    edited 10:27PM
    I for got to mention
    in running the report it would be probably cause a problem if you alter the query of the masterdetail band
  • edited 10:27PM
    I think you are missing the point. The original master/detail report that is generated does NOT return details for D and E. When it encounters a master record which contains no detail, all subsequent details are not working. When I alter the query to exclude the master record which has no details and rerun the report, the problem disappears, which is what leads me to the conclusion that masters that don't have details are the problem. Im making the assumption that fast reports should work with masters that contain no detail since there is a property to suppress printing of the master when there is no detail.

    master query
    SELECT field1 from master_table

    DETAIL query
    SELECT dtail from detail_table where field1=:param1
  • gordkgordk St.Catherines On. Canada.
    edited 10:27PM
    Hi
    I may well have missed it
    but check your querys on the dialog form
    is the datasource property of the detail query set to query1 and the paramater property set with masterdata option.
    regards
    gord ;)

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.