Jump to content
Changes to the Jaspersoft community edition download ×

Subreport problem


2005 IR Help

Recommended Posts

By: rubenfox81 - rubenfox81

Subreport problem

2005-07-01 02:18

Hi,

I have a subreport and I must visualize only parameters. But if I don't use a datasource the subreport isn't visualized. How I can avoid to use a datasource?

Thanks

 

 

 

 

By: Augustin Boteanu - aboteanu

RE: Subreport problem

2005-07-01 02:29

You can run with an empty datasource from iReport.

Also in the report propertyes window you can set it that when there's no data to print it anyway

 

 

 

 

By: C-Box - c-box

RE: Subreport problem

2005-07-01 02:31

Use "Use Connection Expression" or "Don't use Connection or Datasource" as SubReports DataSourceExpression.....

 

and within your subreport go to the report-properties and set

whenNoData to "All Sections no Detail".

 

Then your parameter should appear (if passed through)

 

hth

C-Box

 

 

 

 

By: rubenfox81 - rubenfox81

RE: Subreport problem

2005-07-01 02:56

Even if I set this options the parameters don't appear.

 

 

 

 

By: C-Box - c-box

RE: Subreport problem

2005-07-01 03:05

In which band did you placed your Parameters???? And are you sure that you pass your parameters really through (from outside to mastereport and from masterReport to Subreport --> use "$P{$P{REPORT_PARAMETERS_MAP} within the parameters map expression in the SubReportElement)

 

like the WhenNoData-Attributes "AllSectionsNoDetail" already says, all bands EXCEPT the DetailBand is printed.... therefore that you don't have any data, you should place your parameters in the title or whatever....

 

besides that you can also use "new JREmptyDataSource(1)" as DataSourceExpression in the SubReport-Element on MasterReportSide. So you do have an empty datasource with one dummy record. (no fields)

 

hth

C-Box

 

 

 

 

By: C-Box - c-box

RE: Subreport problem

2005-07-01 03:06

just "$P{REPORT_PARAMETERS_MAP" of course (copy paste error) :-)

 

C-Box

 

 

 

 

By: rubenfox81 - rubenfox81

RE: Subreport problem

2005-07-01 03:27

Thanks C-Box. My parameters were placed in DetailBand.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...