【发布时间】:2021-06-24 16:58:46
【问题描述】:
我们有一个 Word 文档,其中包含一个绑定到自定义 Xml 部件的表格。其中一个字段是绑定到文本内容控件的日期。格式为 MMM dd, yyyy。如何将日期格式更改为其他格式(例如 MM/dd/yyyy)?
有问题的报告列定义如下:
column(DateName, Format("Date Name", 0, 4)
{
}
令人沮丧的是,格式返回完整的月份名称,这意味着长月份名称可能有很多不必要的包装。
这是我迄今为止尝试过的:
1. Created a Report extension and added 2 additional columns
a. Formatted column used with Text Content Control
works as expected
b. Date column used with Date Picker Content Control
Report does NOT honor formatting properties set in Content Control
Always displays with the time component
add(DatasetName)
{
column(DateName_Formatted; Format("Date Name", 0, '<Month,2>/<Day,2>/<Year4>')
{
}
column(DateName_Date; "Date name")
{
}
}
这对我来说似乎很荒谬,但似乎我们必须编写一个报告扩展来显示一个格式化的日期。
也许这在未来的版本中会变得更好。毕竟,不久前您还必须创建一个全新的报表才能将另一列添加到数据集中。
【问题讨论】:
标签: report saas dynamics-business-central word-contentcontrol