return "Initial_Table";
}
private String createMasterPage() throws ReportProcessingException
{
final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
final MasterPageFactory masterPageFactory = new MasterPageFactory(predefStyles.getMasterStyles());
final OfficeMasterPage masterPage;
if (masterPageFactory.containsMasterPage("Standard", null, null) == false)
{
masterPage = masterPageFactory.createMasterPage("Standard", null, null);
final CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
final String pageLayoutTemplate = masterPage.getPageLayout();
if (pageLayoutTemplate == null)
{
// there is no pagelayout. Create one ..
final String derivedLayout = masterPageFactory.createPageStyle
(getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
masterPage.setPageLayout(derivedLayout);
}
else
{
final String derivedLayout = masterPageFactory.derivePageStyle(pageLayoutTemplate,
getPredefinedStylesCollection().getAutomaticStyles(),
getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
masterPage.setPageLayout(derivedLayout);
}
final OfficeStylesCollection officeStylesCollection = getGlobalStylesCollection();
final OfficeMasterStyles officeMasterStyles = officeStylesCollection.getMasterStyles();
officeMasterStyles.addMasterPage(masterPage);
}
else
{
masterPage = masterPageFactory.getMasterPage("Standard", null, null);