1. Roger
  2. Report Editor
  3. Monday, July 20 2020, 06:36 AM
  4.  Subscribe via email
Hello

I make a very simple report in Studio Pro and I use 'report.generationDate'. Now I try to format and I had tried many versions, like the Valentina description, but whart ever I do every time the format is like 07/20/2020 (today unformated)

In the properties form this field I use datePattern and as pattern what ever I do, it is the same format....

What can be my problem?

Regards Roger
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Roger,

Yes, there is some problem, we'll check JavaScript expressions formatting.
As a replacement, it is possible to use Text With Macros expression, with macro $(date)
Attachments (1)
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 1
Roger Accepted Answer
Thanks Sergey

With $(Date) the properties dont works too. I had tried with $(Day, $Month...) without luck, the best I have i an unformatted date... Can I extend $(Day) with a format string like dd.MM.yyyy?
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 2
Sergey Pashkov Accepted Answer
JavaScript expression:

report.generationDay.toString().padStart( 2, '0' ) + '.' +
report.generationMonth.toString().padStart( 2, '0' ) + '.' +
report.generationYear
Attachments (1)
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 3
Sergey Pashkov Accepted Answer
When you tried $(date), you switched the "Language" to "Text With Macros", right?
Attachments (2)
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 4
Roger Accepted Answer
Your JavaScript expression works fine, but if I use $(Date) as TextWithMacros it works no too. :(

Many thanks Sergey for your help, have a nice day.
Roger
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 5
Roger Accepted Answer
Your JavaScript expression works fine, but if I use $(Date) as TextWithMacros it works now too. :(

Many thanks Sergey for your help, have a nice day.
Roger
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 6
Roger Accepted Answer
Your JavaScript expression works fine, but if I use $(Date) as TextWithMacros it works now too. :(

Many thanks Sergey for your help, have a nice day.
Roger
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. Report Editor
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories