on 12-15-2006 10:43 PM
<p>My problem:</p><p>Crystal Reports 8.5 and MS SQL Server 2000. I create report with two parameters type DateTime - FromDate and ToDate. In Select Expert I define criteria 'Created' (datetime field from SQL) is between {?FromDate} and {?ToDate} which is converted into formula in {?FromDate} to {?ToDate}. So far, so good.</p><p>When I now run this report with parameter values '20.12.2005 00:00:00' and '22.12.2006 00:00:00' I can see from SQL trace that query passed to SQL server is:</p><p>SELECT .... FROM ... WHERE Created Created >= "2005/12/20 00:00:00AM" AND R_Stoneridge_CountResult.Created < "2005/12/22 00:00:01PM"</p><p>Works as expexted. But now I found that on some client PCs using this report the query looks like</p><p>SELECT .... FROM ... WHERE Created Created >= "2005/12/20 00:00:00AM" AND R_Stoneridge_CountResult.Created < "2005/12/22 00:00:<strong>00</strong>PM"</p><p>and this is definitely wrong.</p><p>Can anybody suggest what can be wrong or what do I have to change in client PCs configuration</p><p>TIA</p>
 to see how they differ from yours. Crystal uses the local regional settings for date time stuff.
    - Kathryn Webster (Report Design Consultant)Â
          Kat's News: http://diamond.businessobjects.com/blog/279
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<p>This was my first thing to check also. But no luck - regional settings were the same. And from the other hand - for me it's quit hard to imagin what in regional settings can cause this kind of difference in passed query. As you can see in one (right) case 1 second is added to end time and in other (wrong) case it's not. But still Less Than is used.</p><p>And also I can't understand why Crystal uses this kind of query conversion. Why not just do it like:</p><p>Created >= FromTime and Created <strong><=</strong> ToTime</p><p>PS. It's quite big problem for me right now since I have created a LOT of reports for my customers which are using this kind queries.</p>
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.