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)
property binding in CSv dataset
hardik_982
hi
i have used eclipse 3.3 and birt 2.2 for crosstab and cube generation
with oracle database previously
now my requirement is that i have to used csv files in dataset
previously i can apply property binding like
"select * from MV_SUMMARY A "+params["whrqry"]+" "+params["mnthqry"]+" "+params["brqry"]+" "
for oracle database for mv_summary table
how can i apply this same for CSV dataset files
please help me
Find more posts tagged with
Comments
Virgil Dodson
You can get dynamicly chosen CSV files by using a script in the beforeOpen event of the DataSet similar to below:
if (params["frequencyParam"].value == "Days") {
this.queryText = "select "Application", "DT", "Bytes" from table_days.txt : {"Application","Application",STRING;"DT","DT",STRING;"Bytes","Bytes",INT}";
} else if (params["frequencyParam"].value == "Weeks") {
this.queryText = "select "Application", "DT", "Bytes" from table_weeks.txt : {"Application","Application",STRING;"DT","DT",STRING;"Bytes","Bytes",INT}";
}
The queryText above might look a little bit cryptic... so to see what yours looks like the first time, create a Data Set to your CSV file, view the XML source of the report design and search for queryText. Since the queryText field uses double-quotes, you will need to add backslashes before each in order to use that same queryText in a script.