Hi there.
I'm using v.s 2008 with c#. I have a .rdlc file and it using a objectdatasource. ods has two datetime parameters. That datetime parameter's format must be dd-MM-yyy. but that time threw an exception. Exception is : An error has occurred during report processing. String was not recognized as a valid DateTime.
My code is :
int iBaslangicYil = txtIlkTarih.Text.Substring(6, 4).To<int>();
int iBaslangicGun = txtIlkTarih.Text.Substring(0, 2).To<int>();
int iBAslangicAy = txtIlkTarih.Text.Substring(3, 2).To<int>();
DateTime dtBaslangic = new DateTime(iBaslangicYil, iBAslangicAy, iBaslangicGun);
int iBitisYil = txtIkinciTarih.Text.Substring(6, 4).To<int>();
int iBitisGun = txtIkinciTarih.Text.Substring(0, 2).To<int>();
int iBitisAy = txtIkinciTarih.Text.Substring(3, 2).To<int>();
DateTime dtBitis = new DateTime(iBitisYil, iBitisAy, iBitisGun);
rvTarihAraliginaGoreSeansSayilari.Visible = true;
odsTarihAraliginaGoreSeansSayisi.SelectParameters.Add("refTarih1",DbType.DateTime,dtBaslangic.ToString());
odsTarihAraliginaGoreSeansSayisi.SelectParameters.Add("refTarih2", System.Data.DbType.DateTime, dtBitis.ToString());
odsTarihAraliginaGoreSeansSayisi.DataBind();
rvTarihAraliginaGoreSeansSayilari.LocalReport.Refresh();
thanks for your help.