1. Roger
  2. Report Editor
  3. Понедельник, Июль 20 2020, 06:36 AM
  4.  Подписаться через 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
Комментарий
There are no comments made yet.
Roger Ответ принят
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
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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)
Вложения
Комментарий
There are no comments made yet.
Roger Ответ принят
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?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
JavaScript expression:

report.generationDay.toString().padStart( 2, '0' ) + '.' +
report.generationMonth.toString().padStart( 2, '0' ) + '.' +
report.generationYear
Вложения
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
When you tried $(date), you switched the "Language" to "Text With Macros", right?
Вложения
Комментарий
There are no comments made yet.
Roger Ответ принят
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
Комментарий
There are no comments made yet.
Roger Ответ принят
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
Комментарий
There are no comments made yet.
  • Страница :
  • 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