Possible Bug with Date Variable?

I have a variable I'm passing from Delphi to a report via the frxReport.Variables method. It's used in my report title in a memo field thus: [StartDate] with a format of dd/mm/yy.

If I look at the variable from within the designer it looks ok (Report/Variables). The first time I preview the report it comes out OK but subsequent times it comes out effectively as a zero date (31/12/1899).

This happens when going directly to preview or exporting a report also.

Other variables I use don't have this problem. Just this date one.

Any ideas?

Thanks
Mark

Comments

  • edited 2:39PM
    Unfortunately FR xmlserializer can't store variant properties. They are stored as a string. So you have two options:
    1) setup variables each time before run a report
    2) use frxGlobalVariables
  • edited 2:39PM
    Thanks, I couldn't find any info on frxGlobalVariables so I used the onReportStart event to store the formatted date in a string variable.

    Is there any info on this frxGlobalVariables?

    Thanks
    Mark
  • edited 2:39PM
    I thought it was in the help, but it is not. The frxGlobalVariables is a global list of variables. It has the same methods and properties as TfrxReport.Variables (you can learn about this in the help or in the programmer's manual). The only thing is that global variables pass its data as is, without trying to calculate it.
  • edited 2:39PM
    OK, thanks I'll try that.

    Mark

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.