Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Set label text in Crystal Report.NET on run time

Posted on 2004-10-05
5
Medium Priority
?
499 Views
Last Modified: 2010-08-05
hi Experts,

i want to ask How to set label text in Crystal Report.NET on run time?

in Crystal Report 8.5 i can set the label text on run time using the settext function,
but it didn't work when i tried it in Crystal Report.NET version

thanks in advance
0
Comment
Question by:Axpress
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 12226995
It should work, although it can only be a literal string that can be set.  What's the problem with it?

Another option is to simply create a parameter in your report and pass in the parameter value.  Position the parameter to display wherever you want it.
0
 

Author Comment

by:Axpress
ID: 12243857
thanks for your response frodoman
but it didn't work when i tried the SetText function in CR.NET

below is my code:
Dim rpt As New crMyReport
rpt.txtTest.SetText("TESTING")

the error message is: 'txtTest' is not a member of 'MyProject.crMyReport'
and i did put a Text Object called txtTest in crMyRport

it worked in Crystal Report 8.5

there might be a syntax change in CR.NET, could you give me an example?

thanks
0
 
LVL 42

Accepted Solution

by:
frodoman earned 200 total points
ID: 12249792
Try this instead

rpt = New crMyReport
Dim myTextObject As CrystalDecisions.CrystalReports.Engine.TextObject
myTextObject = rpt.Section1.ReportObjects.Item("txtTest")
myTextObject.Text = "TESTING"
0
 

Author Comment

by:Axpress
ID: 12255553
finally it worked... thanks a lot frodoman
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12257550
Glad to help - frodoman
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question