How to dynamically change the text of a TextObject with embedded DataField?
Hi
I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
Text1 => "Contact Name: {Contact.Name}"
and I'd like to change it to anything else like:
Text1 => "Nom du Contact: {Contact.Name}"
Half of my TextObject is static text while second part comes from the dataset.
(of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
Anyone knows how to deal with that ?
Only way I can think of doing this:
1) Create a formula (call it lang) and enter the string "Contact Name" in it
2) Place the {Contact.Name} field next to the string
3) So now you have:
ContactName: {Contact.Name}
4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
Inherits System.Windows.Forms.Form
Dim Report As New CrystalReport1()
Dim FormulaFields As FormulaFieldDefinitions
Dim FormulaField As FormulaFieldDefinition
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormulaFields = Report.DataDefinition.FormulaFields
FormulaField = FormulaFields.Item(0)
FormulaField.Text = "[formula text]"
CrystalReportViewer1.ReportSource = Report
End Sub
I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)...
Similar Messages
-
How do I change the text in a field with radio buttons or check box?
Hi All:
I have a form that has a list of things with check boxes (could be done with radio buttons) at the bottom. The client wants a single field at the top of the form that repeats the text next to the checkboxes. For example if a user checks the box next to the words "You did thing 1 wrong" the client wants "You did thing 1 wrong" to appear in this text box at the top of the form. If the user checks the box next to the words "You did thing 2 wrong" the client wants the words "You did thing 2 wrong" to appear in the magic box at the top of the page. There are 10 different check box options, so the box at the top would need to be able to have 10 different things in it.
Client is not interested in a drop down menu. I asked.
I am in a bit over my head here, so my question is twofold.
1. Can you do this in Acrobat Pro 10 on a Mac?
2. Can you supply me with code?
Thanks in Advance,
Amy W.Create a text field and make this script its custom calculation script :
var a ="";
if (this.getField("Check1").value == "Yes"){
a="You did thing 1 wrong";
event.value = a;
Also, replace "Check1" with the name of your check box or radio button, and give it an export value of "Yes". -
How do i change the text color in ichat?
How do i change the text color in ichat?
Hi,
In One Chat by word or letter go to the Format Menu as you type (Highlight and change like you would in any other App)
On a more permanent basis the Font, it's colour and the IM background colour are set in iChat Menu > Preferences > Messages
10:12 PM Wednesday; November 23, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
How do I change the text color from blue in Safari on Macbook Pro?
I have trouble seeing the light blue text color -- many article use this. How can I change the text color?
Is this a particular website where you see the light blue color?
If so, please post a link to that site in your Reply.
Exactly which light blue color are you referrting to ?? -
How do I change the text color in a call out box?
How do I change the text color in a call out box?
See http://help.adobe.com/en_US/acrobat/X/standard/using/WS58a04a822e3e50102bd615109794195ff-7 e5a.w.html
Also http://helpx.adobe.com/acrobat/kb/unable-edit-properties-text-box.html -
How do i change the text in a submenu diffrent than the page name? I want it wrap into two lines or be a diffrent title but i can't figure out how to make any changes to the text.
Hello,
Text in Menu/Submenu canno tbe changed while using menu widget. However, if you use the Manual Menu option, then you can create your own Menu and add the hyperlinks according to your requirement.
To create Manual Menu, please follow the steps below :
1) In the Widget palette, go to "Menus" click and drag "Vertical/Hrizontal" into your artboard/workspace
2) Click on the widget itself to a blue arrow appears to the right
3) There is a drop down called "Menu Type" set it to "Manual" (as shown in screenshot) :
4) Now You can create your own Menu and add your own text and hyperlink to this Menu.
Hope this helps.
Regards,
Sachin -
How do you change the text font on the Droid Global Phone
How do you change the text font on the Droid Global Phone. I would like it to be darker (like bold)
Hi.
Below I have provided you with the steps to change your font settings.
From the main menu
Select Settings
Select Display Settings
Select Font Style
You can select from what is available,
Or you select [Get Fonts Online] to find something you want.
Thank you, -
How do you change the text color in your junk mail folder
How do you change the text color in your junk mail folder?
Try Mail Preferences/Junk tab and under " When Junk Mail Arrives" click Performe Custom Action then advanced
you will see the option for colors.
Hope this helps -
How do you change the text color in io7 from white to black?
How do you change the text color on the home page in iO7 from white to black? I tried to invert the color but that reverses everything inclufing pictures.
Yes, you can. If you change your wallpaper to a very light or white color the text turns black.
-
How do you change the text in portrait mode.
How do you change the text in portrait mode. I can edit it in landscape, but when I change the view the Latin and photos can't be edited and swapped with my material. Thanks
iBA should be approached like this:
layout in landscape
edit in portrait
- - check in both on your device
Use the 'disable portrait orientation' option (Inspector/Document) for layouts you just don't see working in any manner but landscape. -
How can I change the text color in pages
Hi , how can I change the text color in pages app
Select the text you want to change.
Tap the i in the top bar.
Tap Style in the top bar.
Tap the Font name/size
Tap Color then choose the color you want the text. -
HT3529 If you have an IPod touch, how do you change the text tones???
How do you change the text tone on the IPod's Message???
Open settings, go to sounds, and then your text tone settings should be there
-
How cna I change the text and background colours in iTunes?
Can anyone tell me how I can change the text and background colours in iTunes? I am a visually impared user and my main requirement on a PC is to change the colour schemem to white text on a black background. Most software adopts the settings of your colour scheme but iTunes goes it's own and has everything on white backgrounds. I cannot read from white backgrounds (dazzle - that sort of thing). I have never used iTunes for this reason. I have always been a devotee of by far the best media player out there Musicmatch Jukebox, who allow you to edit skins in every detail. However, recently Musicmatch was taken over and users were forced to migrate to the ridiculously poor Yahoo Music Jukebox. A massive downgrade in so many ways.
I want to use iTunes but will not be able to if I cannot sort this issue out. I downloaded 7.5 before discovering that if you want to use Multi Plugin for skins you need to go back to iTunes 7.02. I've done that, but the skins available are completely pointless to my eyes. They don't change the colours of the main components, just the graphical bit at the top.
What I need to do is change the background of the main browser windows so that they are black and the text is white (you know the track lists and tree views, etc). This must be a very simple case of just changing the codes somewhere, but I can't find where. I read somewhere that you need to hack into something call ResourceDB inside a file called iTunes.jar. There is no such file on my PC. Could that be a Mac thing?
Please help someone if you can. I would like to become an iTunes user. There seems to be more music available than on Napster which I currently use.
Thanks in advance
ZIn my opinion, it seems that Apple has decided to sacrifice usability so that iTunes would look more like a Mac application. You are probably already aware that using Windows' built-in high-contrast settings do not work in iTunes.
I did some hacking at the resource file a while back, but I was unable to figure out how to change the color of the background. IIRC there was a resource whose description indicated it would change the background color, but when I changed the resource, nothing happened.
I was, however, able to figure out how to make the "large" font much larger (any size you want, I suppose). Will that help? See
http://home.comcast.net/~teridon73/ituneshacks/index.html
You should provide feedback to Apple:
http://www.apple.com/feedback/
I don't think it is too harsh to call it "shameful" that Apple has chosen this design path. Where I work, we are required to make ALL applications (or any computer interface, such as a website) section 508 compliant. Of course, I'm being a bit of a hypocrite, because I've made no effort to make my website compliant. If you have trouble reading it, please let me know. -
How can I change the text in an iPhoto book from Spanish to English?
How can I change the text in an Iphoto book I'm trying to create from Spanish to English??
In the Creative Cloud Application you can change in Preferences the App language. Then you can download and install additional the other language.
With Photoshop you can now go to Preferences > User Interface and switch between all installed and available languages. -
How can I change the text in F1 Help?
I made a General Text in T-code SE61, the name is 'ZTEST'.
And at the SE80, in the local program,
I used functions like these:
HELP_OBJECT_SHOW
HELP_OBJECT_SHOW_FOR_FIELD
DSYS_SHOW_FOR_F1HELP
These functions can display F1 HELP.
But I want to send a text using functions,
and display F1 HELP.
Example)
'Hello! This is your program.'
Sending this to F1 HELP by functions, and display.
If you know, please help me.
Thank you.
Edited by: Jaime White 999 on Apr 19, 2011 9:20 AMMy source is like this:
REPORT z_test008.
DATA: lt_links TYPE TABLE OF tline.
SELECTION-SCREEN: PUSHBUTTON 2(6) s_button USER-COMMAND click.
INITIALIZATION.
s_button = 'uB3C4uC6C0uB9D0'.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'CLICK'.
CALL FUNCTION 'HELP_OBJECT_SHOW'
EXPORTING
dokclass = 'TX'
doklangu = sy-langu
dokname = 'Z_TEST'
doktitle = 'Description'
* CALLED_BY_PROGRAM = ' '
* CALLED_BY_DYNP = ' '
* CALLED_FOR_TAB = ' '
* CALLED_FOR_FIELD = ' '
* CALLED_FOR_TAB_FLD_BTCH_INPUT = ' '
* msg_var_1 = ' '
* MSG_VAR_2 = ' '
* MSG_VAR_3 = ' '
* MSG_VAR_4 = ' '
* CALLED_BY_CUAPROG = ' '
* CALLED_BY_CUASTAT =
* SHORT_TEXT = 'X'
* CLASSIC_SAPSCRIPT = ' '
TABLES
links = lt_links
EXCEPTIONS
object_not_found = 1
sapscript_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDCASE.
I just want to know that how can I change the text in F1 HELP, do not use SE61.
In the source, I want to send the text by functions, and display that.
Thank you.
Maybe you are looking for
-
Weather icon should show current weather
if they can have the Calendar icon show the current date and day, they need to have the Weather icon show the current temp and weather.
-
Technical Communication Suite 3 - Install Location Correct?
Hi All, I've just installed the new TCS3 upgrade from TCS2.5 on my XP Pro SP3 machine. The installer on the DVD seemed to work fine, but I just noticed that it didn't create a \Technical Communications Suite x\ folder like other TCS versions had. It
-
File appears to be unsupported or damaged - LR 2.3
I have randomly been getting this message on jpegs that I have processed in LR 2.3 and also opened in PS CS3 and saved. My RAW files are fine, and up until yesterday, if I saved a TIFF copy, the TIFF was fine. Now I am also getting TIFF files being
-
Can't figure out how to update software to os5 on my iPad. When I go to general there is no option to chose download software. Help. What do I do? Thanks!
-
I created an animation in Photoshop CS4 [7 images that do fade-in transitions at 24 fps] using the timeline method, and after doing a "Save for Web" and waiting for it to process, the entire animation is not rendered. When I viewed it in the player,