CSV Subreport does not work

1

Hi everyone.

 

I'm new to Jasper and I have a big problem inserting Subreports from CSV. I've been looking for information for 3 days and can not understand what must I do.

 

I have a dataset named RB1 in csv format, that I need to import to Jasper. In the main report I have no problems, I can import it and show fields as I want.

The problem arises when I need to insert a subreport wirh the same database.

 

I create another report named SUB_1, and link it to the database RB1 as if it was an usual report, and I put the variable COLUMN_0 to be shown in the details section. I previsualize it and it is OK.

 

I go back to the main report and drag the item SUBREPORT to the summary section and select "select an existing report". I choose the report SUB_1 -> NEXT

I select "use same JDBC connection used to fill the master report" -> NEXT

In the Dataset Parameters I clic ADD and write:

     PARAMETER NAME: COLUMN_0

     PARAMETER EXPRESSION: $F{COLUMN_0}

What I'm trying to do is to link the variable COLUMN_0 of the main report with the variable COLUMN_0 in the subreport.

 

Now, when I try to previsualize the report, the subreport does not show.

 

In the Properties of the Subreport I have:

EXPRESSION: "SUB_1"

PARAMETERS MAP EXPRESSION:

CONNECTION EXPRESSION: $P{REPORT_CONNECTION}

DATA SOURCE EXPRESSION:

 

What am I doing wrong? I guess that many things, but could not find any answer online with this in detail in a way that I can understand it.

 

Thank you very much!!!!

ignacio.coca's picture
Joined: Jun 9 2016 - 6:17am
Last seen: 2 years 7 months ago

hp support number (888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801email support number 1(888) 990-8801..outlook support number email help number 1(888) 990-8801email helpline number, outlook customer support number 1(888) 990-8801, outlook customer service number 1(888) 990-8801email support phone number 1(888) 990-8801office setup @ 1(888) 990-8801activate office 365 number 1(888) 990-8801software set-up and install office 2010 number 1(888) 990-8801locate and remove viruses and spyware number 1(888) 990-8801schedule automated virus' spyware' and adware scans number 1(888) 990-8801diagnose and repair software errors 1(888) 990-8801Protect your computer with a firewall 1(888) 990-8801Detect and remove malicious programs 1(888) 990-8801Completely uninstall corrupt OFFICE 2010 repair OFFICE 365 number 1(888) 990-8801macbook support phone number @1(888) 990-8801macbook support phone number @ @1(888) 990-8801apple support number @1(888) 990-8801macbook technical support number @1(888) 990-8801acer technical support number @1.888.990.8801

 

rishabsingh6495 - 3 years 4 months ago

8 Answers:

2

(this should be a comment on previous answer, but for some reason the interface isn't letting me do that)

The "datasource expression" is necessary because these choices you are given are really focused on the data source type.  Since you are using CSV  and not a JDBC connection, you can't use the same JDBC connection.  When you make that choice, it is looking for JDBC and gets confused.  So instead you use a datasource expression, which is for anything-but-JDBC, and set it as above to make the expression point to the same data source as the report. 

elizam's picture
4416
Joined: Mar 5 2012 - 9:19am
Last seen: 6 hours 36 min ago
0

I can not comment your post neither.

 

I do not know if I understood what you said. When I drag the subreport item to the main report, In the Connection type I can choose between:

- Use same JDBC connection used to fill the master report

- Use another connection

- Use an empty Data Source

- Use a JRDatasource expression

 

From what you said, I should use. "use another connection", and write the expression you said. Am i OK?

 

Anyway, when I do this and preview, I get the error: "The method subDataSource() is undefined for the type JRDataSource", so I am doing something wrong.

 

When I started this thread, I thought it could be an error in passing parameters to the subreport, since I am using Fields and not Parameters, but seems that there are too many errors in what I am doing. I really thank you for your answers, since I need to do this for my job and I am really confused.

 

Thank you!!

ignacio.coca's picture
Joined: Jun 9 2016 - 6:17am
Last seen: 2 years 7 months ago

Select "Use a datasource expression" in Connection Type for the subreport

Use the following expression:
       $P{REPORT_DATA_SOURCE}.subDataSource()

javier.ggi90 - 3 years 5 months ago
1

I have not used iReport in a long time so I do not remember the exact user interface but it should be something like this:

     1) click on the subreport    
     2) On the properties window (usually on the right bottom space) at the very end you should have the connection properties
     3) In "Connection Type" select the option "Use a datasource expression"
     4) Another property should activate called called something like "Datasource Expression" and there you should input $P{REPORT_DATA_SOURCE}.subDataSource()

In Jaspersoft Studio you should click on the subreport element and fill the option marked in the image:

If you have any other doubts just ask.

 

Javier

javier.ggi90's picture
Joined: Dec 6 2015 - 1:46pm
Last seen: 2 years 6 months ago
0

Thank you Javier.

 

I already did what you said, but when running the report I get "The method subDataSource() is undefined for the JRDataSource".

 

I tried to put in the expression just $P{REPORT_DATA_SOURCE}, and with this, one of my subreports is half-working: I see part of my data even in the detail section, but not everything (just seeing some of the rows in details). I think I am really lost xD

 

I am using Jaspersoft Studio.

Thank you

ignacio.coca's picture
Joined: Jun 9 2016 - 6:17am
Last seen: 2 years 7 months ago
0

Hello.

 

I have been thinking and looking for info and I think that the problem now could be because of the indices. The point is that when my subreport is used, there is some data that has been used by the main report, so the subreport seems not to work for the first lines. Is that possible?

 

If this is the problem, is there any way to make my subreports to work for all data and not just for the ones that are not used in the main report?

 

Thank you very much!!

I think I am really close to solve it thank to you :D:D

ignacio.coca's picture
Joined: Jun 9 2016 - 6:17am
Last seen: 2 years 7 months ago
0

hello,

did you find a solution for the csv-subreports. I can create only "blank" subreports and everywhere I find posts without a happy end.

If you had success, can you tell me ??

Thanks

Thomas

 

 

my_mailing's picture
Joined: Nov 4 2016 - 1:32am
Last seen: 3 years 5 days ago
0

Hi everyone!

I have the same problem right now. No one found the solution?

BImomo's picture
4
Joined: Feb 17 2015 - 12:20pm
Last seen: 2 years 8 months ago
0

This is jaspersoft bug. This is incapability of Jaspersoft

honeybakliwal's picture
Joined: Sep 8 2010 - 2:37am
Last seen: 1 year 2 months ago
Feedback
randomness