Link to home
Start Free TrialLog in
Avatar of silaupura
silaupura

asked on

Append text to textobject in a .rpt report using VB6

I have made a .rpt file which I am using in report viewer control in vb6. as

dim rptApp as new CRAXDRT.Application
dim rpt as New CRAXDRT.Report

Set rpt = rptApp.OpenReport(App.Path & "\testrpt.rpt")

CRViewer1.ReportSource = rpt
CRViewer1.ViewReport


What my problem is that I want to append some text in textObjects of this report.
Say, if text in one textobject is "Experts-exchange" , I want to append ".com" to it so that it will become "Experts-exchange.com"
ASKER CERTIFIED SOLUTION
Avatar of GJParker
GJParker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

You could also do this with a formula.

{Table.DatabaseField} & ".com"

If there aer several actions you could use an if statement like

IF {Table.DatabaseField} = "Experts_Exchange" then
   {Table.DatabaseField} & ".com"
else if   ETC

mlmcc
Avatar of silaupura

ASKER

ok last ques before I split points.

Now I need to send a parameter to .rpt file so that I can display custormers areawise.

eg. My report is bound to a table with all customers in the country. Now I want to display customers of a particular city. so I want something like

where city = "city_name"  facility.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok done.
Thanks mlmc and GJParker both. specially mlmc as u have given me what I wanted.

Actually I have only 85 points left with me. can u tell me how can I increase my points without have to purchase them so that I may ask more questions with higher points.
OOPS!!! beat me hard :(

I actually selected mlmc for the accepted answer and GJParker as 'assisted one' but how have they interchanged I donno.

Sorry mlmc.
>> I  actually selected mlmc for the accepted answer and GJParker as 'assisted one' but how have they interchanged I donno.

That is the way it seems to work.  I think from my experience the last one selected becomes the Accepted Answer but I can't swear to that.

Glad I culd help

mlmcc