Removing data source at run-time

2 posts, 0 answers
  1. Janitha
    Janitha avatar
    14 posts
    Member since:
    Mar 2018

    Posted 22 Jan Link to this post

    We have a report where the data sources are provided as CSV files. In some scenarios, not all of these CSV files provided even though they are configured in the report. In standalone designer fields that have missing data sources will only show empty spaces. But when trying to generate through programmatically an error given as "Output error: Could not find file 'C:\DataSource\MissingFileName.csv'.".  Is there a way that programmatically to remove those data sources from a report item if the CSV file is missing which will show empty spaces in the output file? 

     

    Thank you

  2. Janitha
    Janitha avatar
    14 posts
    Member since:
    Mar 2018

    Posted 23 Jan Link to this post

    Found a solution. The solution was to set the DataItem.DataSource to an empty DataSoruce. (New ObjectDataSource)

Back to Top