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)
How to append the complete path of a csv during the runtime?
ManInBlack
Hello,
there is following background: The report viewer runs on an application server within a UNIX environment.
I created a BIRT report using a csv as data source. The users often have windows systems and run the birt viewer within of their browser.
How is it possible that the user could type in the complete path of the flat file (including of the file name).
A lot of users have csv files (with different contents but with the same structure). So they would read in their local flat files.
Hopefully i could describe my scenario.
Thank you
Bye
ManInBlack
Find more posts tagged with
Comments
mwilliams
Hi ManInBlack,<br />
<br />
This devShare post may help you with that.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/951-dynamically-changing-the-path-home-for-a-flat-file-datasource/#description'>Dynamically
Changing the Path/Home for a Flat File DataSource - Tips & Tricks - BIRT Exchange</a><br />
<br />
Let me know.
ManInBlack
Hello,
thank you for your reply.
The problem is that the filename is fixed within of a data set. How can I change this behavior?
The user have a files with different filenames as data source.
Thank you
Bye
ManInBlack
mwilliams
ManInBlack,
You'll need to do as the devShare entry says to change the path to the file, then you'll need to change the queryText of the dataSet in the beforeOpen script. You will have set the name of the default CSV, so you can just do a string replace on the queryText putting their file name in the place of the original file name. If all fields, etc. are the same, it should work, but you'll need to do both.
ManInBlack
Hi Michael,
thank you again for replying.
I could understand your instruction. My problem is that i have many data sets (over 10) so I have to put to every data set this script with different attributes, that is in my opinion not so beautiful. Every data set retrieves different columns from that flat file. Are there any other possibilities?
Michael, do you know is it possible to create a data set using an another data set? That would be the solution if I generate one abstract data set and futher sub data sets (oo concept).
Thx + Bye
ManInBlack
mwilliams
ManInBlack,
If the columns of the flat file are the same, if you changed the location of the flat file to the user's specified location in the dataSource and the actual filename to the user's specified filename in each dataSet, I don't think you'd need to do anything else. This is if I'm understanding what you're trying to do correctly.
nadavw
<blockquote class="ipsBlockquote" data-author="mwilliams" data-cid="64062" data-time="1273076392"><div><p>Hi ManInBlack,
This devShare post may help you with that.
<a data-ipb='nomediaparse' class="bbc_url" href='
http://www.birt-exchange.org/devshare/designing-birt-reports/951-dynamically-changing-the-path-home-for-a-flat-file-datasource/#description'>Dynamically
Changing the Path/Home for a Flat File DataSource - Tips & Tricks - BIRT Exchange</a>
Let me know.</p></div></blockquote><p>Link is broken - can you share the Tip?</p>
bgbaird
<p>Try this one:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://www.birt-exchange.org/devshare/_/designing-birt-reports/dynamically-changing-the-pathhome-for-a-flat-file-datasource-r187'>http://www.birt-exchange.org/devshare/_/designing-birt-reports/dynamically-changing-the-pathhome-for-a-flat-file-datasource-r187</a></p><p> </p><p>Brian</p>
;