How do I display a number variable?
Hi all,
I think what I'm trying to do must be very simple, but since
I know very little about programming I'm stumped! :) I have a java
powered slide show and I want to show what slide the user is
currently viewing. The variable for the current slide is ImgNum. I
tried writing it as <p>Image <var>ImgNum</var> of
14</p>, but that didn't work. Is it because my variable is a
number and not a string? Thanks for any advice!
"shnoozin" <[email protected]> wrote in
message
news:eena03$e9c$[email protected]..
> Hi all,
>
> I think what I'm trying to do must be very simple, but
since I know very
> little about programming I'm stumped! :) I have a java
powered slide show
> and
> I want to show what slide the user is currently viewing.
The variable for
> the
> current slide is ImgNum. I tried writing it as
<p>Image <var>ImgNum</var>
> of
> 14</p>, but that didn't work. Is it because my
variable is a number and
> not a
> string? Thanks for any advice!
>
If you need to convert the numeric variable into a string you
can simply use
the statement:
var myString = ''+ImgNum;
Put that statement in the line before you use the new
myString variable so
that myString always reflects the current value for ImgNum.
The statement creates a null string - that ensures you get
the required
string variable type - then appends ImgNum to complete the
numeric to string
conversion process.
Hope that works!
Martin.
Similar Messages
-
How can i display the Number instead of E
Hello Everyone ;
I am getting confused. How can i display the Number but the Exponential value is coming as E.
SQL> select sum(amount_sold) from sales;
SUM(AMOUNT_SOLD)
1.1287E+11
Table details ..
SQL> desc sales
Name Null? Type
AMOUNT_SOLD NUMBER
i want to change 1.1287E+11 to "numeric"
DB : 10.2.0.4
os : rhel 5.1Just a minor correction on an obvious math/responding too fast error: 1.1287E+11 is a 12 digit number. You move the decimal 11 positions to the right which would add 7 zeroes to the value.
MPOWEL01> l
1 select length(to_char(1.1287E+11)), to_char(1.1287E+11,'999,999,999,999'), 1.1287E+11 "TEST"
2* from sys.dual
MPOWEL01> col TEST format 999999999999
MPOWEL01> /
LENGTH(TO_CHAR(1.1287E+11)) TO_CHAR(1.1287E+ TEST
12 112,870,000,000 112870000000the problem was that the OP failed to alias the sum result to the formatted column rather than the lenght of the data.
HTH -- Mark D Powell -- -
How can I display a formula variable in the report?
Hi,
I have a requirement to display a formula variable value in the report. When the user runs a report this variable value should be called once and displayed below the report title or in a specified cell. Is it possible something like this could be done? if yes, can someone tell me how can I achieve this functionality. I appreciate your time and effort with points.
Thanks,
Rao.Hi Bhanu,
In the query properties you can only see text variables and not the formula variables. If I define my number of working days as text variable and I can display in the report. However, I need to use this variable in some calculation in the report, so it has to be formula variable in order to use in calculations. I appreciate your input with points.
Thanks,
Rao. -
In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the variable is updated on the main vi front panel which is what is expected. My question is how can I display the changing value of "Field Reading" on the main vi front panel as the "for" loop in the subvi is running?
Thank you.
Solved!
Go to Solution.
Attachments:
Doc2.docx 554 KBHopefully I can explain it well enough. It really is simple.
1) Create an empty global variable and call it something like User Interface References.vi
2) For each and every control and indicator on your front panel, right-click and select Create/Reference
3) Place these references wherever you like (I use a series of Event cases to perform my initialisation and these all live in one of these event cases). They can be placed anywhere in the main vi.
4) For each of the references, right-click and select Create/Indicator
5) Moving to the front panel, Cut all the indicators and Paste them in the global variable (eg. User Interface References.vi)
6) Moving back to the block diagram, wire the global variable to each of the references and select the same named global variable.
All the hard work is now done (until you add another user interface terminal). You should now have something that look as shown below, [except the reference labels would be to the left (not sure why the snippet put them above)]. In my latest program I have 82 references!
Done. You can now access all your front panel controls and indicators anywhere in your program as shown below.
You can just select Value in most cases, but in this particular case I wanted to fire off an Event to do some things (log the alarm) as well as just update the value. So, this is another bonus with the method.
Hopefully this all makes sense. If not, let me know. -
How Do I Display My Number on my Screen Permanently?
How do I diplay My Number on my BB Curve 9700 3G? I can't figure it out!
Hi gmarchi and welcome to the BlackBerry Support Community Forums!
To clarify, do you want to display your phone number on the home screen at all times? If so, this feature is not available. You could, however, create a background image displaying your number and use it as your wallpaper .
Thanks!
-CptS
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
How can i display the presentation variable in my reports
Was facing a problem to display the Presentation variable on my report, however i managed to display it on answers, but when i try to display it on my Publisher report it doesnt shows any data.
I use to Select the Values From my prompt, and it shows the Reflection of Presentation Variable on my Answers Report. but i cannot see the Reflection of data on my Publisher Report Please any One Can help me with this.Removing '' does not work it given the following error
"State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <@>: Syntax error [nQSError: 26012] . (HY000)"
and by adding space you mean that I use it as '@{ BbranchCode}'?
What I am doing at the moment is
1. Write the given query in oracle BI Answers.
2. Made a dashboard prompt in Answers.
3. Made a report in dashboard using the Answers report and the dashboard prompt.
Up till this step it works perfectly fine and the data displayed in manipulated on the basis of the values selected in the prompt.
4. Now what I want is to display this report in Dashboards using oracle BI publisher. For that I use the template builder provided for microsoft word.
5. I login to that add-on, open the answers report where I can see the field in the rowset. I select that field and save the template.
6. I open the oracle BI publisher and make a new reprt with data model of the answer's report and Layout of the one I just created.
7. I open the dashboard and put in the BI publisher report in the same page in which the asnwers report and the prompt was.
8. Upon changing the values of the prompt the report in the answers is still getting manipulated but I am not able to see its reflection of the BI publisher report.
The thing is that I am currently using this presentation variable to manipulate my reports in dashbords using dashboard prompts. The report is built in oracle BI Answers and it is working perfectly fine with it. Now when I use the template builder for Microsoft Word and open the template with the answers's report of this query I see the field in the row set but when I display the template in the dason the bases of this presentation variable the report in the oracle BI Answers is getting updated when I change values but when I use the template builder for microsoft word the the field is being shown in the row set. -
How do I display the number of messages in a message folder under version 3.1.2?
I want to display the number of messages (read and unread) next to the folder name as in my previous version.
I used to go to Tools...Options...Advanced...General Tab and check "Show expanded columns in the folder pane".Read the Release Notes for Thunderbird, that issue is covered. Scroll down to "Known Issues", "All Systems", second paragraph: https://support.mozilla.com/en-US/questions/748278
As Quarantine said, alway post to Thunderbird questions to one of the 2 forums that he listed in his response. -
How can I display a CreateTimeSpan variable?
I am trying to figure out how to properly output a variable
that was created using CreateTimeSpan in a readable format. Here is
the initial code:
<cfset MyTime = #CreateTimeSpan(0,0,30,0)#>
And lower on the page:
<cfouput>#MyTime#</cfoutput>
Which unfortunately results in showing this:
0.0208333333333
But I want it to show as
30 minutes
Without going into too much detail, the short is I am trying
to output this for the user and only need to know how I can format
0.0208333333333 to the appropriate amount of time *i.e. 30 minutes,
2 hours 30 minutes, 2 days, etc.
Any help on this is greatly appreciated!Well you weren't as far off as you think :). Initially I was
going to want to do it so it dynamically figured if it should
display as days, hours, minutes, etc....but I decided that was good
enough for the moment.
Also I do intend to allow the admin user to indicate the
timeout value, but not as you might think. Basically I have an
/install/ folder which will automatically launch if value on
application.cfm
<cfparam name="application.install" default="FALSE">
Within that set of self contained pages, it will take them
through a series of questions and the end results will:
1. Test database connection.
2. Allow them to indicate whether they want to offer support
or not (i.e. can indicate a support email address and if so, then a
support form shows within the admin tools + sends out automated
emails on any errors).
3. Allow them to indicate their own time out value.
Upon completion of all of these things, it will then either
write to the application.cfm OR if CFFILE is turned off, give them
the code to copy and paste into the application.cfm, save and
upload...which in turn includes the timeout variable.
I am extremely thorough on my applications and previously at
bottom of the page had it hard coded as "will time out in 30
minutes" but decided that should be determined during install and
dynamically show.
Have lots of work to do on that application before launch
yet, so I didn't want to waste too much time on that single item
:). THanks again! -
How do I display the number of words I've written in the new Pages update?
I just downloaded Mavericks and updated pages and I can't figure out how to display the amount of words I have written. It used to automatically be at the bottom of the page.
Toolbar > View > Word Count
Peter -
How can i display page number in this format in xml publisher report (1-1)
in this format
1-1
1-2
1-3
2-1
2-2
2-3
can i display page nos in this format in xml publisher please help me on thisHi,
Use the SET COUNTRY..
SET COUNTRY 'US'.
write: / sy-datum.
SET COUNTRY 'IN'.
write: / sy-datum.
Thanks,
Naren -
How to add commas to number variables?
I need to turn my double variables into String variables and add commas where appropriate.
for example
1000
would be 1,000
is there a library for doing this or do I have to search the string for length, etc...Just initialize your app setting:
java.util.Locale.setDefault(java.util.Locale.ENGLISH);or choose any other locale to get the format you want. -
Displaying Customer Exit Variable with derived value from another ODS
Hi All,
Sorry if this question has been answered before. I searched the forums and could not find anything specific to my problem.
I am new to BEx Query. Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF. This query is a payroll query for US/Canada. This new variable will be based on the user input date for the query. We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs. The pay date is stored in another ODS.
So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2. Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
The data displayed off the user input date is displayed in rows. This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...). For this to happen correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
Thanks.
Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
Edited by: Amir Hasan on Jun 11, 2009 6:25 PMHi Amir,
What i can understand from u r requirement is you want to few columns that will show something like below,
User entered date = x
Period of X to Period of (X-7) Period of X to Period of (X-14).....
This can be done by CMOD for variable only.
Logic steps :
1) Take the user input.
2) Find out the period by using T009B table and store in temp variable.
3) Do day -7 and find out period for the same
4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
Let me know if you have any doubt
Regards,
Viren -
Message-Popup: How to display a number (from variable) in hex-format?
Hello,
i have a numeric FileGlobal that is display in a MessagePopup-step with str(FileGlobal.param1)
How can i change this that it display the number as hexvalue.
For example if Number is a 10, then the MessagePopup should display a 0xA.
Thanks for help
Solved!
Go to Solution.HI,
You should try this expression Str(FileGlobal.param1,"%X",1 ,True)
Hope this helps
Rodéric L
Certified LabVIEW Architect -
How can I display char if a variable is null
Hi All,
How can I display char if a variable is null in sap business object
item name
Office Visits
Non-Emergency ED Utilization
Non-Preferred Pharmacy
above items are value and they are populating for this month but form next month "Inpatient Stays" a new item will add at database level
i want to display this item with current month
final result should be
item name
Office Visits
Non-Emergency ED Utilization
Non-Preferred Pharmacy
Inpatient Stays
i have tried with ISNULL function but it is not working
please help i am using SAP BO 3.1
Thanks in Advance
RanjeetYou should be able to findout NULL using isnull([object]) function.. at report layer..
Try with the below formula which should work for you
=If Isnull(trim([object])) then "Inpatient Stays" else [Object] -
How to create a conditional report variable, which displays the conditional
Hi Experts,
Could you please guide me how to build a conditional report variable
For ex:
I have the data for ATM and POS in the table. I will only get the data of ATMS because of the filters, I still want to display the POS in the report and the values for the POS will be 0.
Actual Output:
Description Vaule
ATM 100
Desired Output
Description Vaule
POS 0
ATM 100
Thanks in advance...
Regards,
Sadiq.Hi Gaurav,
I have a table which has columns and data as follows
Year Description Trans.Amount Trans.Count
2009 ATM 1000 50
2010 ATM 5000 200
2010 POS 1500 100
If I build a report and fetch the data for year 2010, report will display ATM and POS transaction amount and count.
Whereas, for 2009 there are no POS transaction, report will display only ATM transactions. But user needs the POS also to be displayed in the report with 0's for trans.amount and Trans.count.
Could you please guide me how to achieve this, if it is possible
Regards,
Sadiq.
Maybe you are looking for
-
Well, first of all, I was tying to create a web-based computer game in Notepad in H.T.M.L., C++, and JavaScript codes. But when I tried to open the completed product, Firefox only came up with a blank page. What do I do with this? And also, I unwitti
-
When I plug my ipod touch into the computer it just charges and won't appear on itunes!
when I plug my ipod touch into the computer it just charges and won't appear on itunes!
-
Error when launch agentscheduler.sh
aix 5.3 my odiparams.sh ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriver ODI_SECU_URL=jdbc:oracle:thin:@172.16.5.2:1521:myinstance ODI_SECU_USER=odi_rep_owner ODI_SECU_ENCODED_PASS=agent encode oracle ODI_SECU_WORK_REP=ETL_WORK_REP ODI_USER=SUPERVISOR
-
Resizing IE window makes game errors
I am running Windows Vista and the latest Java Run Time, If I open up runescape in full screen the game plays with no problems, if I then resize the window (smaller) visually it looks fine until I try to click somewhere with the mouse, and I end up c
-
How to use same collection on two forms
Hi , My issue scenerio is-- I have two forms one is calling form other is call form. User will go to calling form and press button to open call form. In call form user will select some records. That records i want to store in collection. then user wi