Fomula
I am trying to create a fomula within a form that calculates balance from amount. I thought if I created a procedure it would do the trick but my Pl/sql is so poor that I keep getting error message.
create or replace procedure calcnewbalance as
balance;
amount;
withdraw;
deposit;
begin
if withdraw
then balance - amount
:= new balance
else
deposit
then balance + amount
:= newbalance
end if;
end;
can any one help me debug.
thanks
Betty
If you are creating a formula in Forms, then you need a function, not a procedure:
Function calcnewbalance
(balance in number,
amount in number,
transaction_type in varchar2)
Return number is
Balance_out number;
begin
if transaction_type ='WITHDRAW' then
balance_out := balance - amount;
elsif transaction_type ='DEPOSIT' then
balance_out := balance + amount;
end if;
Return balance_out;
end calcnewbalance;
Similar Messages
-
Hi Gurus,
I'm unable to open query,as i did some changes to my fomula variable(In the default values i have assigned 'Y').I'm getting the following error when i opened in the analzyer
Exception condition "INPUT_NOT_LEGAL" raised.
I'm unable to open in query designer.
Is there anyway that i can go to fomula varibale table and edit the value that i have given.Hi Jack,
Check table RSZGLOBV. It will be useful for you
Regards,
Saurabh -
I am trying to create a fomula within a form that calculates balance from amount. I thought if I created a procedure it would do the trick but my Pl/sql is so poor that I keep getting error message.
create or replace procedure calcnewbalance as
balance;
amount;
withdraw;
deposit;
begin
if withdraw
then balance - amount
:= new balance
else
deposit
then balance + amount
:= newbalance
end if;
end;
can any one help me debug.
thanks
BettyThis is a duplicate post of this:
fomula -
How can i get report filename in a fomula column
Hi,
We are using Oracle Reports 6i.
i want to get the filename of current report in a formula column.
how can we take the current report filename into a variable in a formula column..
If it is possible please provide your valuable inputs on how to achieve this or please provide any helpful pointers
Please get back to me if my requirement is not clear
Thanks,
anishIts not possible to get the report file name in a formula column
-
How to Map Fomulas for Float Glass Process
Hi All,
Can anybody suggest how to map formulas for float glass process.
As in float Glass process continuous production is going on single line, within that continuous ingredients are added in furnace and molten glass mass is coming out. this molten glass is now adjusted to particular thickness and then finally cut into specific sizes as per cusotmer requirment.
Final product is in various thickness, width and length.
Entire process is automated.
If anybody already implemented same scenario, please share knowledge.Hi
The following is the mapping process and it is tricky process need to map carefully.
You can define this as a single formula.
Output: Packed - cut to size - Finished Good Item.
Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
Packaging materials + Labels + Boxes etc.
Define Routing:
Resource: Furnace, Any other importance resource like Equipment that controls thickness, cutter etc, Labor, Associated Overhead
Create recipe using the formula and routing.
Various factors that can affect the mapping:
1) Formula maintenance: You have to define formula for each output item.
2) Possibility of dynamic determination of output item: If it is possible to produce different combination of thickness/width (and hence different FG item) in the same batch, then this won't be the right mapping.
3) Process variations: Also formula mapping depends on how accurate is production process. If user wants to produce item X (say thickness 10mm) but due to quality issue produced item Y (say thickness 9mm) and such cases happens very often, this won't be right solution.
4) Inventory measurement: This will determine the break-points. If you cannot measure the quantity (or even estimate) then you cannot define it as an intermediate item.
I will explain how point 4 can lead to different way of formula mapping.
Say you have a furnace that needs to run continuously for better quality or throughput. Hence you will be continuously adding raw materials to furnace and produce different outputs. You can break the single formula into multiple formulas as -
Formula 1) Output: Molten mass of glass
Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
Formula 2) Output: Packed - cut to size - Finished Good Item.
Input: Molten mass of glass
To have formula in such fashion you should have a way to measure or estimate the weight of Molten mass of glass.
If you are estimating the weight, there should be historical data available to determine what should be realistic output quantity for given input quantity. How much will be process loss and loss due to unwanted by product such as slag etc.
Further you can break formula 2 as
Output: One large sheet of give thickness
Input: Molten mass of glass
Output: Packed - cut to size - Finished Good Item.
Input: The large sheet of give thickness.
This kind of different mapping is possible which normally depends on:
1) Complexity of process
2) How complex BOM structure user wants to have
3) Are there any benefits of maintaining such complex system - like accurate costing or accurate production monitoring or facilitating planning process.
4) Can user maintain the complex system? Are they ready to capture data at finer level. Is it possible to capture the data.
5) And most important thing is how to handle exceptions. If every thing goes smoothly as planned (less exceptions) then user can have and afford any level of complexity. But if there are many exceptions to the normal process you have to concentrate more on how to handle the exceptions.
6) Satisfy all users: Accounting, Planning, Production, Quality, Inventory handling. Formula/Recipe touches all these modules.
Regards
Raj
Sierra -
How can i use Tax code created in Tax Declaration Setup in an Invoice?
I have created a Tax code in Administration>Setup>Financials>Tax>Tax Declaration Boxes with Formula i.e. TC = V1+V2 where V1 and V2 are existing valid Tax code created in Administration>Setup>Financials>Tax>Tax Groups links to different Tax account .Do it in 0584 IT sub type ( 0001 )House property.
Regards
Satya -
Need a help in Report for Fomula key figure
Hi
I am doing Trial Balance report, in my report there are two Formula fields
Net Dr Net Cr
100 -100
- 200 200
The values are like this, Know what the user want is where the negative sign come that should display 0 in reports. I tried condition by takinf Net dr greater them 0 , and Net Cr greater than 0 , but its not working.
Regards
ShashiHi,
If you want to create a formula for displaying 0 when the value is negetive, then do the following in formula:
<b>(Net Dr <= 0) * Net Dr</b> and similarly another formula for <b>(Net Cr <= 0) * Net Cr</b>.
Hope this helps.
regards,
Pruthvi R -
Hi all,
we have a query that include Fiscal/year period and Amount in it.
For example,Input 2008001 and 2009001,I want to calculate the gap amount between two Fiscal/year
period.
Moveover,the format is below:
2008001 2009001 Gap
Cost center 1000$ 2000$ 1000$
I don't know how to add Gap field to report,please help me.Dear both,
Thanks for your reply.
I have try this way,but there may be a problem.
Create two Restricted key figures RKF1 and RKF2.
RKF1 = amount restricted to fiscal year 2008001
RKF2 = amount restricted to fiscal year 2009001
I also add the variant in both restricted key figures,the result of report didn't show the input fiscal year
period(like 2008001,2009001) instead with the name of Restricted key figures(Like RKF1 and RKF2).But
i really need the variant input dynamic to compare the fiscal year period amount(Like User can input
2008001,2009001 or 2008002,2009002).
Regards,
James. -
Entering a matrix in a fomula knot results in "variable not defined" error
if i enter a matrix in a formula code, the program keeps telling me i have a undefined variable.
usually, matlab does work with code like "M=[123 456];" just fine.
the manual states, that in a formula knot code just works like it works in matlab.
what's my mistake?to use a matrix inside a formula node, you must declare a 2-dimensional array of the type you want to use. for example:
int32 y[2][2];
to assign values to the fields you can index them:
y[0][1] = 1;
you also could use a loop to put the values or pass a allready initialised array into the formula node.
Maybe these links also give you some hints:
problem regarding the formula node
array formula node
regards,
Robert H.
National Instruments -
Hai Friends ,
I have Appplied Calculate Single Value as Rank number in Sales Qty Kf .So in the Report it is successFully showing the Rank Number Based On the Sales qty . I wanted To make the Top 15
Rank numbers As Rank (1 or A) and next 15 as Rank (2 0r B) and the others as Rank (3 or C)
So i have taken the Rank Formula In Another Formula But here Instead Of taking the Rank Number
It is taking the Sales Qty any light on this
<removed by moderator>
Regards
Prasad
Edited by: Siegfried Szameitat on Jun 18, 2009 3:28 PMCheck the message in the link, similar to ur problem...
Re: How to display RANKED list -
Vofm fomula routin activation error.
i have complete a formula via tc:'VOFM', and i would like to active the routin, but get error message" Report/Program statement missing, or program type is i (include)". what can i do?
Hi,
You have to create the routine via VOFM, an include will automatically be created in the required main include/program. Put you your codes in the routine/form activate it. then got back to VOFM :
- select routine
- Click on EDIT and activate
This will activate your codes and routine.
Regrads,
Dev. -
I have a Measures member called TOP_PERCENT which uses the following member formula:
- *iif(isLeaf([Products].Currentmember) and contains([Products].Currentmember, TopPercent(Siblings([Products].CurrentMember), 50, [Measures].[Revenue])), 1, 0)*
This formula checks if the currentmember of [Products] dim is part of a set of members returned by the TopPercent function. The value of TOP_PERCENT for the current Products member is set to *1* when the expression is TRUE.
My issue is the following: I also have a [Period] dim, and when the above expression returns a TRUE, I want the value *1* to be set at the intersection of each sibling of a given [Period] member (say month). In other words, I want to add something to the formula like: *[Period].CurrentMember.Siblings = 1* . So if the current member is January, I want all the remaining months of the year to also get a *1*
What i the correct MDX syntax (for membe formula) for achieving this?
Thanks in advance for any help.
Edited by: 806008 on Nov 22, 2010 2:15 PM
Edited by: 806008 on Nov 22, 2010 2:16 PMHi,
From my understanding part one is simply slicing those measures by that set. It should return an aggregated record for the location in the cube specified. Here is a clear example using Adventure Works cube. I want to bring back Internet Sales for
05/01/2007 where the currency is Dollar for product 346.
The query below will return one record, this record is the aggregated data for that specific location in the cube.
SELECT
{[Measures].[Internet Sales Amount]} ON COLUMNS,
NON EMPTY
([Date].[Date].&[20050701], [Product].[Product].&[346],[Destination Currency].[Destination Currency].&[US Dollar]) ON ROWS
FROM [Adventure Works]
Note it looks like your statement is bringing back the aggregated total for all receipt numbers and product codes for a specific Branch and Till Button (ID of 11) for 2/8/2014.
No part 1 returns many rows not one row. Like what i have said part 1 and part 2 returns exact same result, which is cross join of those sets (applied non empty afterwards). -
Change The Color Of Fomula Field Based On Results
I am using Crystal XI and I am familar with the Highliting Expert, but my question is can I have a formula field print red on the report based on a certain condition, blue on a different condition, etc. I am not sure how to code this if possible, so I will give an example:
If Sales ($100) - Cost ($50) = Profit ($50) then print field red
else if Sales ($80) - Cost ($40) = Profit ($40) then print field green
else print field blue.
I will need to add additional criteria to each IF statement which is why I am not using the Highliting Function, so my basic question is how to code the formula to have field field print different colors based on the field values.
Any help would be geatly appreciated.
Thanks JimHi Jim,
Right click the field >> Format >> Font Tab.
Find 'color' >> Click the little icon with a pencil and X-2 symbol to open the formula box.
Place your formatting formula in the box:
If @Sales - @Cost < 0 Then
Formula = crRed
ElseIf @Sales - @Cost >= 50 Then
Formula = crGreen
Else
Formula = crBlue
End If
Full list of Color Constants are in the functions list of the Formula Editor.
Art -
Here is one I'm stumped on....
It appears I can not use inverse sine or cosine for trig calculations and radians isn't an option either....
Here is the formula I need written in Excel:
3963*acos(cos(rad(90-(lat1))) +
cos(rad(90-(lat2))) *
sin(rad(90-(lat1))) *
sin(rad(90-(lat2)))*
cos(rad(Long1-Long2)))
Basically stated, this is a formula for figuring out the distance between two GPS coordinates.
I have tried this formula:
Lat side:
((()69)5280) - //lat 1 to feet
((()69)5280) //lat 2 to feet
Long side:
((()42)5280) - //long 1 to feet
((()42)5280) //long 2 to feet
Then use the Pythagorean theory to figure the distance:
(Sqr(({@LatDist}{@LatDist})+({@LongDist}{@LongDist})))
This should be really close to figuring out distance between two points on a straight line, but has proven to be very inaccurate; sometime plus or minus 100 feet.
The excel formula shown above is very accurate.
Any suggestions?I think you will find an answer for your question from the following website:
[http://www.wfu.edu/biology/albatross/hawaii/ideas.htm]
which says:
There is a slight problem with this (Pythagoras) method. If you look at a globe, you see that the lines of latitude and longitude are pretty straight near the Equator, so this Pythagoras method works well. But as you get away from the Equator, those lines become more curved and you're dealing more and more with triangles that aren't really right triangles. The Pythagoras method will still give you a result that is approximately correct, but you can get a more exact answer using the "Great Circle Formula:"
I think you can use the "Great Circle Formula:" formula from the following website:
[http://www.meridianworlddata.com/Distance-calculation.asp]
Which says:
If the software application or programming language you are using has no arccosine function, you can calculate the same result using the arctangent function, which most applications and languages do support. Use the following equation:
3963.0 * arctan(sqrt(1-x^2)/x)
where
x = (sin(lat1/57.2958) * sin(lat2/57.2958)) + (cos(lat1/57.2958) * cos(lat2/57.2958) * cos(lon2/57.2958 - lon1/57.2958))
Crystal Reports does have arctangent function. -
SMARTFORMS - Adicionar linha no Smart em tempo de execução
Bom dia Pessoal.
Desenvolvi um Fomulário no Smartforms para Nota QM - RNC Fornecedor, onde pego determinado número de nota, e através desse número copio as informações das tabelas em uma estrutura de dados no qual criei. Tudo estava tranquilo, até que a tabela 'QMMA' apareceu. Tenho vários registros para uma nota, tornando-se necessário imprimir as informações desses registros no SmartForms.
O SmartForms esta desenvolvido para receber apenas uma linha de registro, porém seria necessário adicionar linhas no formulário. Dependendo da nota, pode existir um registo ou N registros. Ficando conforme demonstra a imagem a baixo. Sendo assim, tem como via código, deixar o SmartForms dinâmico? Se não, qual seria a solução?
Exemplo.:
Caso alguém possa me ajudar desde já agradeço.
Att. Guilherme Urbinatti.I tried to understand your question using Altavista's Babel fish.
As far as I know you cannot change the menu programmatically.
The only way is to merge all of your menus to one big menu and hide the
appropriate menu entries using SET_MENU_ITEM_PROPERTY.
Babel fish translates my answer to
Tanto quanto eu sei você não pode mudar o menu programmatically.
A única maneira deve fundir todos seus menus a um menu grande e
esconder as entradas apropriadas do menu usando SET_MENU_ITEM_PROPERTY.
Maybe you are looking for
-
Java SFTP API/Sample application
I'm looking for either sample java code of how to send files via sftp or a java api to do this. Jscape looks to be the standard for doing this although it costs quite a bit, wondering if there is free code out there? Thanks for any help in advance!!!
-
How to close my Apple Support Account
I appear to have at least two Apple Support Community accounts. Let's call them A (my original one) and B (one I set up in error). How can I close B? (The account I'm using to post this question is B.) The eMail address associated with B is the one
-
Satellite M40X-169 when connected to wireless unit shuts down with blue screen and restarts
Hello. I got the problem with my notebook when i'm connecting and getting connected to the wireless network. My notebook is shutting down with blue screen error and then restarts. Maybe you can help me to solve this problem, because i can normaly wor
-
Dear Pm groups Pls clear the following issues While creating the mtc plan we are given the start date as past , but the package is mentioned. While schduling thro IP 10 the system issues error as No operations exist for the day. But in same way if we
-
Simple Question how to send Videos to Hard Drive`
Have 5 years of Mini DV tapes lying atound and would like to get the footage on an external HD for editing and burning eventually. Any help is appreciated, is this something iDVD can do simply? Thank you