Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: object in crystal reports Post Reply Post New Topic
Author Message
jherome
Newbie
Newbie
Avatar

Joined: 29 Jan 2008
Location: Philippines
Online Status: Offline
Posts: 3
Quote jherome Replybullet Topic: object in crystal reports
    Posted: 29 Jan 2008 at 7:13pm

good day!,

please help me, how can i access the objects on crystal reports, i want to input a value to a specific object like label but the value will not come from database, the program it self will put the value..please help..tnx..
 
jeromeCry
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 7:24pm
Hi Jerome.

You can do this using the ReportDocument object model. Create a variable of the type you need (e.g. TextObject) and then assign the report's object to it and change the Text property. Here is a sample for you (change the names accordingly).
Dim myLabel As CrystalDecisions.CrystalReports.Engine.TextObject
myLabel = CType(myReport.ReportDefinition.ReportObjects("Text1"), CrystalDecisions.CrystalReports.Engine.TextObject)
myLabel.Text = "your text"

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jherome
Newbie
Newbie
Avatar

Joined: 29 Jan 2008
Location: Philippines
Online Status: Offline
Posts: 3
Quote jherome Replybullet Posted: 29 Jan 2008 at 7:42pm
thank you very much..it works..thank you again..Smile
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 8:05pm
Glad to hear it. 
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.