I found a solution:SqlCommand.Prepare method requires all parameters to have an explicitly set type
Code: Select all
report.Dictionary.DataSources["DataSourceName"].Parameters["ParameterName"].Value = ""
My report code is now:
Code: Select all
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
using System.Linq;
using InsERT.Moria.Wydruki;
namespace Reports
{
public class EwidencjaSrodkowTrwalych : Stimulsoft.Report.StiReport
{
private IFunkcjaPobieraniaDanychDlaWydruku PobierzFunkcje(string nazwa)
{ return MenedzerFunkcjiPobieraniaDanychDlaWydruku.PobierzFunkcje(nazwa);
}
private IFunkcjaPobieraniaDanychDlaWydruku PobierzFunkcje(Guid id)
{
return MenedzerFunkcjiPobieraniaDanychDlaWydruku.PobierzFunkcje(id);
}
public EwidencjaSrodkowTrwalych() {
this.InitializeComponent();
/// StiOptions.Engine.GlobalEvents
}
#region StiReport Designer generated code - do not modify
#endregion StiReport Designer generated code - do not modify
}
}