Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Choose Output Format From Parameters
linucksrox
<p>Hi,</p>
<p> </p>
<p>Is there a way to specify the output format using a report parameter, then set the format using javascript within the report based on the chosen parameter? I see there's a way to do this when using the Report Engine API, but is there a way do do this within the report?</p>
<p> </p>
<p>The goal is to make a time consuming report default to PDF output (but be user selectable) so that a user can run the report and come back later to view the results. As it is now, it defaults to an HTML session which times out if the user waits too long to manually export to PDF. I would also like to use this feature with XLS if it's possible to do this.</p>
Find more posts tagged with
Comments
mwilliams
One thing you could do would be where you're providing the link to the report, create your own drop down to allow them to choose their preferred output format and change the __format= parameter in the URL based on their input. Or you could simply create multiple links to the same report with different URL parameters and just allow them to select from there.<br><br>From within your design, you could create links to the report or you could automatically run PDF/XLS versions based on an input parameter, but the default run will always be in HTML unless you specify otherwise to the viewer via URL parameter.
linucksrox
<p>Thanks Michael, that answers my question. I think in this case I'll hardcode __format=pdf into the URL.</p>
<p> </p>
<p>I also like the idea of checking a custom parameter in beforeFactory, which if blank will drop all report elements and only display hyperlinks to PDF, XLS, or HTML versions of the report. Then when clicking one of those links, it would pass in the appropriate __format= parameter.</p>
mwilliams
You're welcome. Always glad to help!
<br><br>You could simply give that option to them wherever in your application that you're linking to the report vs dropping everything in the design. Another option could be to create a parameter report for each design you create with the parameter report only containing the links to the different formats or a single design that takes the design as a parameter, then gives the options of formats, so you only have to do this modification in a single design and call your existing reports from it. Good luck. Let me know if you have questions or issues.