Crystal reports Crystal报表公式if else报表日期条件
我想问一下如何在crystal report公式中使用if-else语句 我想要像这样的东西Crystal reports Crystal报表公式if else报表日期条件,crystal-reports,formula,Crystal Reports,Formula,我想问一下如何在crystal report公式中使用if-else语句 我想要像这样的东西 If Date = "01/01/1900" Then //Display "-" Else //Display Date 但我一直面临的问题是,该字段需要数字、货币和日期错误。 我对crystal report还是个新手。希望你们能指导我。 谢谢试试看 if totext((Date(Year(YourDateField), Month(YourDateField), Day(YourDat
If Date = "01/01/1900" Then
//Display "-"
Else
//Display Date
但我一直面临的问题是,该字段需要数字、货币和日期错误。
我对crystal report还是个新手。希望你们能指导我。
谢谢试试看
if totext((Date(Year(YourDateField), Month(YourDateField), Day(YourDateField))),'dd/MM/yyyy') ="01/01/1900" then
"-"
else
totext((Date(Year(YourDateField), Month(YourDateField), Day(YourDateField))),'dd/MM/yyyy')
谢谢!为什么必须使用ToText?因为在整个公式中必须使用相同类型的数据,所以如果要在“then”和“else”之后使用文本,则必须在条件中也使用文本