开发者

problem at refresh report viewer

HY! I have a WinForm application and I use report viewer. I have in my form 2 dateTimePickers and I have the problem when I change those values, my report does not change. I know what should be displayed because if I开发者_高级运维 put the second values first it shows me result.

Ex: dateTimePicker1 = 01.01.2011

dateTimePicker2 = 03.01.2011

i have displyad in my reportviewer name1, name2,name3

If I change dateTimePicker2 = 05.01.2011 I should see name4, name5 too, but i do not see them

If I exit the form and run again and I put the values dateTimePicker1 = 01.01.2011, dateTimePicker2 = 03.01.2011 I see all the 5 names, but if I switch again dateTimePicker2 = 03.01.2011 , name4 and name5 does not disappear.

I put reportViewer.Refresh(), but does not work.

Anyone can help me?


Make sure that when the date is changed your app is then changing whatever parameter you are passing to your report viewer to reflect the new date.

Another thing you can do is run a trace on the database using SQL Profiler to see exactly what the SQL is that your app is sending to the database. Make sure that part is correct. If it isn't what you expect, you can work on fixing it and finding out why the app is putting together the wrong query. If it is what you expect, then check to make sure the database is returning what you expect from that query.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜