Jump to content

Can we export AFP file from jasper reports?


Recommended Posts

HI 

I have created AFP file  using Jasper report  by using below code  and it is able to open in web browser but not in AFP Work Bench Viewer.  .

 private static String destFileName = "sample.afp";

 JasperExportManager.exportReportToPdfFile(jasperPrint, destFileName);

Your timely support on this  appreciated 

Thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Link to comment
Share on other sites

Hello, I am not aware of an AFP exporter in JasperReports, have you implemented your own JREporter implementation for .afp files?
Looking at your code:

private static String destFileName = "sample.afp";JasperExportManager.exportReportToPdfFile(jasperPrint, destFileName);

it seems that you are exporting the report to a PDF file called sample.afp. I'm not sure the AFP Work Bennch Viewer can convert PDF files into a workable format.

To export your report to an AFP format you need to build a custom exporter for it as described in the JasperReports Ultimate Guide (p.246 of https://community.jaspersoft.com/sites/default/files/docs/jasperreports-ultimate-guide-3v2_0.pdf p.234 without counting the index).

I hope this helps

 

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