Hi all,
I have the same error.
My soluce is to use workflow to make the rapport.

First, use the Script SDK's Tool
to create your CSV and put the header.
This is my code
namespace WorkflowActivity.Scripting.CSVEntête
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class Script1 : RAScriptClass102
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
// set a path to write to. run the workflow on a schedule and overwrite the file
string fpath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),@"CSV\\");
// This path converts to C:\ProgramData\CSV\
if(!System.IO.Directory.Exists(fpath))
System.IO.Directory.CreateDirectory(fpath);
fpath = System.IO.Path.Combine(fpath, "file.csv");
// create a token or update one if you added an Assign Tokens activity
SetTokenValue("csvpath", fpath);
// best to use full csv unless you are absolutely certain that the values will not have any special characters like semicolon and double quotes
System.IO.File.WriteAllText(fpath, "\"ID\";\"Nom\";\"Field1\"" + Environment.NewLine);
}
}
}
Then, use the search's tool to find all your files.
For each results, pick the fields you want, then add the values to your csv.
My second code
namespace WorkflowActivity.Scripting.CSVEnregistrements
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class Script1 : RAScriptClass102
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
// generate the line with full csv
string s = "\"" + GetTokenValue("PourChaqueResultat_CurrentEntry_ID") + "\"";
s += ";\"" + FixValue(GetTokenValue("PourChaqueResultat_CurrentEntry_Nom")) + "\"";
//Here I picked the field1's value
s += ";\"" + FixValue(GetTokenValue("Champs_Field1")) + "\"";
System.IO.File.AppendAllText(GetTokenValue("csvpath").ToString(), s + Environment.NewLine);
}
private string FixValue(object o)
{
if(o == null)
return "";
else
return o.ToString().Replace("\"", "\"\""); // make sure properly escaped
}
}
}
For information, my GetTokenValue("Champs_Field1") is from the tool "Get values from fields"


Hope this is can help.
Regards