Link to home
Start Free TrialLog in
Avatar of Axpress
Axpress

asked on

Set label text in Crystal Report.NET on run time

hi Experts,

i want to ask How to set label text in Crystal Report.NET on run time?

in Crystal Report 8.5 i can set the label text on run time using the settext function,
but it didn't work when i tried it in Crystal Report.NET version

thanks in advance
Avatar of frodoman
frodoman
Flag of United States of America image

It should work, although it can only be a literal string that can be set.  What's the problem with it?

Another option is to simply create a parameter in your report and pass in the parameter value.  Position the parameter to display wherever you want it.
Avatar of Axpress
Axpress

ASKER

thanks for your response frodoman
but it didn't work when i tried the SetText function in CR.NET

below is my code:
Dim rpt As New crMyReport
rpt.txtTest.SetText("TESTING")

the error message is: 'txtTest' is not a member of 'MyProject.crMyReport'
and i did put a Text Object called txtTest in crMyRport

it worked in Crystal Report 8.5

there might be a syntax change in CR.NET, could you give me an example?

thanks
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America 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 Axpress

ASKER

finally it worked... thanks a lot frodoman
Glad to help - frodoman