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

The Archive Base Latest Questions

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

I need to pass to my subreport a dataSource with help of master report’s

  • 0

I need to pass to my subreport a dataSource with help of master report’s List<String> parameter. I don’t know what is a type of dataSource is correct and how to get value in subreport.

The snippet from my master report:

<parameter name="seznamPriloh" class="java.util.List" isForPrompting="false"/>
....
<subreport>
    <reportElement x="0" y="56" width="555" height="76"/>
    <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{seznamPriloh})]]></dataSourceExpression>
            <subreportExpression><![CDATA[cz.alis.keong.jasjdr.reporting.ReportCompiler.compile("R79_SeznamPriloh")]]></subreportExpression>
</subreport>

The snippet from my subreport:

<detail>
    <band height="23">
        <textField>
            <reportElement x="56" y="3" width="100" height="20"/>
            <textElement/>
            <textFieldExpression><![CDATA[$F{}]]></textFieldExpression>
        </textField>
    </band>
</detail>

Please advise me how to pass the datasource to subreport via master report’s parameter of java.util.List<String> type.

Edit: 08.14 14:20
Add Tags to Java

Edit: 08.14 15:30
relates with How do I print a list of strings contained within another list in iReport? and works for 4.5.0 And List<String>

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

    You have to specify what field you’re using in your sub report. You are passing $F{} and as you are passing a List<String> as a DataSource you should put $F{_THIS}. Of course you have to add a field with that name too, only doing that you can use the expression $F{somefield}.

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

Sidebar

Related Questions

I need to pass to my subreport a list of integers which will be
I need pass a string parameter that contains many params. When receive the parameter,
I need to pass a parameter as two int parameters to a Telerik Report
I need to pass an extra parameter :mobilejs => true from jQuery to a
I need to pass a parameter from an EditText and when I click the
I need to pass data to a variable in my master page each time
I need help explaing the following example below (c) CommonsWare. I know it makes
I'm using SmartPart 1.3 to develop web-parts to SharePoint. I need pass parameter to
Need to pass get parameter without value and without = symbol to utilize external
I need to pass a function as a parameter in Bash. For example, the

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.