Crystal report XI To change text data during Runtime

Posted on 2008-10-20
Last Modified: 2013-12-12
Hii Experts

I am Using Crystal report XI to print a letter. I am calling it Through VB6 using Crystal Report XI runtime.

I have two radio button on my form stating two director name . The letter will contain either of two Directors as an authorized signatory.

The problem how can i insert this text into the report.( If i use a blank Text it say cannot modify readonly property. And if i use Unbounded Field it say object not found.)

Please Suggest Its urgent.

Dim crxApp As CRAXDDRT.Application
    Dim crxRpt As CRAXDDRT.Report
    Set crxApp = New CRAXDDRT.Application
    If optIncrLetter = True Then
       Set crxRpt = crxApp.OpenReport(App.Path & "\Incerment_Letter.rpt")
    ElseIf OptMidterm = True Then
        Set crxRpt = crxApp.OpenReport(App.Path & "\Mid_Term_Letters.rpt")
    End If
    crxRpt.Database.Tables(1).Location = txtMainFile
    To View the report
    Form3.CRViewer1.ReportSource = crxRpt
    Form3.CRViewer1.EnableExportButton = True
    Form3.CRViewer1.EnableGroupTree = False
    Form3.CRViewer1.EnableZoomControl = True
    Form3.CRViewer1.EnableCloseButton = False
    Form3.CRViewer1.EnableSearchControl = True
    Form3.CRViewer1.EnableSelectExpertButton = True
    Form3.CRViewer1.Width = Form3.Width
    Form3.CRViewer1.Height = Form3.Height

Open in new window

Question by:mohitvashistha
  • 2
LVL 100

Expert Comment

ID: 22758441
How about passing the name in as a parameter?


Author Comment

ID: 22764408
can you elobrate more with the code of passing the parameter in Crystal XI

but at design time it ask for list of values but i dont want it to hard code it as my form take list of director from the table (directors which are active) so they will change feom time 2 time.
LVL 100

Accepted Solution

mlmcc earned 250 total points
ID: 22770273
Here is the basic line of code

crRpt.ParameterFields(1).AddCurrentValue "YourValue"


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
A list of useful business intelligence software.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.

807 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