srang Posted March 31, 2015 Share Posted March 31, 2015 I am working on an embedded app using jasperserver-pro 6 for aws, using a combination of java rest controllers and visualize.js. I was working on setting up a CSVMetadataExporter and followed the documentation, adding it to the `flows/viewReportBeans.xml` and then commented out the others (we only want the slimmed down csv export option) but for some reason when I looked at a report's export options returned by visualize I was getting a completely different list. After much confusion and searching I found the files `applicationContext-web-services.xml` and `applicationContext-remote-services.xml` both of which have their own list of exporter maps and bean configurations... I'm playing around with how/if these relate to eachother and how that corresponds to what is returned by visualize but I was wondering if anyone here understood the reasoning for three lists of exporters which ones are for what.Thanks in advance! Link to comment Share on other sites More sharing options...
srang Posted March 31, 2015 Author Share Posted March 31, 2015 I think visualize is pulling its list from the remote-services but for some reason when I add or remove items from the exporter map they don't always disappear. Not sure why that is. Link to comment Share on other sites More sharing options...
srang Posted April 1, 2015 Author Share Posted April 1, 2015 Another interesting wrinkle I've come across: I created a remote csv metadata exporter bean and configured it in the list of remote export options, and then reloaded the server. When I went into my webapp the option wasn't there but I hardcoded the key for that new exporter as the export type and ran it and it worked. Also as hinted above, when I comment out a bean from the remote exporters map the option doesn't disappear but if I try to export it, it fails. This leads me to believe that it is configuring the server correctly but just isn't updating the list of export options to reflect that... Not sure where to go from here Link to comment Share on other sites More sharing options...
marianol Posted April 14, 2015 Share Posted April 14, 2015 I will look into this.. applicationContext-web-services.xml should be only for the REST API and applicationContext-remote-services.xml should be the one visualize.js uses. I'm not sure what do you refer when you talk about " export options list returned by visualize" which method are you talking about?Can you send me a fiddel with a bare bones sample of what you ate attemting so I can replicate it? Link to comment Share on other sites More sharing options...
srang Posted April 15, 2015 Author Share Posted April 15, 2015 I think I figured out part of my problem. I assumed that jasper/visualize determined the export options available to a report at the time of report generation by checking with the server. Under this assumption I didn't think that visualize.js would change ever so I curled visualize down when we first upgraded to 6.0 and put it inside the project with the rest of the javascript, so I could minfy them together at deployment. Upon further inpection I found that the "export map" I was looking at configuring in the beans is actually an enum within visualize. What I'm guessing now is that when the server builds and deploys it generates visualize based on the configured beans, which in hind sight makes a lot of sense. I haven't had a chance to test this but I imagine if I pull down visualize from the server now that I've configured the beans, it will have the proper export options. That being said, I really don't know and would love your insight Link to comment Share on other sites More sharing options...
Solution marianol Posted April 16, 2015 Solution Share Posted April 16, 2015 Posting the last 2 comments here for reference since it will be easier for somebody else to follow:marianol - 1 day 19 hours agoI will look into this.. applicationContext-web-services.xml should be only for the REST API and applicationContext-remote-services.xml should be the one visualize.js uses. I'm not sure what do you refer when you talk about " export options list returned by visualize" which method are you talking about? Can you send me a fiddel with a bare bones sample of what you ate attemting so I can replicate it?srang - 1 day 16 hours agoI think I figured out part of my problem. I assumed that jasper/visualize determined the export options available to a report at the time of report generation by checking with the server. Under this assumption I didn't think that visualize.js would change ever so I curled visualize down when we first upgraded to 6.0 and put it inside the project with the rest of the javascript, so I could minfy them together at deployment. Upon further inpection I found that the "export map" I was looking at configuring in the beans is actually an enum within visualize. What I'm guessing now is that when the server builds and deploys it generates visualize based on the configured beans, which in hind sight makes a lot of sense. I haven't had a chance to test this but I imagine if I pull down visualize from the server now that I've configured the beans, it will have the proper export options. That being said, I really don't know and would love your insight You are correct, and visualize does change on each upgrade. We are adding more features in each release. The visualize.js script is tied to the server so you need to use it form there, in 6.0.1 it should be minimized already since that was added in this version.On the other hand I will have to confirm if we do indeed update that enum once the beans change in the server. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now