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

  • SEARCH
  • Home
  • 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 8370557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:56:29+00:00 2026-06-09T13:56:29+00:00

I have design report using iReport . In this report I have one custom

  • 0

I have design report using iReport. In this report I have one custom function which takes year and the month as input and return max days in that month.

This method using java.util.Calendar API internally to get max days in the given month and year.

This reports works fine with iReport, but as soon as I import this report in JasperReports Server I am getting this exception.

Error Message

java.lang.IllegalStateException: Processor of type com.jaspersoft.jasperserver.war.cascade.handlers.converters.DataConverter for class 

java.util.GregorianCalendar not configured

How to resolve this issue in JasperReports Server? How to configure this class in JasperReports Server?

  • 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-09T13:56:31+00:00Added an answer on June 9, 2026 at 1:56 pm

    After researching for above problem, I myself manage to work it out.
    I have looked into the data converters configuration of JasperServer but there is no as such Data converter available for Calendar class.

    To best way I have found is that to create you custom class in which write your whole logic that you want to perform with java Calendar class and package it into jar. Now use use that jar API directly to solve you purpose.

    In my case I wanted to calculate the reporting period (Time period for which I am generating report). For me the input for this result was month and the year for which I am generating the reports. So below is my code snippet I have written

    public static String calculateReportingPeriod(String year, String month,
                String dateFormat) {
            String reportingPeriod = new String();
            Calendar calendar = Calendar.getInstance();
            if (year == null || year.isEmpty()) {
                Integer lyear = Calendar.getInstance().get(Calendar.YEAR);
                year = lyear.toString();
            }
            if (month == null || month.isEmpty()) {
                Integer lmonth = Calendar.getInstance().get(Calendar.MONTH);
                /**
                 * -1 because report in generate for previous month
                 */
                lmonth = lmonth - 1;
                month = lmonth.toString();
            } else {
                Integer lmonth = Integer.parseInt(month);
                lmonth = lmonth - 1;
                month = lmonth.toString();
            }
            if (dateFormat == null || dateFormat.isEmpty()) {
                dateFormat = DATE_FORMAT;
            }
            /**
             * calculating max days in the given month and given year
             */
            calendar.set(Calendar.YEAR, Integer.parseInt(year));
            calendar.set(Calendar.MONTH, Integer.parseInt(month));
            Integer maxDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    
            calendar.set(Integer.parseInt(year), Integer.parseInt(month),
                    START_DATE);
            Date reportingStartDt = calendar.getTime();
            reportingPeriod = new SimpleDateFormat(dateFormat)
                    .format(reportingStartDt);
            reportingPeriod = reportingPeriod.concat(EMPTY_STRING);
            reportingPeriod = reportingPeriod.concat(DASH_SEPERATOR);
            reportingPeriod = reportingPeriod.concat(EMPTY_STRING);
            calendar.set(Calendar.DATE, maxDays);
            Date reportingEndDt = calendar.getTime();
            reportingPeriod = reportingPeriod.concat(new SimpleDateFormat(
                    dateFormat).format(reportingEndDt));
            return reportingPeriod;
        }
    

    Then I have used this jar in both iReports as well as in JasperServer to get the desired result from the input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this design which I cannot seem to get right, I would like
In report design, I have 2 tables (Current and Proposed) the structure like this:
I have a C# program that generates a report (designed using the Report Design
i have a report page that is using a stored procedure.In design view i
I'm new to JasperReports. I'm designing a report using iReport. I have three values
I have to design a GUI using Qt. I would like to draw multiple
I have to design a form with an input inside it. I use background
I have a question about usability/design. I currently am using some JQuery to hide/show
I have created a project with a simple RDLC report in ASP.NET which when
I have an issue with a report using ReportBuilder 7.X in an application built

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.