bear23
asked on
vb.net change crystal report textobject
In vb6 I was able to change the textobject value how do u do it in vb.net
this is what I have
Dim myreport As ReportDocument
myreport= New CrystalReport1
myreport.Load("..\CrystalR eport1.rpt ")
I tried
Dim textobject As CrystalDecisions.CrystalRe ports.Engi ne.TextObj ect
textobject = report1.ReportDefinition.R eportObjec ts.Item("T ext1")
and if I look at the variable textobject it seems to pull in the currecnt value, but I can't figure out how to change it
I even did
textobject = report1.ReportDefinition.R eportObjec ts.Item("T ext1")
textobject.tet = "Hello"
and nothing happened
any ideas??
this is what I have
Dim myreport As ReportDocument
myreport= New CrystalReport1
myreport.Load("..\CrystalR
I tried
Dim textobject As CrystalDecisions.CrystalRe
textobject = report1.ReportDefinition.R
and if I look at the variable textobject it seems to pull in the currecnt value, but I can't figure out how to change it
I even did
textobject = report1.ReportDefinition.R
textobject.tet = "Hello"
and nothing happened
any ideas??
ASKER
no that doesn't work.
When I put my cursor over that line it says
'Property item is read-only'
I was able to do it with vb6 what is the equivulent in vb.net
When I put my cursor over that line it says
'Property item is read-only'
I was able to do it with vb6 what is the equivulent in vb.net
ASKER
also note that this works
I got this off of a old forum here:
Dim myReport As CrystalReport1
myReport = New CrystalReport1
Dim myTextObject As CrystalDecisions.CrystalRe ports.Engi ne.TextObj ect
myTextObject = myReport.Section1.ReportOb jects.Item ("Text1")
myTextObject.Text = "New Text"
CrystalReportViewer1.Repor tSource = myReport
this works great but not using
Dim myreport As ReportDocument
and see I need this because I am using
myreport.Load("..\CrystalR eport1.rpt ")
so I need to have
Dim myreport As ReportDocument
I got this off of a old forum here:
Dim myReport As CrystalReport1
myReport = New CrystalReport1
Dim myTextObject As CrystalDecisions.CrystalRe
myTextObject = myReport.Section1.ReportOb
myTextObject.Text = "New Text"
CrystalReportViewer1.Repor
this works great but not using
Dim myreport As ReportDocument
and see I need this because I am using
myreport.Load("..\CrystalR
so I need to have
Dim myreport As ReportDocument
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
report1.ReportDefinition.R
mlmcc