Click here to Skip to main content
16,021,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
no problem
C#
private void xrSubreport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
         {         
      ((XRSubreport)sender).ReportSource.FilterString = string.Format(" [ID]=115 and [TARIH] Between(#{0}#, #{1}#) ", "2015-10-01", "2015-10-31");                   
         }


but I'm getting so directly challenge the error

C#
    public string t1;
         public string t2;

((XRSubreport)sender).ReportSource.FilterString = string.Format(" [ID]=115 and [TARIH] Between(#{0}#, #{1}#) ", "'" + Convert.ToDateTime(t1).ToString("yyyy-MM-dd") + "'", "'" + Convert.ToDateTime(t2).ToString("yyyy-MM-dd") + "'");


error message is as follows

parser error at line 0,character 30: ınvalid date/time value:"'2015-01-01'".;("[ID]=115 and [TARIH]between({FAILED HERE}#'2015-01-01'#,#'2015-06-30'#)")


How to solve error ..thank you..
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900