yongkang Posted February 20, 2019 Share Posted February 20, 2019 Hi Guys,I have a table like below, and I use jasper report jasperreports-6.5.1.jar to generate the report.Role Name | Role Access Timing | From | ToADMINISTRATOR | 27 Sep 2012 16:00 hrs | 02 Jan 2050 16:00 hrsI had put the 4 labels in "Column Header", when it generated pdf no issue , there is a empty cell next to "Role Name" when generated as excel(before use jasper report 3.7.1 no such issue).Below is my config before generate the report. SimpleXlsReportConfiguration config = new SimpleXlsReportConfiguration(); config.setOnePagePerSheet(true); config.setRemoveEmptySpaceBetweenColumns(Boolean.TRUE); config.setRemoveEmptySpaceBetweenRows(Boolean.TRUE); config.setCollapseRowSpan(Boolean.TRUE);Is there any way to set the "Role Name" rowspan as 2? Link to comment Share on other sites More sharing options...
prusyn Posted February 20, 2019 Share Posted February 20, 2019 Hi, can you post here some screenshots or sample xls export of your current and expected behavior?Regards,Pavlo Link to comment Share on other sites More sharing options...
yongkang Posted February 21, 2019 Author Share Posted February 21, 2019 Hi Pavlo, Below is column header in jrxml:<columnHeader> <band height="60" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="802" height="20" /> <textElement verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Table 1 - Role Access Timing]]></text> </staticText> <staticText> <reportElement style="table" x="0" y="20" width="35" height="40" > <property name="com.jaspersoft.layout.grid.rowspan" value="2"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[s/No.]]></text> </staticText> <staticText> <reportElement style="table" x="35" y="20" width="110" height="40" > <property name="com.jaspersoft.layout.grid.rowspan" value="2"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Role Name]]></text> </staticText> <staticText> <reportElement style="table" x="145" y="20" width="100" height="40" > <property name="com.jaspersoft.layout.grid.rowspan" value="2"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Role Status]]></text> </staticText> <elementGroup> <staticText> <reportElement style="table" x="485" y="40" width="40" height="20" /> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Daily]]></text> </staticText> <staticText> <reportElement style="table" x="365" y="40" width="120" height="20" /> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[To]]></text> </staticText> <staticText> <reportElement style="table" x="245" y="20" width="280" height="20" > <property name="com.jaspersoft.layout.grid.colspan" value="3"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Role Access Timing]]></text> </staticText> <staticText> <reportElement style="table" x="245" y="40" width="120" height="20" /> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1256" isPdfEmbedded="true"/> </textElement> <text><![CDATA[From]]></text> </staticText> </elementGroup> </band></columnHeader> Link to comment Share on other sites More sharing options...
yongkang Posted February 21, 2019 Author Share Posted February 21, 2019 I don't know how to upload the screenshots or attachment with this rich text.current : https://pan.baidu.com/s/1_13hTmIcib9da5PcisU5ugexpect : https://pan.baidu.com/s/19J_vsGBWzs92NAB1FXS12A Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now