Home Subreports

Different orientation and position of subreport

edited July 2005 in Subreports
I've searched through this and the "general" lists and haven't qhite
found what I need...

I'm printing manufacturing work orders in portrait mode in the main
report.

I need to print a drawing (TppImage), ONCE per work order, in landscape
mode. Of course, some departments want the drawing BEFORE the work
order, some departments want the drawing AFTER the work order .

I've seen how creating a section type subreport will allow me to have
different page orientation.

There is a group set on work_order_no, start new page = true, group
header reprint on next page = true.

The data looks something like:
dwgNm WONo parentItem childItem
ABC.DWG 1000 ABC A
ABC.DWG 1000 ABC B
ABC.DWG 1000 ABC C

(that is, "denormalized").

In the group header I print WONo and parentItem. In the detail band I
print the material used in this work order.

I thought I might add the subreport to the page header, and only print it
if we're at the first page of any given work order. Question: How do I
determine if group header is at relative page 1 (if I print the header,
is this now page 2)?

If there is NO dwgNm assigned, how do I inhibit display of header and
subreport?

There is no group footer, but there is a page footer (prints report date-
time and page number). If user should decide they want the drawing AFTER
the work order, should I use a second subreport (inhibit the first) or
change the parent of the "image" subreport?

Can you suggest another way to get this behaviour?

TIA.

Cheers,
EdB

Comments

  • edited July 2005

    I would approach this as follows:

    Data access....

    - create a main query that contains the list work orders (i.e. a summary
    dataset).
    - link the detail data to the main query (i.e. master/detail relationship)
    - you can set detail datapipeline.SkipWhenNoRecords to true/false to control
    whether a master record is included in the report when there is no detail.
    - you can use a sql search criteria on the main and/or detail query to
    control whether you include records that do not dwgNm assigned.

    Report layout....

    - main report connected to the main query
    - section subreport connected to the work order detail query
    - section subreport to print the drawing

    The section subreports will print in z-order. Prior to the report
    generating, you can call subreport.BringToFront to move a subreport to the
    end of z-order and SendToBack to move it to the front of z-order.







    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2005
    Hi Nard - see the very last paragraph for an actual question (the rest is
    background on what I'm doing).

    EdB

    In article <42e656cc$1@dm500.>, "Nard Moseley \(Digital Metaphors\)"
  • edited July 2005
    In article <42e656cc$1@dm500.>, "Nard Moseley \(Digital Metaphors\)"
  • edited July 2005
    Hi Ed,

    Section Subreports by definition will start their own page when encountered.
    Is there anything else inside the group header in your report that may be
    printing before the Section subreport? In order to get the results you are
    after the section subreport will need to be alone inside the group header
    band. If you need, try creating another group to isolate the subreport.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    In article <42e79575$1@dm500.>, "Nico Cizik \(Digital Metaphors\)"
This discussion has been closed.