如何在Crystal报表中生成包含Number值的文本框 [英] how grow a textbox in crystal report which contains Number value
本文介绍了如何在Crystal报表中生成包含Number值的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Iam在我的c#应用程序中使用Crystal报表。
我想知道我是否可以增长一个具有数字值的文本框。
在格式对象中它是不可能的。
所以我想知道是否有任何可能的方法来做这个
谢谢
问候
Nirmala Saravanan
Iam using Crystal reports in my c# Application.
I want to know whether i can make grow a text box which has number value.
In format object it is not possible.
So i want to know whether is there any possible way to do that
Thanks
Regards
Nirmala Saravanan
推荐答案
您可以尝试以下代码。请让我知道它是否正常工作我在我的应用程序中没有尝试这个但是在网上得到它...
Dim cryRpt As New CrystalDecisions.CrystalReports .Engine.ReportDocument
cryRpt.Load(Server.MapPath(" .. \ ReportPrint \ CrystalReport.rpt"))
cryRpt.Database.Tables(0 ).SetDataSource(dsHdr.Tables(0))
cryRpt.Database.Tables(1).SetDataSource(dsDtl.Tables(0))
CrystalReportViewer1.Visible = True
CrystalReportViewer1.ReportSource = cryRpt
Dim myTextObjectOnReport As CrystalDecisions.CrystalReports.Engine.TextObject
myTextObjectOnReport = CType(cryRpt.ReportDefinition.ReportObjects.Item(" Text4"),CrystalDecisions.CrystalReports.Engine.TextObject)
myTextObjectOnReport.Text ="你想要文本对象的文本
myTextObjectOnReport.Width = 500
myTextObjectOnReport.Color = Drawing.Color.BlueViolet
让'尝试相同... Thanx
You can try the following code. Please let me know is it working or not I haven''t try this in my application but got it on net...
Dim cryRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
cryRpt.Load(Server.MapPath("..\ReportPrint\CrystalReport.rpt"))
cryRpt.Database.Tables(0).SetDataSource(dsHdr.Tables(0))
cryRpt.Database.Tables(1).SetDataSource(dsDtl.Tables(0))
CrystalReportViewer1.Visible = True
CrystalReportViewer1.ReportSource = cryRpt
Dim myTextObjectOnReport As CrystalDecisions.CrystalReports.Engine.TextObject
myTextObjectOnReport = CType(cryRpt.ReportDefinition.ReportObjects.Item("Text4"), CrystalDecisions.CrystalReports.Engine.TextObject)
myTextObjectOnReport.Text = "Text you want for text object"
myTextObjectOnReport.Width = 500
myTextObjectOnReport.Color = Drawing.Color.BlueViolet
let''s try the same... Thanx
这篇关于如何在Crystal报表中生成包含Number值的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文