- This topic has 2 replies, 2 voices, and was last updated 5 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › From a newbie (Current date)
Hi,
How to display the current date on a report.Displaying it anywhere on the report. The command works with the workspace but doesn’t work with a report. Something I don’t understand.I’m just learning how to do things with Suneido and sometimes it’s not easy to find the answer. Thanks a lot to help me again and again. It is very appreciated.
Regards
Here is the simplest example:
Params(['ShortDate', Date()])
Reports work in terms of “formats”. In this case I used ShortDateFormat. Often the data is coming from the database, but many formats allow you to pass it explicitly as well.
You probably want more stuff on the report, so you can use Vert and Horz to compose formats. For example:
Params(['Vert',
['ShortDate', Date()],
['LongDate', Date()]])
Or if you are using a QueryFormat, you can use do things like:
Params(QueryFormat {
Query: 'tables'
Before() { return ['Text', Date().LongDate()] }
})
(In this case I had trouble getting LongDateFormat to work, so I just used Text and formatted the date myself.)
Hopefully that will give you some ideas.
Thanks very much.
That is just what I need.
Regards