Ask a questionAsk a question
 

Answerstring variables for text on Crystal Reports

  • Friday, October 30, 2009 11:54 PMDanFSD Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,
    I want to use Crystal Reports for the final report in my program. In my program I have a lot a information that appears on the program forms that is assigned to string variables and they appear in textboxes in various locations on the program forms. I also want the text that is assigend to these string variables to appear in the Text Object Text on the Crystal Report. Is it possible to do that and, if so, how?
    Thank you,
    Dan

Answers

  • Monday, November 02, 2009 9:04 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    As I learnt from your post , you are trying to set the text of text object . You can try to get the object first , then set the text of it:

           TextObject text;
             text = Report.ReportDefinition.ReportObjects[reportObjectName]
                as TextObject;
           text.Text="the text";

    Hope it will help,
    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

All Replies

  • Monday, November 02, 2009 9:04 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    As I learnt from your post , you are trying to set the text of text object . You can try to get the object first , then set the text of it:

           TextObject text;
             text = Report.ReportDefinition.ReportObjects[reportObjectName]
                as TextObject;
           text.Text="the text";

    Hope it will help,
    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.