Jump to content
We've recently updated our Privacy Statement, available here ×

HOW TO ADD CSV TO SUBRREPORT? OR HOW TO ADD 2 SAME FILE CSV TO JASPERSOFT?


Recommended Posts

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

In Jaspersoft Studio, open or create the main report where you want to include the subreport.
Create a new subreport within the main report.

Design the Subreport:

Open the subreport in the subreport editor.
Drag and drop a "Table" component onto the subreport design.
In the "Dataset and Query" tab of the subreport editor, create a new dataset and configure it to use the CSV file as its data source.

Hope this will helps you !!

Link to comment
Share on other sites

Could you tell me step by step what to do/click? maybe I'm making a mistake somewhere...

When I create subreport in main report and add source "csv file"and choose "Don't use any connection or Data Source" or "Use another connection" - then I didn't see anything. I see only fields from my database in main report. But when I choose "use a Empty datasource" or "use a JRDatasource expression" then I see names of columns but no data. Same problem I have when I create table...

 

 

image.png

image.png

image.png

image.png

Link to comment
Share on other sites

I have already managed to create a CSV and Postgresql report. However, I don't know how to create a report so that the main report contains Postgresql/Mssql and the subreport contains csv?

 

And second question is, how to publish this report in JasperReports Server? How to add datasource CSV file? please help quickly.

Link to comment
Share on other sites

Hello,


To access subreport from main report, kindly refer to below wiki article :

https://community.jaspersoft.com/knowledgebase/getting-started/subreports-jaspersoft-studio/


Kindly follow the steps listed in below article to publish the report into Jasperserver.

https://stackoverflow.com/questions/32067762/how-to-publish-report-from-jasper-studio-to-jasper-server
https://community.tibco.com/s/article/Publishing-a-Report-to-JasperReports-Server

Video tutotial on how to publish the report on Jasperserver.

https://www.youtube.com/watch?v=0MxYqckeP_s


Additionally, you can also try below approach to have csv datasource on Jasperserver.

Please refer to the 4.12 section- "File Datasource" of TIBCO JasperReports Server Administrator Guide.
https://docs.tibco.com/pub/js-jrs/8.0.1/doc/pdf/TIB_js-jrs_8.0.0_Admin-Guide.pdf

To enable file data sources in the UI:
1. Open the file .../WEB-INF/applicationContext-remote-services.xml for editing.
2. Locate the element <util:set id="customDataSourcesToHide">.
3. Comment out the file data sources you want to display.

   <!-- <value>textDataSource</value> -->
   
4. Save the file and restart JasperReports Server.


Hope this finds you helpful !!

Link to comment
Share on other sites

I probably have different version because I don't have this file  .../WEB-INF/applicationContext-remote-services.xml for editing.

Should I add csv datacource like this??  image.thumb.png.796ee55af4d994d05b992eaeceaa12ac.png

 

What to enter in the field? because of this it gives me an error. 

Also I try add csv parameters from this 

 but I still have a problem..

I will be grateful for help

Link to comment
Share on other sites


Not sure, how you don't see : .../WEB-INF/applicationContext-remote-services.xml in your environment.
Type should be text.


Also, If you can go through the article then these 2 are nothing but the subreport.
EmailReport.jrxml and PhoneReport.jrxml
 

Link to comment
Share on other sites

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