Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
CSV file as input parameter
Priya R
<p>Hi,</p>
<p> </p>
<p>Just wanted to know if the commercial version of BIRT have the option to take a .CSV file as an input parameter?</p>
<p> </p>
<p>Thanks,</p>
<p>Priya</p>
Find more posts tagged with
Comments
cbond
<p>Hi Priya,</p>
<p> </p>
<p>Can you better describe commercial version?</p>
<p> </p>
<p>They Open Source and free version, supports flat files as input.</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/project/notable4.3.php'>http://www.eclipse.org/birt/phoenix/project/notable4.3.php</a></p>
;
<p> </p>
<p>My assumption is any paid version, should have at minimum those features.</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Cullen</p>
<p> </p>
<p>PM me if you need more help.</p>
Priya R
<pre class="_prettyXprint _lang-">
Hi Cullen,
Commercial Version I mean Actuate/OpenText Version?
I'm not talking about the Flat File Data Source. I know that is available in Open Source (Eclipse BIRT).
I'm more interested in "Input Parameter" Fields. At the moment only Text Box, Combo Box, List Box & Radio Button are available in "Display Text" area. I am looking for an option where user can "Browse" and get a file (eg: .csv/.xls) file as an input parameter to the report.
Thanks,
Pri
</pre>
micajblock
<p>That is not something out of the box. There are plans in the commercial iHub to add data provisioning like this. In order to this you would need some kind of custom front-end that will upload the file to somewhere that your application server (running the BIRT engine) has access to. Once it is uploaded you can use the path to the file as a parameter.</p>
Priya R
<p>Thanks!!</p>
<p> </p>
<p>Cheers,</p>
<p>Pri</p>
Clement Wong
<p>You can create your own parameter page, and use HTML5 to parse the file and pass in the values to your report. It will be all client-side.</p>
<p> </p>
<p>One example, I recently created for a prospect wanted to drag a file of customer IDs on to the browser, and then execute a report with those customer IDs.</p>
<p> </p>
<p>The custom parameter page was based on this HTML5 Demo (<a data-ipb='nomediaparse' href='
http://html5demos.com/dnd-upload'>http://html5demos.com/dnd-upload</a>)
, and I modified the previewFile function to concatenate the customer IDs and pass it as a comma separated list to the report design. </p>
<pre class="_prettyXprint _lang-">
function previewfile(file) {
if (tests.filereader === true && acceptedTypes[file.type] === true) {
var reader = new FileReader();
reader.onload = function (event) {
//var image = new Image();
//image.src = event.target.result;
//image.width = 250; // a fake resize
//holder.appendChild(image);
document.getElementById('holder').innerText = event.target.result;
var pProperties = event.target.result.split("\n").join(",");
window.open('http://myiHub/iportal/executereport.do?__requesttype=immediate&__executablename=%2fPublic%2fParameter Report Example%2erptdesign&invokesubmit=true&pCustomerList=' + pProperties, '_blank');
};
</pre>