Relatively new to working with CR. Have lately been converting a lot of old reports that were previously executed via vbscripts to run with vb.net.
I have a particular report I can't get working. In order to run, it expects a date range that it stores in a parameter field called "DateRange"
In the old vbscript that called this report and exported it, the code to pass this daterange parameter was:
Set crParms = CrystalReport.ParameterFields
crParms.Item(1).AddCurrentRange CDate(StartDate), CDate(EndDate), 3
Can anybody help me out with what this code should look like in vb.net? I'm a little confused as in the report the "DateRange" parameter is a single variable. So is it expecting a collection of dates or something?
I'm just creating a simple console project to call the report, pass the date range, and export the report. I have been able to figure out the code to export the report, and it works great. I just need to figure out how to pass my date range into the report.
Thanks!
Should anyone else need help passing two dates from VB.NET to a single DateRange parameter in a Crystal report, this is what ended up working for me:
I did find this tutorial to be extremely helpful in writing the code that worked for me above.