set report parameters with.csv files as datasource

srikala
edited February 11, 2022 in Analytics #1
our datasource is multiple csv files. we want to set the report parameters to this. How can we do that.
using query birt provides the option of wild cards and linking of report parameters to dataset parameters. But when .csv files are our datasource there is no option of sql query. In such cases , how can we set the report parameters.

Comments

  • mwilliams
    edited December 31, 1969 #2
    You use filters to limit your data when you're not using a SQL query. You can do this either on the dataSet itself or on the table. Usually the earlier the better for BIRT's processing speed, so if you don't need the data anywhere in your report, it's best to add the filter to your dataSet. Hope this helps.
    Warning No formatter is installed for the format ipb
  • srikala
    edited December 31, 1969 #3
    <blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="79631" data-time="1309898186" data-date="05 July 2011 - 01:36 PM"><p>
    You use filters to limit your data when you're not using a SQL query. You can do this either on the dataSet itself or on the table. Usually the earlier the better for BIRT's processing speed, so if you don't need the data anywhere in your report, it's best to add the filter to your dataSet. Hope this helps.<br /></p></blockquote>
    <br />
    We want dynamic filtering option. Like when u run the report it should prompt the user to view the data for a particular company or country.
  • mwilliams
    edited December 31, 1969 #4
    Ok. You would create a dynamic parameter using your flat file dataSet as the source. Then, based on the user's selection, you'd add a filter to your element in the report that uses this dataSet. If you have several elements in the report that use this dataSet, creating a second dataSet to use for the parameter and then filtering the original dataSet by this selection would be the easiest way to limit all elements with a single filter. Hope this helps.
    Warning No formatter is installed for the format ipb
  • shwetadaga
    edited August 3, 2017 #5
    <p>Hi ,</p>
    <p> </p>
    <p>You said to create filters in the data set. However when I am creating in a data set it does not seem to be applied.</p>
    <p>I am using CSV file and using flatfile as datasource. Can you please help.</p>
  • <p>Attached are my rptdeisgn files and CSV.</p>
    <p> </p>
  • <p>Screenshot of error when adding select filter expression.</p>
  • <p>The issue is in your data.  In the CSV, you have an invalid date in Row 104.  It's literally "<strong>MM/DD/YYYY</strong>".</p>
    <pre class="_prettyXprint">
    Menu Template Header,[0000]Menu Template Name,#Template.rptdesign,"Report_text Info <BR> - quotes are important if doing html tags","SystemLevel_Text - only shown to Fiserv Users","MM/DD/YYYY?^-+SL or +BL^-Modiied_Text - what changed",MM/DD/YYYY,"+SL X X X +BL X X X",false,false</pre>
    <p>Remove that row from the CSV, and Preview will work.</p>
    Warning No formatter is installed for the format ipb
  • <p>Thank you Clement. But I have filters in my rptdesign where I am ignoring my last line with MM/DD/YYYY. It has started working after I changed the data type of the column modified_date to String. I have added computed column to change back to date later.</p>
    <p> </p>
    <p>However now I am facing a different issue. The report is displayed only when the date mentioned in the column modified_text is newer than 45 days so that table data isn't filter to no/zero results.</p>
    <p> </p>
    <p>Can you please check what is wrong in filter logic which is making report to display only when date is newer than 45 days.</p>
    <p> </p>
    <p>Attached is the report.</p>
    <p> </p>
  • <p>There is one more problem with another report.</p>
    <p>Attached is the report and error am getting. It again uses same CSV which is used for another report.</p>
    <p> </p>
    <p>It shows some incompatible class error.</p>
    <p> </p>
    <p>Appreciate your help.</p>
    <p> </p>
  • shwetadaga
    edited August 7, 2017 #11
    <p>Hi,</p>
    <p> </p>
    <p>We are facing the issue in the production and help will be highly appreciated.</p>
  • <p>As for the first report, the logic for <strong>cc_RecentlyModified </strong>needs further explanation.  What is it checking for?</p>
    <p> </p>
    <p>Although your JavaScript statements have line breaks, where the semi-colon is optional, it's recommended that you do add semi-colons to end your JavaScript statements.  It makes it easier to read, and just in case where the parser doesn't interpret statements differently.</p>
    <p> </p>
    <p>If we remove your last filter, I see 33 rows in the Preview, and when I run the report so definitely its the logic behind the filter so a better understanding of the computed column would help here.</p>
    <p> </p>
    <p> </p>
    <p>As for the second report, you are referencing a library file that you did not provide:</p>
    <pre class="_prettyXprint">
            <structure>
                <property name="fileName">WC_Library_WhatDoesItDo_Master.rptlibrary</property>
                <property name="namespace">WC_Library_WhatDoesItDo_Master</property>
            </structure></pre>
    <p>The second report also uses a DB connection.  Will I be able to run?</p>
    <p> </p>
    <p>What version of BIRT are you using?</p>
    <p> </p>
    <p>Does this work in the Designer?</p>
    <p> </p>
    <p> </p>
    <p>In the future, it's best that you open a new thread for your issues.</p>
    Warning No formatter is installed for the format ipb
  • shwetadaga
    edited August 8, 2017 #13
    <p>Thank you Clement.</p>
    <p> </p>
    <p>Yes in future I would open new thread.</p>
    <p> </p>
    <p>We are using BIRT version 4.2.2 and attached is the library.</p>
    <p>I am not sure if this runs in designer. But this report use to work perfectly fine with older BIRT version 3.7.</p>
    <p> </p>
    <p>After BIRT upgrade to 4.2.2 it started breaking.</p>
  • GidsonJerry
    edited November 19, 2019 #14

    Maybe Using esProc in BIRT is easier to solve the problem. I wrote an article to show how it works - Use BIRT to generate reports from CVS