Can not display Reprt with Report Viewer
I developed a report as follow 1. It has only one parameter named “'SnapShotDate'” It is a drop down list , populated from Query a. The displayed text is a Formatted date with month name So it is Varchar date type b. Value member is the date before formatted and it is date time data type 2. The parameter get its default value from Query And it work good. My problem is I need to display the report using Report viewer from an ASPX site I set the report parameter as ReportParameter p1 = new ReportParameter("SnapShotDate", "7/24/2011"); ReportParameter[] Prameter = (new ReportParameter[] { p1}); But I got The 'SnapShotDate' parameter is missing a value I try different format but all give me the same error, I guess this happened because the value for the parameter should be of date time data type Not as String. and I did not find a method to set value for p1 as date timekhaled Mohamed
July 28th, 2011 8:04am

Hi Khaled_tec, Thanks for your question. I had reproduced the scenario on my local server, it works fine. There are two cautions, please check them in your project. One, please pay attention to the format of the second parameter in the ReportParameter method. By default, both of the two parameters in string type, you just need to specify the second parameter with full time format, such as: “7/24/2011 0:00:00”, the method automatically formats the string type into Date/Time type. Two, the Available Values of the SnapShotDate should contain the specified value “7/24/2011 0:00:00”. Hope it helps you. If the issue still exists, please feel free to ask. Thanks, Sharp Wang Please remember to mark the replies as answers if they help you and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2011 8:52pm

Thanks Sharp I work arround this by converting the data type of the value member to an integer representing the date Ex, I display 1 Jan 2011 and The Value is 20110101 (YYYYMMDD) and It work fine I will check formating the date as as date time as you suggest Thanks for your reply khaled Mohamed
August 3rd, 2011 3:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics