How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
Go Back  Xtreme Visual Basic Talk > > > How do you change the value of the Label (text object) in Crystal Report.Net?


Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2007, 11:44 PM
IndraG IndraG is offline
Junior Contributor
 
Join Date: Feb 2006
Posts: 204
Default How do you change the value of the Label (text object) in Crystal Report.Net?


I have a simple form which display the list of all the new members after the user enter the joining date in the textbox. When the user click the Print button, the form will call a Crystal Report which shows the list and can print it from there.

Displaying the list in Crystal Report is not a problem. However, I want the Report also shows the date that was in the textbox which was entered earlier by the user. My idea is to add a blank label (text object) in CR, which value I would like to change in the runtime. However, I simply can't get it right. The code I use is:

Code:
Dim report As New crList

Report.txtDate.SetText(frmList.txtCall.Text)
However, the second line above comes up with compiling error in VB 2005. Intellisense does not even show txtDate after I typed Report.! It works well with VB.6 and CR 8.5 before. Yet, frustratingly nothing comes up my search on this subject. Surely, others have faced this before and solved it. Anyone can help, please?
Reply With Quote
  #2  
Old 07-12-2007, 04:34 AM
IndraG IndraG is offline
Junior Contributor
 
Join Date: Feb 2006
Posts: 204
Default

Help, please? Anyone?
Reply With Quote
  #3  
Old 07-13-2007, 06:21 PM
IndraG IndraG is offline
Junior Contributor
 
Join Date: Feb 2006
Posts: 204
Default

I found the answer! It was difficult earlier, because I can't use the online MSDN due to our extremely slow network connection (which somehow face problem with MSDN), now, that the company upgrades to faster connection, I am able to access online MSDN, which is a lot more helpful.

There were two main problems that made me unable to find the answer earlier.
The first one is expected, the new language is not as simple as in VB6, and requires the call that is so much more detail, the new call being:

Report.ReportDefinition.Sections(1).ReportObjects("txtDate")

The second one, which threw me off completely, is that, for some strange reason, that call simply does not want to be used directly to change the text, we need to construct a textobject first, then using that to change the text! The complete code is this:

Code:
Dim objText As CrystalDecisions.CrystalReports.Engine.TextObject = _
   Report.ReportDefinition.Sections(1).ReportObjects("txtDate")
objText.Text = frmList.txtCall.Text
Now, for the VB.Net gurus out there. I assume you must know this from beginning, may I know why you simply do not want to answer me? If there is an ettiquete that I have failed to observe, I want to know, and be careful next time
Reply With Quote
  #4  
Old 07-14-2007, 11:04 PM
MKoslof's Avatar
MKoslofHow do you change the value of the Label (text object) in Crystal Report.Net? MKoslof is offline
Cum Grano Salis

Retired Moderator
* Guru *
 
Join Date: Jul 2002
Location: Baltimore, Maryland
Posts: 14,636
Default

1) Don't cross post. As you mention in this thread, What is the new format for .SetText in Crystal Report for VB 2005? your solution here answers another thread on this forum. Leave your related questions in the same post. This is more of friendly advice rather than anything else

2) This quote

Quote:
Now, for the VB.Net gurus out there. I assume you must know this from beginning, may I know why you simply do not want to answer me?
Your question is directly related to Crystal Reports .Net. Maybe forum members have not done much with Crystal reports, or have never had to do anything like this. Personally, I haven't done much of anything with Crystal Reports in probably 2-3 years, therefore I'm not the one to answer your question.

If you have a specific Crystal Reports question, might it be better answered in a Crystal Reports forum? The Business Objects Developer's forum, Google or something of the like?

Again, just friendly advice.
__________________
"Artificial Intelligence is no match for natural stupidity." ~unknown
Reply With Quote
  #5  
Old 07-15-2007, 07:12 AM
IndraG IndraG is offline
Junior Contributor
 
Join Date: Feb 2006
Posts: 204
Default

Thank you so much, MKoslof. You give an interesting point. I never thought that simply because Crystal Report is bundled with VS (and I always use CR with VB) that others who are much more experienced than I with VB, may be not using CR. I always find this forum to be extremely helpful, especially when I was unable to search the web freely due to our poor internet connection in the city that we used to be. Now that the company moves city, we have a much better connection. I will try your advice. I was more concerned if I have done something wrong that may put off other members of this forum, which I highly respected. It is always a fear of mine, when communicating in English, after all, it is my fourth language.

By the way, I usually do not like to cross post as well. However, I was so concern that I may have not written the first one properly (especially the heading) and put people off from even viewing it. That is why I rewrite it again to this one. Thank you for that advice as well.

Again, thank you so much for the advices. It helps a lot. As well as all the help that you have given so far for me too. It is really appreciated. By the way, out of curiosity, if you are not using CR for all these time, may I know what is the reporting do you usually use now?
Reply With Quote
  #6  
Old 07-15-2007, 11:34 AM
MKoslof's Avatar
MKoslofHow do you change the value of the Label (text object) in Crystal Report.Net? MKoslof is offline
Cum Grano Salis

Retired Moderator
* Guru *
 
Join Date: Jul 2002
Location: Baltimore, Maryland
Posts: 14,636
Default

Recently I just haven't had to do any client related reporting. I've been doing Server components and other applications which really don't require the use of Crystal Reports, Active Reports, SQL Reporting Services or any reporting tools.

I have used Crystal Reports before, just have not had any seriously complicated, detailed requirements recently which entailed having to use it.
__________________
"Artificial Intelligence is no match for natural stupidity." ~unknown
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net? How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
 
How do you change the value of the Label (text object) in Crystal Report.Net?
How do you change the value of the Label (text object) in Crystal Report.Net?
 
-->