if(content instanceof IAutoTextContent) { IAutoTextContent autoText = (IAutoTextContent)content; if ( autoText.getType() == IAutoTextContent.TOTAL_PAGE ) { autoText.setText(String.valueOf(reportDoc.getPageCount())); } }
	protected void initializeContent( IContent content )	{		// set up the report content		content.setReportContent( reportContent );		// set up the design object		InstanceID id = content.getInstanceID( );		if ( id != null )		{			long designId = id.getComponentID( );			if ( designId != -1 )			{				Object generateBy = findReportItem( designId );				content.setGenerateBy( generateBy );				if ( generateBy instanceof TemplateDesign )				{					TemplateDesign design = (TemplateDesign) generateBy;					if ( content instanceof ILabelContent )					{						ILabelContent labelContent = (ILabelContent) content;						labelContent.setLabelKey( design.getPromptTextKey( ) );						labelContent.setLabelText( design.getPromptText( ) );					}				}			}		}	}