使用日期和数字设置FormulaFields [英] Set FormulaFields with dates and numbers

查看:159
本文介绍了使用日期和数字设置FormulaFields的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VB6和Crystal Reports XI动态创建了一个水晶报告。 在本报告中,我创建了fieldobjects以及formulafielddefinitions。 我可以将字符串正确插入到报告中,但无法获得其他数据,尤其是日期和数字。

I have created a crystal report dynammically using VB6 and Crystal Reports XI.  In this report, I have created fieldobjects as well as formulafielddefinitions.  I can get string to insert correctly into the report but am unable to get an sort of other data particularly dates and numbers.

Dim DonDate As FieldObject

Dim DonDate As FieldObject

昏暗DonDateFormula作为FormulaFieldDefinition

Dim DonDateFormula As FormulaFieldDefinition

设置DonDateFormula = myReport.FormulaFields.Add( "日期",重现&安培; "字符串(10)")

Set DonDateFormula = myReport.FormulaFields.Add("Date", Recur & "String(10)")

 设置DonDate = myReport.Sections(3).AddFieldObject(DonDateFormula,0,0)
 使用DonDate
      .Name ="OfferingDate"
      .Width = 2100
      .DateFirstSeparator ="/"
      .DateSecondSeparator ="/"
      .DateCalendarType = crGregorianCalendar
      .DateEraType = crLongEra
      .DateOrder = crMonthDayYear
      .DateWindowsDefaultType = crUseWindowsShortDate
      .DayType = crLeadingZeroNumericDay
      .MonthType = crLeadingZeroNumericMonth
      .YearType = crLongYear
  "   .SetUnboundFieldSource"OfferingDate"
 结束

我意识到我需要更改"string(10)"值以匹配其他数据类型,但无法弄清楚要放在这里的内容。 任何帮助都将受到所有数据类型的赞赏。 谢谢。

  Set DonDate = myReport.Sections(3).AddFieldObject(DonDateFormula, 0, 0)
  With DonDate
      .Name = "OfferingDate"
      .Width = 2100
      .DateFirstSeparator = "/"
      .DateSecondSeparator = "/"
      .DateCalendarType = crGregorianCalendar
      .DateEraType = crLongEra
      .DateOrder = crMonthDayYear
      .DateWindowsDefaultType = crUseWindowsShortDate
      .DayType = crLeadingZeroNumericDay
      .MonthType = crLeadingZeroNumericMonth
      .YearType = crLongYear
  '   .SetUnboundFieldSource "OfferingDate"
  End With

I realize that I need to change the "string(10)" value to match the other data types but cannot figure out what to place here.  Any help would be appreciated for all data types.  Thanks.

推荐答案

对于包括RDC和VB 6在内的传统Crystal Report引擎,请将您的问题发布到

SAP Crsytal Reports  Legacy forum

Don


这篇关于使用日期和数字设置FormulaFields的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆