org.jclarion.clarion.print
Class OpenReport
java.lang.Object
org.jclarion.clarion.print.OpenReport
- All Implemented Interfaces:
- PropertyObjectListener
public class OpenReport
- extends java.lang.Object
- implements PropertyObjectListener
Manage printing of report
Some notes about clarion reports:
Withprior and withnext are cumulative.
withprior and withnext will not force a page to completely empty
In clarion implementation - withprior will consider add added
item and recursively scan back. If recursive scan back results in
prior page being completely emptied, then withprior is ignored
In clarion implementation - withnext appears to trigger when
the page is closed. System will identify items on page to move onto
next page based on withnext setting. If withnext would result in
page being completely emptied then withnext skips
Group headers and footers are printed on use var breaks only and
does not pay attention to page breaks
For aggregate activity as follows:
---
Firstly the rules taken from clarion documentation:
Options include: SUM, COUNT, MAX, MIN, AVE
When in a detail structure - is evaluated every time detail structure prints
so provides running value
In group footer - based on detail structures for any detail within the break
that is printed.
In footer - based on any detail on that page only
RESET option specifies break control on which statistic resets.
TALLY option specifies when counting occurs.
PAGE option specifies that statistic resets when page break occurs.
PAGENO option specifies that string is to contain the page number
There are a couple of aspects of the implementation that I am not fully happy
with. Main item is how paging is setup. Paging occurs after individual printing
blocks - details, headers, footers, etc are laid out. As such a second cycle
occurs where things like PROP:PAGENO are recalculated and also SUM, CNT etc are
implemented on page footers. Result is that following are misimplemented:
PROP:PAGE does not work at all
RESET/TALLY on page footers do not work at all
Ideally we want to do two passes - pass one does basic layouts taking items
like withprior and withnext into consideration and and pass two performs
aggregation and aggregation can also tally/reset based on page break activity result
is that PAGE becomes a meaningful reset property for all aggregations and
all agregations are implemented the same - unlike right now where aggregations in
detail and break footers are different from aggregations in the page footer.
But there are even challenges with this - because aggregate result and influence
how blocks on a page layout and thus influence page break triggers. i.e. you can
setup a break on VARX and VARX forms MAX(VARX) so aggregate triggers decision
to break or not which in turn influences page layout in this case - printing of
break headers/footers. Problem - if required to be solved - needs more thought.
- Author:
- barney
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NEWPAGE
public static ReportDetail NEWPAGE
OpenReport
public OpenReport(ClarionReport report)
getReport
public ClarionReport getReport()
getProperty
public java.lang.Object getProperty(PropertyObject owner,
int property)
- Specified by:
getProperty in interface PropertyObjectListener
propertyChanged
public void propertyChanged(PropertyObject owner,
int property,
ClarionObject value)
- Specified by:
propertyChanged in interface PropertyObjectListener
registerTallyListener
public void registerTallyListener(AbstractReportControl control,
ReportStatistic statistic)
registerResetListener
public void registerResetListener(AbstractReportControl control,
ReportStatistic statistic)
isAggregatingField
public boolean isAggregatingField(ClarionObject field)
getStatistic
public ReportStatistic getStatistic(StringControl control)
pageBreak
public void pageBreak()
pageBreak
public void pageBreak(boolean open)
commonAncestor
public ReportContainer commonAncestor(ReportDetail d1,
ReportDetail d2)
print
public void print(ReportDetail detail)
reset
public void reset()
next
public PrintObject next()
previous
public PrintObject previous()
current
public PrintObject current()
peek
public PrintObject peek(int offset)
getPages
public java.lang.Iterable<Page> getPages()
refreshTallyDependencies
public void refreshTallyDependencies()
- public int getPageCount()
{
if (pages==null) init();
return pages.size();
}
getPageFormat
public java.awt.print.PageFormat getPageFormat()
isInit
public boolean isInit()
init
public void init()
init
public void init(java.awt.Graphics graphics)
init
public void init(PrintContext graphics)
print
public void print()
getX
public int getX()
getXScale
public double getXScale()
getYScale
public double getYScale()
getY
public int getY()
getWidth
public int getWidth()
getHeight
public int getHeight()
getBook
public PageBook getBook()
Copyright © 2010. All Rights Reserved.