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 7442441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:10:31+00:00 2026-05-29T11:10:31+00:00

What I am trying to do is seemingly simple. I have a master report

  • 0

What I am trying to do is seemingly simple.

I have a master report that includes a subreport element. The subreport is populated from a JRAbstractBeanDataSource, that has a collection of 0-n subreports in it.

In the master report, the subreport is found with:

<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + $F{subReportFileName}]]></subreportExpression>

This works fine, SUBREPORT_DIR is passed in as a param to the datasource in the code.

What I need to do though, is select a different report name, based on the subreport properties, something like:

<subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "$F{subReportFileName}"]]></subreportExpression>

That is, allow each item in the collection of subreport datas on the datasource specify what the .jasper filename will be (that is, allow it so select which subreport to use).

Maybe there is a better way to think about/approach this.

  • 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-05-29T11:10:32+00:00Added an answer on May 29, 2026 at 11:10 am

    I was trying to find a way to set the report name as the master report iterated over the date source items. Instead I just made the query completely dynamic, passed in as a param. That’s what I really needed to change for each sub-report.

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

Sidebar

Related Questions

I am trying to complete a seemingly simple task that has turned into a
I'm trying to do something seemingly simple: ensure that Application_BeginRequest is called for every
I am trying to implement something seemingly very simple, and I have been beating
Good day once again. I have a (seemingly) simple problem. I'm trying to display
I have been trying to get this seemingly simple problem fixed for about half
I am trying to do something seemingly simple, yet having problems. Basically, I have
I'm stumbling over myself trying to get a seemingly simple thing accomplished. I have
I'm stuck with a seemingly very simple app that I'm trying to develop Basically,
I am trying to do a seemingly simple thing, but having trouble accomplishing it.
I'm trying to do a seemingly simple webpage layout, but I'm hitting a wall.

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.