Jump to content
We've recently updated our Privacy Statement, available here ×

Landscape printing


Recommended Posts

By: Sam - zeus78

Landscape printing

2002-04-26 04:15

Hi,

 

I have switched between height and width of the page in dtd file, but i still got a portrait page when i print.

 

Thanks

 

NB : Excuse my bad english !

 

 

 

By: Dejan - dnikolov

RE: Landscape printing

2002-04-30 03:20

Please show me XML example for landscape printing.

 

 

By: Milan Madzia - habrdak

RE: Landscape printing

2002-05-02 06:05

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://www.jasperreports.com/dtd/jasperreport-0.2.5.dtd">

<jasperReport name="LandscapeReport" columnCount="1" pageWidth="595" pageHeight="842" columnWidth="595" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" printOrder="Horizontal">

<reportFont name="HelveticaBold_36" isDefault="false" fontName="Helvetica" size="24" pdfFontName="Helvetica-Oblique" pdfEncoding="Cp1252" isBold="true" isPdfEmbedded="false"/>

<parameter name="_report_title" class="java.lang.String"/>

<title>

<band height="0" />

</title>

<pageHeader>

<band />

</pageHeader>

<columnHeader>

<band height="0" />

</columnHeader>

<detail>

<band height="595" >

<rectangle>

<reportElement x="0" y="0" width="842" height="595" forecolor="#FFDDDD" backcolor="#FFDDDD"/>

<graphicElement stretchType="NoStretch"/>

</rectangle>

<textField>

<reportElement x="0" y="10" width="842" height="90" >

</reportElement>

<textElement textAlignment="Center">

<font reportFont="HelveticaBold_36"/>

</textElement>

<textFieldExpression class="java.lang.String">"top center"+""</textFieldExpression>

</textField>

<textField>

<reportElement x="15" y="60" width="400" height="90" >

</reportElement>

<textElement textAlignment="Left">

<font reportFont="HelveticaBold_36"/>

</textElement>

<textFieldExpression class="java.lang.String">"left "+""</textFieldExpression>

</textField>

 

<textField>

<reportElement x="0" y="60" width="822" height="90" >

</reportElement>

<textElement textAlignment="Right">

<font reportFont="HelveticaBold_36"/>

</textElement>

<textFieldExpression class="java.lang.String">"right"+""</textFieldExpression>

</textField>

<textField>

<reportElement x="0" y="500" width="842" height="90" >

</reportElement>

<textElement textAlignment="Center">

<font reportFont="HelveticaBold_36"/>

</textElement>

<textFieldExpression class="java.lang.String">"somewhere down "</textFieldExpression>

</textField>

</band>

</detail>

<columnFooter>

<band height="0" />

</columnFooter>

<pageFooter>

<band height="0" />

</pageFooter>

<summary>

<band height="0" />

</summary>

</jasperReport>

 

 

 

 

By: Milan Madzia - habrdak

RE: Landscape printing

2002-04-29 22:23

http://sourceforge.net/mailarchive/forum.php?thread_id=656563&forum_id=7912

 

 

By: Teodor Danciu - teodord

RE: Landscape printing

2002-05-14 00:04

 

Hi,

 

In the new 0.3.0 version there is an attribute

"orientation" in the "jasperReport" element.

 

It accepts two values : "Portrait" or "Landscape".

 

There is also a sample provided for landscape documents.

 

Good luck!

Teodor

Link to comment
Share on other sites

  • 2 years later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Teo,

 

I'm using iReport 3.0.0 version.

In report properties have set Landscape option,but still in my pdf generated report i find portrait option checked by default in print properties..why?

Can you please guide to fix this issue.

I tried using jasper.setOrientation code in jsp too.

I tried modifyinf the width and height values..still i face this issue.

I use a master and sub report both the report properties set as landscape.

waiting for your reply,

 

Thx,

Ani

Link to comment
Share on other sites

honeyani
Wrote:
 

Hi Teo,

 

I'm using iReport 3.0.0 version.

In report properties have set Landscape option,but still in my pdf generated report i find portrait option checked by default in print properties..why?

Can you please guide to fix this issue.

I tried using jasper.setOrientation code in jsp too.

I tried modifyinf the width and height values..still i face this issue.

I use a master and sub report both the report properties set as landscape.

waiting for your reply,

 

Thx,

Ani

My master report jrxml header,

<jasperReport
   name="XXX_General"
   columnCount="1"
   printOrder="Vertical"
   orientation="Landscape"
   pageWidth="1472"
   pageHeight="1471"
   columnWidth="1436"
   columnSpacing="0"
   leftMargin="8"
   rightMargin="28"
   topMargin="28"
   bottomMargin="28"
   whenNoDataType="NoPages"
   isTitleNewPage="false"
   isSummaryNewPage="false">

sub report jrxml header

 

<jasperReport
   name="YYY_General_Detail"
   columnCount="1"
   printOrder="Horizontal"
   orientation="Landscape"
   pageWidth="1474"
   pageHeight="1474"
   columnWidth="1474"
   columnSpacing="0"
   leftMargin="0"
   rightMargin="0"
   topMargin="0"
   bottomMargin="0"
   whenNoDataType="NoPages"
   isTitleNewPage="false"
   isSummaryNewPage="false">

what mistake i have commited (to fix landscape orientation)?

 

Link to comment
Share on other sites

honeyani
Wrote:
 

honeyani
Wrote:
 

Hi Teo,

 

I'm using iReport 3.0.0 version.

In report properties have set Landscape option,but still in my pdf generated report i find portrait option checked by default in print properties..why?

Can you please guide to fix this issue.

I tried using jasper.setOrientation code in jsp too.

I tried modifyinf the width and height values..still i face this issue.

I use a master and sub report both the report properties set as landscape.

waiting for your reply,

 

Thx,

Ani

My master report jrxml header,

<jasperReport
   name="XXX_General"
   columnCount="1"
   printOrder="Vertical"
   orientation="Landscape"
   pageWidth="1472"
   pageHeight="1471"
   columnWidth="1436"
   columnSpacing="0"
   leftMargin="8"
   rightMargin="28"
   topMargin="28"
   bottomMargin="28"
   whenNoDataType="NoPages"
   isTitleNewPage="false"
   isSummaryNewPage="false">

sub report jrxml header

 

<jasperReport
   name="YYY_General_Detail"
   columnCount="1"
   printOrder="Horizontal"
   orientation="Landscape"
   pageWidth="1474"
   pageHeight="1474"
   columnWidth="1474"
   columnSpacing="0"
   leftMargin="0"
   rightMargin="0"
   topMargin="0"
   bottomMargin="0"
   whenNoDataType="NoPages"
   isTitleNewPage="false"
   isSummaryNewPage="false">

what mistake i have commited (to fix landscape orientation)?

 

PageWidth and Height values i tried with 842 & 595 on both reports...still i get potriat only...any inputs?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...