Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9167239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:20:29+00:00 2026-06-17T15:20:29+00:00

I am developing a pdf report using DynamicJasper API . As per requirement I

  • 0

I am developing a pdf report using DynamicJasper API.

As per requirement I have to display one logo at header and other at footer. I am able to display logo at header by using DynamicReportBuilder.addImageBanner method. But i didn’t find a way to add an image at footer.

I saw some threads regarding this issue in dynamic-jasper forum , the one work around which mentioned there is to create a jrxml template with pageFooter band.

I tried this, but didn’t work out. I got following exception:

org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed

Following is the code which generate report.

  1. Creating a dynamiceReport object
  2. Creating a jasperPrint object
  3. Invoking a method which create report based on the format type. Here i have to pass jasperPrint object, which has jrxml representation, target file location and report format type.
// ...
    DynamicReport dynamicReport = buildDynamicReport(reportTemplate, grpFields);

    // build jrxml <br/>
    JasperPrint jasperPrint = buildJRXML(dynamicReport, dataSource, reportFormat);

    // export the report into specific target format <br/>
    exportReport(jasperPrint, targetReportFile, reportFormat);
// ...

private DynamicReport buildDynamicReport(Template reportTemplate,
                                         Vector<String[]> groupFields) throws ServiceException {
    /** code to generate DynamicReport object. */
    dynamicReportBuilder.setTemplateFile("jrxml/report-footer.jrxml");
    DynamicReport dynamicReport = dynamicReportBuilder.build();

    return dynamicReport;
}

Any help would be appreciate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:20:31+00:00Added an answer on June 17, 2026 at 3:20 pm

    Since the dynamicjasper’s ClassicLayoutManager class applies all image banners to only header band by default, there does not seem to be a straight forward way of achieving this.

    One workaround is to use a custom layout manager implementation – extending ClassicLayoutManager and overriding the applyBanners() method.

    public class CustomLayoutManager extends ClassicLayoutManager {
    
        protected void applyBanners() {
            super.applyBanners(); //let the ClassicLayoutManager apply header banners
    
            // explicitly add banner to footer band..
            JRDesignBand pageFooter = (JRDesignBand)getDesign().getPageFooter();
    
            // if there is no footer band we create one
            if(pageFooter == null) {
                pageFooter = new JRDesignBand();
                getDesign().setPageFooter(pageFooter);
            }
    
            Vector<ImageBanner> vImageBanner = new Vector<ImageBanner>();
            vImageBanner.add(new ImageBanner("yourlogoimage.ext", 120, 50, ImageBanner.ALIGN_LEFT));
    
            applyImageBannersToBand(pageFooter, vImageBanner, null);
        }
    }
    

    and then use the custom class in while generating the report..

    JasperPrint jasperPrint = DynamicJasperHelper.generateJasperPrint(dynamicReport, new CustomLayoutManager(), parameters);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a desktop application for pdf file management using C#. When I
I'm using a barcode font (IDAutomationMC39H) in an SSRS 2005 report I'm developing, and
Hi I am developing an ipad Magazine app where I need to display pdf
I am developing one application using C# for processing MSWord files. My application gets
I have stucking in my application. I have developing a pdf viewer application. I
I am developing an application which render a PDF file using CoreGraphics. I am
I am developing one application. In that I'am loading the pdf in uiwebview like
I am developing an pdf reader in which i have to load each page
I am developing a custom PDF reader for ipad.I have taken a UIScrollView and
I am developing an application in which i have to create multi page PDF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.