title: ireport generates pdf and html report with different look and feel? Html and Pdf report not generated with same format
body: <p>I am using jasper report in my liferay custom portlet and i designed my report with ireport 4.7.1 but my problem is why there is vast diffrence in the reports generated with html and with pdf..there is lots of diffrence in rows of reports in html format and pdf format..how can i make both the html and pdf report generated from same jasper file as identical.?i mean with same look and feel..
  following are my snippet of html and pdf report </p>
  
  <pre><code>HTML REPORT
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/dxofn.jpg" alt="HTML REPORT "></p>
  
  <pre><code>PDF REPORT
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/b9nFi.jpg" alt="PDF REPORT"></p>
  
  <p>following is my jrxml file from which i generate .jasper and then generating above two result.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Campaign_Advertise_DateRange_Report" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true"&gt;
      &lt;property name="ireport.zoom" value="0.9090909090909098"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
      &lt;style name="table"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;subDataset name="Table Dataset 1"/&gt;
      &lt;field name="advertisename" class="java.lang.String"/&gt;
      &lt;field name="camp_name" class="java.lang.String"/&gt;
      &lt;field name="ad_location" class="java.lang.String"/&gt;
      &lt;field name="clicked" class="java.lang.Integer"/&gt;
      &lt;field name="impression" class="java.lang.Integer"/&gt;
      &lt;field name="filter_start_date" class="java.util.Date"/&gt;
      &lt;field name="filter_end_date" class="java.util.Date"/&gt;
      &lt;variable name="CamapignTotal" class="java.lang.Integer" resetType="Group" resetGroup="Campaign Name" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{impression}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;variable name="CampaignGrandTotal" class="java.lang.Integer" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{impression}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;group name="Campaign Name"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{camp_name}]]&gt;&lt;/groupExpression&gt;
          &lt;groupFooter&gt;
              &lt;band height="21"&gt;
                  &lt;textField pattern="" isBlankWhenNull="true"&gt;
                      &lt;reportElement style="table_TD" x="419" y="0" width="86" height="20"/&gt;
                      &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="none"&gt;
                          &lt;font isBold="true"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$V{CamapignTotal}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;staticText&gt;
                      &lt;reportElement style="table_TD" x="346" y="0" width="73" height="20"/&gt;
                      &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                          &lt;font isBold="true"/&gt;
                      &lt;/textElement&gt;
                      &lt;text&gt;&lt;![CDATA[Group Total :]]&gt;&lt;/text&gt;
                  &lt;/staticText&gt;
              &lt;/band&gt;
          &lt;/groupFooter&gt;
      &lt;/group&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="114"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="136" y="24" width="283" height="67"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="32" isUnderline="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Campaign Reports]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="2" width="30" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font fontName="Times New Roman" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date : ]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField pattern="MM/dd/yyyy"&gt;
                  &lt;reportElement x="30" y="2" width="100" height="20"/&gt;
                  &lt;textElement textAlignment="Justified"&gt;
                      &lt;font fontName="Times New Roman" isUnderline="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="94" width="30" height="20"/&gt;
                  &lt;textElement textAlignment="Right"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[From:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="136" y="94" width="19" height="20"/&gt;
                  &lt;textElement textAlignment="Right"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[To:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x="30" y="94" width="96" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{filter_start_date}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="155" y="94" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{filter_end_date}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="419" y="94" width="131" height="20"/&gt;
                  &lt;textElement textAlignment="Right"&gt;
                      &lt;font size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Advertise Display Reports]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;image&gt;
                  &lt;reportElement x="458" y="8" width="92" height="53"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA["D:\\Liferay\\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\\liferay-plugins-sdk-6.1.1\\portlets\\eMenuAdvertise-portlet\\docroot\\img\\eMenuLogo.png"]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="52"&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="0" y="31" width="100" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="Times New Roman" size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Advertise Name]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="346" y="31" width="73" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="Times New Roman" size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Clicked]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="250" y="31" width="96" height="20" isPrintInFirstWholeBand="true"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="Times New Roman" size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[AD Location]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="100" y="31" width="150" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="Times New Roman" size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Campaign Name]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="419" y="31" width="86" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="Times New Roman" size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Impression]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/pageHeader&gt;
      &lt;detail&gt;
          &lt;band height="21" splitType="Immediate"&gt;
              &lt;textField&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="0" y="-1" width="100" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="html"&gt;
                      &lt;font fontName="Times New Roman"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{advertisename}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="250" y="-1" width="96" height="22" backcolor="#FFFFFF"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="html"&gt;
                      &lt;font fontName="Times New Roman"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{ad_location}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="419" y="-1" width="86" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="html"&gt;
                      &lt;font fontName="Times New Roman"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{impression}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="100" y="-1" width="150" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="html"&gt;
                      &lt;font fontName="Times New Roman"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{camp_name}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement style="table_TD" mode="Transparent" x="346" y="-1" width="73" height="22"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle" markup="html"&gt;
                      &lt;font fontName="Times New Roman"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{clicked}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;lastPageFooter&gt;
          &lt;band height="50"&gt;
              &lt;staticText&gt;
                  &lt;reportElement style="table_TD" x="346" y="0" width="73" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Grand Total :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="false"&gt;
                  &lt;reportElement style="table_TD" x="419" y="0" width="86" height="20"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$V{CampaignGrandTotal}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/lastPageFooter&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Can any one help me out to make both reports look and feel same ?</p>