Problem executing report with a variable with a date

Hello guys,

I'm developing an console application that export reports (pdf, jpg, doc, etc) to a folder. Some reports have variables that are used to pass a date or datetime values to a field of a query. This application should generate the report using a desired culture/location, that means, it doesn't have to use the regional settings of the machine were is executed. The culture that it should use is readed from an xml as well the variables values of the report. In the code of the application I set the formats at startup and is doing well.

But I have a problem when I execute the reports with date/datetime values in variables, I'ts like the fastreport is ignoring the app datetimes format "some times". When the app is configured with a dateformat "dd/MM/yyyy" (spanish date format) and the regional settings are in US (MM/dd/yyyy), and I set the date to the variable, the first 12 days of the month is using the US date format, but from the 13 day is using the spanish format. ???

For example, I have data in this range of dates "01/01/2014 - 01/17/2014". The "where" part of the report query has something like "where date >= myvariable". If I execute the report with whatever date from "01/01/2014" to "12/01/2014", it doesn't return information. But if I use dates from "13/01/2014" to "17/12/2014", it works well, also if I use the dates "13/12/2013" to "31/12/2013" or dates from"01/02/2014" to "01/12/2014" (december???) works.

There is a standard way to pass dates/datetimes to the variables? What's happening??

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.