set report parameters with.csv files as datasource

edited December 31, 1969 in Designing Analytics Reports
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

  • mwilliamsmwilliams BIRT Guru
    edited December 31, 1969
    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.

    Regards,

    Michael Williams

    eSignLive Evangelism & Community Manager | eSignLive by VASCO
     
    Find me on:
    Twitter
    Facebook
    Blog
    LinkedIn

    eSignLive Developer Community
     
    Email me:
    Google: [email protected]

  • edited December 31, 1969


    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.




    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.
  • mwilliamsmwilliams BIRT Guru
    edited December 31, 1969
    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.

    Regards,

    Michael Williams

    eSignLive Evangelism & Community Manager | eSignLive by VASCO
     
    Find me on:
    Twitter
    Facebook
    Blog
    LinkedIn

    eSignLive Developer Community
     
    Email me:
    Google: [email protected]

  • edited August 3, 2017

    Hi ,


     


    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.


    I am using CSV file and using flatfile as datasource. Can you please help.

  • Attached are my rptdeisgn files and CSV.


     


  • Screenshot of error when adding select filter expression.


  • The issue is in your data.  In the CSV, you have an invalid date in Row 104.  It's literally "MM/DD/YYYY".



    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

    Remove that row from the CSV, and Preview will work.


    Clement Wong
    Principal Analytics Architect

    OpenText Corporation
    http://www.actuate.com | http://www.opentext.com

  • 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.


     


    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.


     


    Can you please check what is wrong in filter logic which is making report to display only when date is newer than 45 days.


     


    Attached is the report.


     


  • There is one more problem with another report.


    Attached is the report and error am getting. It again uses same CSV which is used for another report.


     


    It shows some incompatible class error.


     


    Appreciate your help.


     


  • edited August 7, 2017

    Hi,


     


    We are facing the issue in the production and help will be highly appreciated.


  • As for the first report, the logic for cc_RecentlyModified needs further explanation.  What is it checking for?


     


    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.


     


    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.


     


     


    As for the second report, you are referencing a library file that you did not provide:



            <structure>
                <property name="fileName">WC_Library_WhatDoesItDo_Master.rptlibrary</property>
                <property name="namespace">WC_Library_WhatDoesItDo_Master</property>
            </structure>

    The second report also uses a DB connection.  Will I be able to run?


     


    What version of BIRT are you using?


     


    Does this work in the Designer?


     


     


    In the future, it's best that you open a new thread for your issues.

    Clement Wong
    Principal Analytics Architect

    OpenText Corporation
    http://www.actuate.com | http://www.opentext.com

  • edited August 8, 2017

    Thank you Clement.


     


    Yes in future I would open new thread.


     


    We are using BIRT version 4.2.2 and attached is the library.


    I am not sure if this runs in designer. But this report use to work perfectly fine with older BIRT version 3.7.


     


    After BIRT upgrade to 4.2.2 it started breaking.


  • edited November 19

    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

Sign In or Register to comment.