PASS VARIABLE TO TEXT FIELD 
Author Message
 PASS VARIABLE TO TEXT FIELD

Hi,

How do you pass a variable from VB 5.0 application to a text field
in the report.

For instance, I would like the text that the user has entered in a text
box control (in the VB application) to be sent to a text field in the
report. Should I use a formula field instead?  

If anyone can send me sample code on how to do this it will be greatly
appreciated.

-Thanx
-Rachelle Crescini



Tue, 15 May 2001 03:00:00 GMT  
 PASS VARIABLE TO TEXT FIELD
If you goto Seagate's website and download the Crystal RDC, there will be a
sample app called objectmodel.vbp which shows you how to do this..

You can update the text field in a .rpt directly from your VB application
using code like this...

Set CrystalSections = cr.Sections
For Each CrystalSection In CrystalSections
    Set CrystalReportObjects = CrystalSection.ReportObjects
    For Each reportobject In CrystalReportObjects
        If reportobject.Kind = 2 Then '*** 2 is for a TextObject ***
            Set CrystalTextObject = reportobject
            '***copy your Vb Text into the Crystal Text ***
            CrystalTextObject.SetText (txtText.Text)
        End If
     Next reportobject
Next CrystalSection

Quote:

>Hi,

>How do you pass a variable from VB 5.0 application to a text field
>in the report.

>For instance, I would like the text that the user has entered in a text
>box control (in the VB application) to be sent to a text field in the
>report. Should I use a formula field instead?

>If anyone can send me sample code on how to do this it will be greatly
>appreciated.

>-Thanx
>-Rachelle Crescini




Mon, 21 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing variables from a text box to a document.write text box

2. Passing a Field Name as a Variable

3. Passing a Field variable

4. Passing parameter field variable to report

5. TextStream Object, passing an opened text file to a variable

6. Pass Variable to Text Object

7. How to pass a VB variable to a report text object

8. Passing Text Fields

9. VB Variables, SQL Server to Text Form Fields

10. Moving Text field data into variable

11. How to pass a text field to the Cystal Report

12. How to pass VB5 values to Crystal Report text field

 

 
Powered by phpBB® Forum Software