列文本在报告中被切断

时间:2016-06-17 13:34:08

标签: vb.net crystal-reports

我使用表格中的值制作了一份Crystal Report。所有列都正确显示,除了早期切断的列。它应该说“测试10”,但缺少“10”部分。我连接到数据库但在我的代码中否决了连接。

由于我的覆盖,“10”部分是否未显示?或者是导致这种情况的其他原因?

Dim cryRpt As New ReportDocument()
cryRpt.Load("Location\report.rpt")

Dim cryRpttableLogoninfos As New TableLogOnInfos()
Dim cryRpttableLogoninfo As New TableLogOnInfo()
Dim cryRptConnectionInfo As New ConnectionInfo()
Dim cryRptTables As Tables

'para1
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue As New ParameterDiscreteValue
crParameterDiscreteValue.Value = value
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions.Item("@parameter")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)

'para2
Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions
Dim crParameterFieldDefinition1 As ParameterFieldDefinition
Dim crParameterValues1 As New ParameterValues
Dim crParameterDiscreteValue1 As New ParameterDiscreteValue
crParameterDiscreteValue1.Value = value
crParameterFieldDefinitions1 = cryRpt.DataDefinition.ParameterFields
crParameterFieldDefinition1 = crParameterFieldDefinitions1.Item("@parameter1")
crParameterValues1 = crParameterFieldDefinition1.CurrentValues
crParameterValues1.Clear()
crParameterValues1.Add(crParameterDiscreteValue1)
crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1)

cryRptConnectionInfo.ServerName = servername
cryRptConnectionInfo.DatabaseName = databasename
cryRptConnectionInfo.UserID = userid
cryRptConnectionInfo.Password = password
cryRptConnectionInfo.IntegratedSecurity = False

cryRptTables = cryRpt.Database.Tables
For Each CrTable As CrystalDecisions.CrystalReports.Engine.Table In cryRptTables
cryRpttableLogoninfo = CrTable.LogOnInfo
cryRpttableLogoninfo.ConnectionInfo = cryRptConnectionInfo
CrTable.ApplyLogOnInfo(cryRpttableLogoninfo)
Next

cryRpt.RecordSelectionFormula = "{table.value} = " & value

1 个答案:

答案 0 :(得分:1)

在报告查看器中,

i>选择显示“测试10”数据的标签..

ii>点击该标签,然后选择字段格式选项..

iii>在第一个标签中选中“可以增长”选项。