This is a migrated thread and some comments may be shown as answers.

ReportViewer Help

4 Answers 170 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cade Cote
Top achievements
Rank 1
Cade Cote asked on 28 Aug 2008, 04:30 PM
I have a report that has two filters. One is  a string and the second one is a datetime. My expressions look like this:
=Fields.PoolType =  =Parameters.PoolType and
=Fields.PoolDate =  =Parameters.Date

I am getting the parameter information from a datasource that is pulling it from a view.
The PoolType is a string and the PoolDate is a DateTime

I am trying to use reportviewer in an aspx project and I get the following error.

Cannot perform '=' operation on System.DateTime and System.String.


I tried it as a test in the windows application and it worked just fine without an error but I really need it as a web application.

Thanks

4 Answers, 1 is accepted

Sort by
0
Milen | Product Manager @DX
Telerik team
answered on 29 Aug 2008, 11:01 AM
Hi Cade Cote,

As the error hints, the two operands of the comparison are not of the same type. So please look carefully/debug the code that sets the values of the parameters (as i understand you are setting the parameters programmatically) and the types that the data source of the report returns. See if there is not some type mismatch. Try to set the values of the parameters to some constants (DateTime.Now for example).

If you still experience some issues, please open a support ticket and send us your report and more info/code snippet how are you setting the values.

I hope you find that information helpful.

All the best,
Milen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cade Cote
Top achievements
Rank 1
answered on 29 Aug 2008, 08:40 PM
I looked at all that and the stuff is the same. I did not do this programmatically. I used the Parameter Collection Editor and also set the filters. I followed tutorials from a self paced tutorial i downloaded from your site.

I had two parameters set up as cascading so I had a filter in the second parameter. When I opened the aspx page the viewer is on, it shows the toolbar so I hit refresh. This should bring up the parameter fields to collect the parameters. This is when I was getting the error.

I took the second parameter off and tried it again. The aspx pulled up the report bar and I hit refresh, this time I did not get an error, but it never asked me for the parameter value, which I have it set to true so it should be.

Also when I am on the Report Design and try the Preview. It works just fine, the parameters work and everything. But once I try to view it on my aspx page(which is just on my localhost right now) it gives me the error, or it does not ask for the parameters.

Hopefully this is a little more information that can help you help me. Thanks again.

0
Cade Cote
Top achievements
Rank 1
answered on 29 Aug 2008, 08:54 PM
Sorry. I got the error issue figured out. In my last reply, I told you that the parameters were not showing up. I have been using firefox the whole time and I just tried it on internet explorer and it actually works just fine. Is there a known issue with firefox or is there something I can do to fix it?

0
Accepted
Steve
Telerik team
answered on 01 Sep 2008, 07:25 AM
Hi Cade Cote,

This is a known issue that has been addressed in the latest official version - Telerik Reporting Q2 SP1, released a few days ago. Please download it and let us know if still having problems.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Cade Cote
Top achievements
Rank 1
Answers by
Milen | Product Manager @DX
Telerik team
Cade Cote
Top achievements
Rank 1
Steve
Telerik team
Share this question
or