Solarion
Honorary Master
- Joined
- Nov 14, 2012
- Messages
- 28,049
- Reaction score
- 17,803
Hey guys, I'm very new to crystal reports and requesting help pls. I've been googling this problem to death so time to make a post. I'm trying to add a date range for a report, so basically to return all records between x & y date, but nothing I've tried has made a difference. This is my code:
and this is my selection formula (Which I'm not sure if I even need?)
http://s22.postimg.org/k6260t1dd/crystalreportings.jpg
That's what I have so far, and it's not working, the report itself still pulls records from months ago. Any suggestions?
Code:
Dim filename As String = "C:\temp\AgentUpdateReport.pdf"
Dim report = New ReportDocument
report.Load(Server.MapPath("Reports/AgentUpdateReport.rpt"))
report.SetParameterValue("datefrom", "2013-05-20")
report.SetParameterValue("dateto", "2013-05-25")
report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, filename)
report.Close()
report.Dispose()
and this is my selection formula (Which I'm not sure if I even need?)
http://s22.postimg.org/k6260t1dd/crystalreportings.jpg
That's what I have so far, and it's not working, the report itself still pulls records from months ago. Any suggestions?