Function: % of Total
Hello all,
I have a calculated value based on amount. I'm using % of Total function to calculate this value.
If the amount is $0, then I am geting astrix(****) insted of printing 0. I am using Reports 6i version (Report Builder 6.0.8.19.0).
Any help is appreciated?
Thanks in advance.
Arun.
Hi,
I assume that your total amount is 0. In that case, the value is null (anything divided by 0) and NOT zero, and thats why it shows ****.
Use "Value if Null" property in the field's Property Inspector to set some other value.
Navneet.
Similar Messages
-
Sql developer with compute function/ add total to column.
Hello experts i've been strugglin for a couple of hours on this. and im not sure if this is the forum i should be posting this but i could not found a forum directly related to sql developer.
I would like to use the compute function in sql developer but it does not appear to work can someone please point me in the right direction.
i followed this documentation
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm
but it does not seem to do the trick. I basically just would like to add a total at the end of my query ?...
can someone throw me a bone on this one.
Miguelcolumn DUMMY NOPRINT
compute sum of aamt on DUMMY
break on dummy
select a_fa_idoc, b_fr_idoc, a_amt, b_amt, (a_amt-b_amt)
from
(SELECT a.fa_idoc a_fa_idoc, SUM(a.amt) a_amt from fwrinva a group by a.fa_idoc) fwarinva_summary
inner join
(SELECT b.fr_idoc b_fr_idoc, sum(b.amt) b_amt from fwrinvc b group by b.fr_idoc) fwrinvc_summary
on( fwarinva_summary.a_fa_idoc = fwrinvc_summary.b_fr_idoc)
where (a_amt - b_amt) = 0;here is my query but it does not put a total on the end? -
Reports with all functionality (sorting,total,subtotal,download)
Hi,
We require that all the actions which we can perform on the Reports available in SAP environment should also be available in the EP Platform.
Eg
sorting,total,subtotal,download.
Thanks.Hi,
We require that all the actions which we can perform on the Reports available in SAP environment should also be available in the EP Platform.
Eg
sorting,total,subtotal,download.
Thanks. -
Search Function a Total Failure?
The search function doesn't seem to work. For example, I have a contact who is a piano tuner. In the note field, I have "Piano Tuner". I wanted to find him, and searched for "tuner". The record was not found.
That makes the search function pretty useless. A little research shows that search will only look at name and company name. That's not good.
Message was edited by: TromboneAlAs you found out, it works as designed. If you want to suggest an improvement, go here: http://www.apple.com/feedback/ipodtouch.html
-
Find function seems totally dead
On a Mac platform, I cannot get the Find function to do a thing. As usual, the release version has more bugs than the 4.1 beta. Why can't the beta be slightly tweaked to fix the bugs and then released? Why is the release massively different from the most recent beta and completely full of bugs? Also, the filter as a function of the flagging system doesn't work.
Sorry I'm grouchy. I loved Beta 3. Beta 4 crashed constantly, Beta 4.1 finally got it right. I told everyone and their brother how great the final release was going to be. I pre-ordered it. I got it today, installed it and it crashed while importing my old library. Off to a great start. Then it finally imports the old database and starts working and the *FIRST* thing I try to do is sort some images by keyword and absolutely none of those functions work. The "Find" command does nothing. I select a library, enter a keyword in Find, select "keyword" from the pulldown menu, and it doesn't do squat. I'm familiar with how this function is supposed to work from the beta. It just does nothing, no matter what options I select.
Next I tried this new "flagging" thing. I put a group of images into a quick collection, flagged them all as "pick" then went back out to the whole library vew and tried to filter by "flag" and nothing comes up unless I tell it to select everything. Flag filtering doesn't work either.
Now, it may be that I'm retarded and if so, someone please point out the error of my ways and I will apologize and move on. Until then, I say that the product has some flaws. If you can't FIND any images out of thousands of images in a library, we have a problem. IMHO.
Jonathan -
Grand Total Text is not printing in ALV
Hi all,
I am not able to print Grand Total text in my report
I am not doing subtotal, i am using only grand totals.
So i have used in the following way
WA_FIELDCAT-DO_SUM = GC_X.
GS_LAYOUT-TOTALS_ONLY = GC_X.
GS_LAYOUT-TOTALS_TEXT = 'Totals'(049).
i am using using ALV GRID DISPLAY FM...its displaying the total amount, buts text is missing...
Can any one tell me what else i have to pass in the layout or fieldcatlog or FMHi AMR,
If you use REUSE_ALV_GRID_DISPLAY function module, i think Total text does not come .but if u use REUSE_ALV_LIST_DISPLAY function module Total text comes .
Check this sample program it let u know ..
"Types
TYPES:
BEGIN OF t_pa0008,
pernr TYPE pa0008-pernr,
lga01 TYPE pa0008-lga01,
bet01 TYPE pa0008-bet01,
END OF t_pa0008.
"Work areas
DATA:
w_pa0008 TYPE t_pa0008.
"Internal tables
DATA:
i_pa0008 TYPE STANDARD TABLE OF t_pa0008.
PARAMETERS:
list TYPE c RADIOBUTTON GROUP gr1,
grid TYPE c RADIOBUTTON GROUP gr1.
" ALV Declarations
" Types Pools
TYPE-POOLS:
slis.
" Types
TYPES:
t_fieldcat TYPE slis_fieldcat_alv,
t_events TYPE slis_alv_event,
t_layout TYPE slis_layout_alv,
t_sort TYPE slis_sortinfo_alv,
t_keyinfo TYPE slis_keyinfo_alv.
" Workareas
DATA:
w_fieldcat TYPE t_fieldcat,
w_events TYPE t_events,
w_sort TYPE t_sort,
w_layout TYPE t_layout,
w_keyinfo TYPE t_keyinfo.
" Internal Tables
DATA:
i_fieldcat TYPE STANDARD TABLE OF t_fieldcat,
i_events TYPE STANDARD TABLE OF t_events,
i_sort TYPE STANDARD TABLE OF t_sort.
START-OF-SELECTION.
PERFORM get_data.
END-OF-SELECTION.
PERFORM build_fieldcatalog. "Fieldcatalog
PERFORM build_events. "Events table
PERFORM buid_layout. "Layout structure.
PERFORM build_sort_tab. "To sort table and get subtotal
PERFORM display_data.
*& Form get_data
FORM get_data.
DATA:l_0008 TYPE pa0008 OCCURS 0 WITH HEADER LINE.
SELECT pernr lga01 bet01
FROM pa0008
INTO CORRESPONDING FIELDS OF l_0008
WHERE begda LE sy-datum
AND endda GE sy-datum.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga01.
w_pa0008-bet01 = l_0008-bet01.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga02.
w_pa0008-bet01 = l_0008-bet02.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga03.
w_pa0008-bet01 = l_0008-bet03.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga04.
w_pa0008-bet01 = l_0008-bet04.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
ENDSELECT.
ENDFORM. "get_data
*& Form build_fieldcatalog
FORM build_fieldcatalog.
PERFORM build_fcat USING:
"Field Int.Table Text
'PERNR' 'I_PA0008' 'PERNR', "Remove this if u dont want in the item table as well as it is there in the header table
'LGA01' 'I_PA0008' 'LGA01',
'BET01' 'I_PA0008' 'BET01'.
ENDFORM. "build_fieldcatalog
*& Form build_events
* text
FORM build_events.
CLEAR:
w_events, i_events[].
w_events-name = 'TOP_OF_PAGE'.
w_events-form = 'TOP_OF_PAGE'.
APPEND w_events TO i_events.
CLEAR w_events.
ENDFORM. "build_events
*& Form display_data
* text
FORM display_data.
DATA:
l_program TYPE sy-repid VALUE sy-repid,
l_fm TYPE RS38L_FNAM.
IF list = 'X'.
l_fm = 'REUSE_ALV_LIST_DISPLAY'.
ELSEIF grid ='X'.
l_fm = 'REUSE_ALV_GRID_DISPLAY'.
ENDIF.
CALL FUNCTION l_fm
EXPORTING
i_callback_program = l_program
is_layout = w_layout
it_fieldcat = i_fieldcat
it_events = i_events
it_sort = i_sort
TABLES
t_outtab = i_pa0008.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "display_data
*& Form build_fcat
FORM build_fcat USING l_field l_tab l_text.
w_fieldcat-fieldname = l_field.
w_fieldcat-tabname = l_tab.
w_fieldcat-seltext_m = l_text.
IF l_field = 'BET01'.
w_fieldcat-do_sum = 'X'.
ENDIF.
APPEND w_fieldcat TO i_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fcat
*& Form top_of_page
* text
FORM top_of_page.
DATA :
i_header TYPE slis_t_listheader,
w_header LIKE LINE OF i_header.
DATA:l_date1 TYPE datum,
l_date2 TYPE datum.
w_header-typ = 'S'.
w_header-info = sy-title.
APPEND w_header TO i_header.
CLEAR w_header.
w_header-typ = 'H'.
w_header-info = sy-repid.
APPEND w_header TO i_header.
CLEAR w_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form BUILD_sort_tab
FORM build_sort_tab .
CLEAR :i_sort[],w_sort.
w_sort-spos = 1.
w_sort-fieldname = 'PERNR'.
w_sort-tabname = 'I_PA0008'. "header table
w_sort-up = 'X'.
w_sort-subtot = 'X'.
APPEND w_sort TO i_sort.
CLEAR w_sort.
ENDFORM. " BUILD_sort_tab
*& Form buid_layout
FORM buid_layout .
w_layout-totals_text = 'Total'.
w_layout-subtotals_text = 'S.Total'.
ENDFORM. " buid_layout
Regards,
Venkat.O -
Bex Exception Aggregation in 3.5 equivalent to 'TOTAL'
Hi All,
Can anyone help me in getting a functionality equivalent to exception aggregation 'TOTAL' in BW 3.5.
I have a requirement which can only be fixed using the exception aggregation 'TOTAL', my bad in my current client they dont have BI 7.0. So can anyone tell me what is the equivalent function of 'TOTAL' in BW 3.5.
Regards,
AnandI need to develop a report which will show Org unit & degree (education data) wise head count and annual salary.
As the education records for an employee will be more than one, the annual salary will be doubled or tripled in the DSO or cube.
If I do an average of annual salary based on employee the overall result goes wrong.
Say for example, empl 20045789 as three record with KF value 10,000, the result in the report I see as 30,000.
SAY in the backend
EMPLOYEE | Degree | Annual Salary
20045788 | A | 50,000
20045788 | B | 50,000
20045789 | A |10,000
20045789 | B |10,000
20045789 | C |10,000
In the query I get it as
Org Unit | Employee | Annual Salary | Average(Annual salary/ Number of employee)
100001 | 20045788 | 100,000 | 50,000
100001 | 20045789 | 30,000 | 10,000
overall result 130,000 | 26,000 (130,000/5)
The expected result is 50,000 + 10,000 = 60,000 / 2 = 30,000.
Pls provide me solution.
Regards,
Anand
Edited by: araj123 on Jun 3, 2011 3:45 AM
Edited by: araj123 on Jun 3, 2011 3:46 AM
Edited by: araj123 on Jun 3, 2011 3:47 AM
Edited by: araj123 on Jun 3, 2011 3:48 AM
Edited by: araj123 on Jun 3, 2011 3:50 AM
Edited by: araj123 on Jun 3, 2011 2:25 PM -
How to use sum analytic function in adf
Hi
jdev 11.1.1.5
oracle 11g r2
I want to use analytic function (sum,count,avg and ...) .
I see [url http://andrejusb.blogspot.co.uk/2013/02/oracle-analytic-functions-for-total-and.html]Oracle Analytic Functions for Total and Average Calculation in ADF BC
and use it in my vo and jsf page,my vo have too much record and I want to have sum in table footer on demand (because of performance) and if user do not want to see the sum in footer of table it do not calculate sum,
what is your idea?Before I read that blog I use another vo for sum but after that blog decide to use analytic fuction becuase we have some page that have to many dvt graph and table and know we use seperate vo for them and it has not good performance and too many query must run in database ,I want to have 1 vo with some analytic function for graph and tables
-
Outlook: How to update folders in automatic archive function
When using the automatic archive function (pdf maker, single portfolio of emails) in Outlook 2010 we have the following problem:
Once set the email folders and subfolder structure of our archive remains at the status of its first setting. This means every time we rerun the archive function NEW folders/ subfolders (added after initial setup) will NOT be included!
Is there any way to automatically update the subfolder structure (e.g. below a main project folder) every time we rerun the archive function???
Otherwise this function is totally useless as any change in our Outlook folder structure is not reflected in the archiving functions, which means NEW folder and their contents are not archived!
We have like 20 projects with different archive paths we now have to archive manually each time we backup.
Thank you for your help!
JanRSA1
Go to the "Modeling" tab
Go to the "Source Systems" object type
Find your Source System
Right-Click on the source system
Choose 'Transfer Exchange Rates'.
Your BW Administrators team should have this function set up as a daily batch process. -
Analytic Functions - Need resultset only in one select
Hello Experts,
Problem Definition: Using Analytic Function, get Total sales for the Product P1 and Customer C1 [Total sales for the customer itself] in one line. I want to restrict the ResultSet of the query to Product P1, please look at the data below, queries and problems..
Data
Customer Product Qtr Sales
C1 P1 19991 100.00
C1 P1 19992 125.00
C1 P1 19993 175.00
C1 P1 19994 300.00
C1 P2 19991 100.00
C1 P2 19992 125.00
C1 P2 19993 175.00
C1 P2 19994 300.00
C2 P1 19991 100.00
C2 P1 19992 125.00
C2 P1 19993 175.00
C2 P1 19994 300.00
Problem, I want to display....
Customer Product ProdSales CustSales
C1 P1 700 1400
But Without using outer query, i.e. please look below for the query that returns this reult with two select, I want this result in one query only..
Select * From ----*** want to avoid this... ***----
(Select Customer,Product,
Sum(Sales) ProdSales,
Sum(Sum(Sales)) Over(Partition By Customer) CustSales
From t1
Where customer='C1')
Where
Product='P1' ;
Also, I want to avoid Hard coding of P1 in the select clause....
I mean, I can do it in one shot/select, but look at the query below, it uses P1 in the select clause, which is No No!! P1 is allowed only in Where or Having ..
Select Customer,Decode(Product, 'P1','P1','P1') Product,
Decode(Product,'P1',Sales,0) ProdSales,
Sum(Sum(Sales)) Over (Partition By Customer ) CustSales
From t1
Where customer='C1' ;
This will get me what I want, but as I said earlier, I want to avoid using P1 in the
Select clause..
Goal is to Avoid using
1-> Two Select/Outer Query/In Line Views
2-> Product 'P1' in the Select clause...No hard coded product name in the select clause and group by clause..
Thanks
-DhavalSelect * From ----*** want to avoid this... ***----
(Select Customer,Product,
Sum(Sales) ProdSales,
Sum(Sum(Sales)) Over(Partition By Customer)
CustSales
From t1
Where customer='C1')
Where
Product='P1' ;
Goal is to Avoid using
1-> Two Select/Outer Query/In Line ViewsWhy? -
Restrict Query Resultset which uses Analytic Function
Gents,
Problem Definition: Using Analytic Function, get Total sales for the Product P1
and Customer C1 [Total sales for the customer itself] in one line.
I want to restrict the ResultSet of the query to Product P1,
please look at the data below, queries and problems..
Data
Customer Product Qtr Sales
C1 P1 19991 100.00
C1 P1 19992 125.00
C1 P1 19993 175.00
C1 P1 19994 300.00
C1 P2 19991 100.00
C1 P2 19992 125.00
C1 P2 19993 175.00
C1 P2 19994 300.00
C2 P1 19991 100.00
C2 P1 19992 125.00
C2 P1 19993 175.00
C2 P1 19994 300.00
Problem, I want to display....
Customer Product ProdSales CustSales
C1 P1 700 1400
But Without using outer query, i.e. please look below for the query that
returns this reult with two select, I want this result in one query only..
Select * From ----*** want to avoid this... ***----
(Select Customer,Product,
Sum(Sales) ProdSales,
Sum(Sum(Sales)) Over(Partition By Customer) CustSales
From t1
Where customer='C1')
Where
Product='P1' ;
Also, I want to avoid Hard coding of P1 in the select clause....
I mean, I can do it in one shot/select, but look at the query below, it uses
P1 in the select clause, which is No No!! P1 is allowed only in Where or Having ..
Select Customer,Decode(Product, 'P1','P1','P1') Product,
Decode(Product,'P1',Sales,0) ProdSales,
Sum(Sum(Sales)) Over (Partition By Customer ) CustSales
From t1
Where customer='C1' ;
This will get me what I want, but as I said earlier, I want to avoid using P1 in the
Select clause..
Goal is to Avoid using
1-> Two Select/Outer Query/In Line Views
2-> Product 'P1' in the Select clause...
Thanks
-Dhaval RasaniaI don't understand goal number 1 of not using an inline view.
What is the harm? -
Solaris 10 root RAID-1 support totally broken!
I have been configuring Sun Blade 1500 with two IDE drives (each on their own IDE bus) as RAID-1 for the /, swap and /export/home partitions. This has worked well and I have always been able to test the RAID-1 recovery ability of such a configuration. However I am very unhappy to report that this functionality to totally broken in Solaris 10. For example, if you disconnect the second IDE drive of the RAID and reboot, the machine kernel panics as expected. However unlikeSolaris 9, which still allows you to login for maintanence and to delete the metastat database entries for the missing drive (thus making the machine bootable without a kernel panic), under Solaris 10 the system simply restarts immediately upon the kernel panic, This makes the RAID-1 system more than just useless but actually dangerous since it now doubles the probabity that you will had a drive failure and end up with an unbootable machine. I am very glad I tested the RAID-1 recovery ability before I installed this machine. Back to Solaris 9 for me!
Jack#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
/dev/md/dsk/d3 /dev/md/rdsk/d3/ /devel ufs 1 no -
/dev/md/dsk/d6 /dev/md/rdsk/d6/ /prod ufs 1 no -
/dev/md/dsk/d9 /dev/md/rdsk/d9/ /export/home ufs 1 no -
Perhaps the problem is the mount at boot flag set to no for the /devel /prod and /export/home filesystems? If your system is up try mounting these filesystems, if that works, set the mount at boot flag to yes.
--a -
In the MacIntosh-forum recently somebody asked about a way to assess the maximal total ink of an image in Photoshop as in Acrobat or Indesign (probably for prepress-purposes I guess).
http://forums.adobe.com/thread/453851;jsessionid=6EFF73D4ADC319F2F24387656080AF46.node0?ts tart=0
My first idea was iterating a color-picker through every pixel of an image an collecting the values, but that seems to take a forbiddingly long time.
A way that works much quicker is bunching the four CMYK-channels into one channel by Linear Burning them with 25% opacity and evaluating the resulting channel’s histogram.
Of course that means that every histogram-step actually amounts for about 1.5% accumulated ink which still seems acceptable to me.
And with an appropriate Threshold-setting the channel can be adapted to indicate areas of certain minimal ink amounts, though non interactively.
But when working on CMYK-files with more than one additional spot color the rounding errors accumulate pretty strongly as with 6 colors one histogram-step would amount to about 2.3% total ink and the opacity for the calculation of the accumulated-ink-channel – while fine for 4 or 5 colors – has to be rounded to an integer for 6 colors.
This can be worked around to some extent by getting the channels together as layers in a grayscale-document, converting them to one Smart Object and applying the Stack Mode Mean and evaluating the result.
So I have a crude and inexact solution but does any one of You have a better idea on how to get the maximum total ink in an image with more than 4 colors in a reasonable time or does a Script for that already exist?
(If someone’s interested I can post my current Script.)/* creates layers that mark areas that more or less exceed a certain total area coverage;
the more channels the more pronounced the rounding issues;
based on a discussion with j maloney;
2013, use it at your own risk */
if (app.documents.length > 0 && app.activeDocument.mode == DocumentMode.CMYK) {
/* dialog;*/
var dlg = new Window("dialog", "indicate tac of and over", [500,300,750,420]);
/* filter for checking if entry is numeric, thanks to xbytor;*/
numberKeystrokeFilter = function() {
if (this.text.match(/[^\-\.\d]/)) {
this.text = this.text.replace(/[^\d]/g, "")
if (this.text <= 0) {this.text = 100};
if (Number(this.text) > 500) {this.text = "500"}
/* field for entry;*/
dlg.tac = dlg.add("edittext", [15,15,110,35], "300", {multiline:false});
dlg.tac.active = true;
dlg.tac.onChange = numberKeystrokeFilter;
/* warning;*/
dlg.warning = dlg.add("statictext", [13,78,240,150], "please remember to remove or");
dlg.warning2 = dlg.add("statictext", [13,95,240,150], "hide the indicator layers");
/* ok- and cancel-button;*/
dlg.buildBtn = dlg.add("button", [13,45,118,68], "OK", {name:"ok"});
dlg.cancelBtn = dlg.add("button", [128,45,240,68], "Cancel", {name:"cancel"});
/* show dialog;*/
dlg.center();
/* show dialog;*/
var myReturn = dlg.show ();
if (myReturn == true) {
var myDocument = app.activeDocument;
/* get the number of tac;*/
var total = Number (dlg.tac.text);
var myDocument = app.activeDocument;
/* go to top layer;*/
var theVis = myDocument.layers[0].visible;
myDocument.activeLayer = myDocument.layers[0];
if (myDocument.layers[0].iBackgroundLayer == false) {myDocument.layers[0].visible = theVis};
/* set to composite;*/
app.activeDocument.activeChannels = [app.activeDocument.channels[0], app.activeDocument.channels[1], app.activeDocument.channels[2], app.activeDocument.channels[3]];
/* array for printing channels;*/
var theChannels = [0, 1, 2, 3];
/* check for spot colors;*/
for (var m = myDocument.channels.length - 1; m >= 4 ; m--) {
if (myDocument.channels[m].kind == ChannelType.SPOTCOLOR) {
theChannels = theChannels.concat(m)
/* create channel mixer;*/
var channelMixer = theChannelMix(theChannels.length);
channelMixer.name = "total area coverage "+total+"%";
/* work throuh spot channels;*/
for (var n = theChannels.length - 1; n >= 4 ; n--) {
myDocument.selection.load(myDocument.channels[theChannels[n]]);
/* make solid color layer;*/
var idMk = charIDToTypeID( "Mk " );
var desc72 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref57 = new ActionReference();
var idcontentLayer = stringIDToTypeID( "contentLayer" );
ref57.putClass( idcontentLayer );
desc72.putReference( idnull, ref57 );
var idUsng = charIDToTypeID( "Usng" );
var desc73 = new ActionDescriptor();
var idType = charIDToTypeID( "Type" );
var desc74 = new ActionDescriptor();
var idClr = charIDToTypeID( "Clr " );
var desc75 = new ActionDescriptor();
var idCyn = charIDToTypeID( "Cyn " );
desc75.putDouble( idCyn, 0.000000 );
var idMgnt = charIDToTypeID( "Mgnt" );
desc75.putDouble( idMgnt, 100.000000 );
var idYlw = charIDToTypeID( "Ylw " );
desc75.putDouble( idYlw, 0.000000 );
var idBlck = charIDToTypeID( "Blck" );
desc75.putDouble( idBlck, 0.000000 );
var idCMYC = charIDToTypeID( "CMYC" );
desc74.putObject( idClr, idCMYC, desc75 );
var idsolidColorLayer = stringIDToTypeID( "solidColorLayer" );
desc73.putObject( idType, idsolidColorLayer, desc74 );
var idcontentLayer = stringIDToTypeID( "contentLayer" );
desc72.putObject( idUsng, idcontentLayer, desc73 );
executeAction( idMk, desc72, DialogModes.NO );
myDocument.activeLayer.name = myDocument.channels[theChannels[n]].name;
myDocument.activeLayer.opacity = Math.ceil(100 / theChannels.length);
myDocument.activeLayer.grouped = true;
myDocument.channels[theChannels[n]].visible = false;
/* create curves layer;*/
var curvesLayer = theCurvesMix (total, theChannels.length);
/* function for channel mixer */
function theChannelMix (channelNumber) {
var thePerc = Math.ceil(100 / channelNumber);
var idMk = charIDToTypeID( "Mk " );
var desc3 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref2 = new ActionReference();
var idAdjL = charIDToTypeID( "AdjL" );
ref2.putClass( idAdjL );
desc3.putReference( idnull, ref2 );
var idUsng = charIDToTypeID( "Usng" );
var desc4 = new ActionDescriptor();
var idType = charIDToTypeID( "Type" );
var desc5 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
desc5.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
var idCyn = charIDToTypeID( "Cyn " );
var desc6 = new ActionDescriptor();
var idCyn = charIDToTypeID( "Cyn " );
var idPrc = charIDToTypeID( "#Prc" );
desc6.putUnitDouble( idCyn, idPrc, 100.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc5.putObject( idCyn, idChMx, desc6 );
var idMgnt = charIDToTypeID( "Mgnt" );
var desc7 = new ActionDescriptor();
var idMgnt = charIDToTypeID( "Mgnt" );
var idPrc = charIDToTypeID( "#Prc" );
desc7.putUnitDouble( idMgnt, idPrc, 100.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc5.putObject( idMgnt, idChMx, desc7 );
var idYlw = charIDToTypeID( "Ylw " );
var desc8 = new ActionDescriptor();
var idYlw = charIDToTypeID( "Ylw " );
var idPrc = charIDToTypeID( "#Prc" );
desc8.putUnitDouble( idYlw, idPrc, 100.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc5.putObject( idYlw, idChMx, desc8 );
var idBlck = charIDToTypeID( "Blck" );
var desc9 = new ActionDescriptor();
var idBlck = charIDToTypeID( "Blck" );
var idPrc = charIDToTypeID( "#Prc" );
desc9.putUnitDouble( idBlck, idPrc, 100.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc5.putObject( idBlck, idChMx, desc9 );
var idChnM = charIDToTypeID( "ChnM" );
desc4.putObject( idType, idChnM, desc5 );
var idAdjL = charIDToTypeID( "AdjL" );
desc3.putObject( idUsng, idAdjL, desc4 );
executeAction( idMk, desc3, DialogModes.NO );
var idsetd = charIDToTypeID( "setd" );
var desc38 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref12 = new ActionReference();
var idAdjL = charIDToTypeID( "AdjL" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref12.putEnumerated( idAdjL, idOrdn, idTrgt );
desc38.putReference( idnull, ref12 );
var idT = charIDToTypeID( "T " );
var desc39 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
desc39.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
var idCyn = charIDToTypeID( "Cyn " );
var desc40 = new ActionDescriptor();
var idCyn = charIDToTypeID( "Cyn " );
var idPrc = charIDToTypeID( "#Prc" );
desc40.putUnitDouble( idCyn, idPrc, 0.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc39.putObject( idCyn, idChMx, desc40 );
var idMgnt = charIDToTypeID( "Mgnt" );
var desc41 = new ActionDescriptor();
var idCyn = charIDToTypeID( "Cyn " );
var idPrc = charIDToTypeID( "#Prc" );
desc41.putUnitDouble( idCyn, idPrc, thePerc );
var idMgnt = charIDToTypeID( "Mgnt" );
var idPrc = charIDToTypeID( "#Prc" );
desc41.putUnitDouble( idMgnt, idPrc, thePerc );
var idYlw = charIDToTypeID( "Ylw " );
var idPrc = charIDToTypeID( "#Prc" );
desc41.putUnitDouble( idYlw, idPrc, thePerc );
var idBlck = charIDToTypeID( "Blck" );
var idPrc = charIDToTypeID( "#Prc" );
desc41.putUnitDouble( idBlck, idPrc, thePerc );
var idChMx = charIDToTypeID( "ChMx" );
desc39.putObject( idMgnt, idChMx, desc41 );
var idYlw = charIDToTypeID( "Ylw " );
var desc42 = new ActionDescriptor();
var idYlw = charIDToTypeID( "Ylw " );
var idPrc = charIDToTypeID( "#Prc" );
desc42.putUnitDouble( idYlw, idPrc, 0.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc39.putObject( idYlw, idChMx, desc42 );
var idBlck = charIDToTypeID( "Blck" );
var desc43 = new ActionDescriptor();
var idBlck = charIDToTypeID( "Blck" );
var idPrc = charIDToTypeID( "#Prc" );
desc43.putUnitDouble( idBlck, idPrc, 0.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc39.putObject( idBlck, idChMx, desc43 );
var idChnM = charIDToTypeID( "ChnM" );
desc38.putObject( idT, idChnM, desc39 );
executeAction( idsetd, desc38, DialogModes.NO );
var idsetd = charIDToTypeID( "setd" );
var desc34 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref22 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref22.putEnumerated( idLyr, idOrdn, idTrgt );
desc34.putReference( idnull, ref22 );
var idT = charIDToTypeID( "T " );
var desc35 = new ActionDescriptor();
var idBlnd = charIDToTypeID( "Blnd" );
var list10 = new ActionList();
var desc36 = new ActionDescriptor();
var idChnl = charIDToTypeID( "Chnl" );
var ref23 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idChnl = charIDToTypeID( "Chnl" );
var idMgnt = charIDToTypeID( "Mgnt" );
ref23.putEnumerated( idChnl, idChnl, idMgnt );
desc36.putReference( idChnl, ref23 );
var idSrcB = charIDToTypeID( "SrcB" );
desc36.putInteger( idSrcB, 0 );
var idSrcl = charIDToTypeID( "Srcl" );
desc36.putInteger( idSrcl, 0 );
var idSrcW = charIDToTypeID( "SrcW" );
desc36.putInteger( idSrcW, 62 );
var idSrcm = charIDToTypeID( "Srcm" );
desc36.putInteger( idSrcm, 62 );
var idDstB = charIDToTypeID( "DstB" );
desc36.putInteger( idDstB, 0 );
var idDstl = charIDToTypeID( "Dstl" );
desc36.putInteger( idDstl, 0 );
var idDstW = charIDToTypeID( "DstW" );
desc36.putInteger( idDstW, 255 );
var idDstt = charIDToTypeID( "Dstt" );
desc36.putInteger( idDstt, 255 );
var idBlnd = charIDToTypeID( "Blnd" );
list10.putObject( idBlnd, desc36 );
desc35.putList( idBlnd, list10 );
var idLefx = charIDToTypeID( "Lefx" );
var desc37 = new ActionDescriptor();
var idScl = charIDToTypeID( "Scl " );
var idPrc = charIDToTypeID( "#Prc" );
desc37.putUnitDouble( idScl, idPrc, 100.000000 );
var idLefx = charIDToTypeID( "Lefx" );
desc35.putObject( idLefx, idLefx, desc37 );
var idLyr = charIDToTypeID( "Lyr " );
desc34.putObject( idT, idLyr, desc35 );
executeAction( idsetd, desc34, DialogModes.NO );
return app.activeDocument.activeLayer
/* function for curves */
function theCurvesMix (total, channelNumber) {
var thePoint = 255 - (256 / channelNumber * total / 100);
var idMk = charIDToTypeID( "Mk " );
var desc7 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref4 = new ActionReference();
var idAdjL = charIDToTypeID( "AdjL" );
ref4.putClass( idAdjL );
desc7.putReference( idnull, ref4 );
var idUsng = charIDToTypeID( "Usng" );
var desc8 = new ActionDescriptor();
var idType = charIDToTypeID( "Type" );
var desc9 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
desc9.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
var idCrvs = charIDToTypeID( "Crvs" );
desc8.putObject( idType, idCrvs, desc9 );
var idAdjL = charIDToTypeID( "AdjL" );
desc7.putObject( idUsng, idAdjL, desc8 );
executeAction( idMk, desc7, DialogModes.NO );
var idsetd = charIDToTypeID( "setd" );
var desc17 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref9 = new ActionReference();
var idAdjL = charIDToTypeID( "AdjL" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref9.putEnumerated( idAdjL, idOrdn, idTrgt );
desc17.putReference( idnull, ref9 );
var idT = charIDToTypeID( "T " );
var desc18 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
desc18.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
var idAdjs = charIDToTypeID( "Adjs" );
var list4 = new ActionList();
var desc19 = new ActionDescriptor();
var idChnl = charIDToTypeID( "Chnl" );
var ref10 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idChnl = charIDToTypeID( "Chnl" );
var idCmps = charIDToTypeID( "Cmps" );
ref10.putEnumerated( idChnl, idChnl, idCmps );
desc19.putReference( idChnl, ref10 );
var idCrv = charIDToTypeID( "Crv " );
var list5 = new ActionList();
var desc20 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
desc20.putDouble( idHrzn, thePoint );
var idVrtc = charIDToTypeID( "Vrtc" );
desc20.putDouble( idVrtc, 0.000000 );
var idPnt = charIDToTypeID( "Pnt " );
list5.putObject( idPnt, desc20 );
var desc21 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
desc21.putDouble( idHrzn, thePoint + 4 );
var idVrtc = charIDToTypeID( "Vrtc" );
desc21.putDouble( idVrtc, 255.000000 );
var idPnt = charIDToTypeID( "Pnt " );
list5.putObject( idPnt, desc21 );
desc19.putList( idCrv, list5 );
var idCrvA = charIDToTypeID( "CrvA" );
list4.putObject( idCrvA, desc19 );
desc18.putList( idAdjs, list4 );
var idCrvs = charIDToTypeID( "Crvs" );
desc17.putObject( idT, idCrvs, desc18 );
executeAction( idsetd, desc17, DialogModes.NO );
app.activeDocument.activeLayer.grouped = true;
return app.activeDocument.activeLayer -
Running total + Blackout Days
I am looking for help with a couple of things, but first and most important is getting a Flex based form to SUM the fields. I am new to Flex, and want/hope to be able to create a form that has various values in ComboBoxes, Text Input fields, NumSteppers that can be totalled or summed in another "Total" text area a sort of form calculator. So far I am not seeing much math function.
Picture an XLS form that has variable quantities and prices with a final cell that has a formula for =SUM(C1:C59)
The other challenge I am having is with the DateField, I want to have a date selector that wont allow past dates or anything from today out 2 weeks...but I am not seeing the options of blocking a quantity of days, rather specific days of the week, which will not work for what I am trying to accomplish, it needs to do something like <mx:DateField x="15" y="15" disabledRanges="TODAY+14 days" or disabledDays="TODAY+14"/>
Sorry in advance for my ignorance...thanks to anyone who can help point me on the right path!
RichFor the first one, you would need to create the 'total' display object, using whatever is appropriate ('Text' would be fine, since the user isn't ever going to enter the value)
Then you need to create the Actionscript function to total the data elements that should be included in the total, and this function should update the value displayed in Text.text.
To update as field change, you will need to add an event listener to each of the included objects to trigger the calculate function - I would probably use the focusOut event, but some others would work as well.
For your second item, those are not standard features of the <mx:Date> component. You will need to extend that component to add the features you want.
Mark -
Getting variables out of a function
Hi,
In order to reduce the use of the calculation event in a repeating subform, I have set up a function (riskRating) in a script object (calculateRisk), which the exit event of a dropdown (RA_severity) calls.
//This is the Javascript in the exit event...
var vLikelihood = RA_likelihood.rawValue; //dropdown list 1
var vSeverity = RA_severity.rawValue; //dropdown list 2
var vRisk;
calculateRisk.riskRating(vLikelihood, vSeverity);
console.println("Risk after function = " + vRisk);
RA_risk_rating.rawValue = vRisk; //this line is meant to assign the value of vRisk from the function to another field (but it doesn't)
//This is the function within calculateRisk script object...
function riskRating(vLikelihood, vSeverity)
var vRisk;
if (vLikelihood == null && vSeverity == null)
vRisk = null;
else
vRisk = vLikelihood * vSeverity;
console.println("Risk inside function = " + vRisk);
return vRisk;
I have tried various approaches to get the answer back out of the function and to be used for the remainder of the script in the exit event script.
The console show the correct calculation in the function, but it is not updating the variable outside of the function.
Any ideas?
Thanks,
NiallNiall,
Take a look at the attached. The form contains four numeric fields: 'a', 'b', 'total', and 'other'. It does a calculate on fields 'a' and 'b'. On the exit event of 'b' it calls 'addNumbers()' in 'MyScriptObject'. The function updates 'total' and returns the value of 'total' to be bound to 'other'.
// form1.page1.subform1.b::exit - (JavaScript, client)
other.rawValue = MyScriptObject.addNumbers(a,b,total);
// form1.#variables[0].MyScriptObject - (JavaScript, client)
function addNumbers(a_,b_,total_) {
return(total_.rawValue = a_.rawValue + b_.rawValue);
Is that what you are looking for?
Steve
Maybe you are looking for
-
How can I use photoshop Elements 8 to make a DVD that will show on a regular TV-DVD set-up
-
How can I get Firefox to allow AOL to open. It will not allow!
Firefox a warning that I will be redirected to another page (aol.com) and I select the allow box., but it does not redirect or allow. HELP
-
Page protection in the smartform
Hi All, I am working with an issue in smart forms. Requirement: The main table header in the main window should be dispalyed from the second page if and only if there is no space for atleast single item level in the first page. Solution that i tried
-
Presario v6000 note book turns on but black screen and fan only
presario v6000 note book turns on, fan works but screen is black. No beeping sounds or blinking lights. Lights by numbers are on . Had new motherboard installed by repair store twice. Worked for a few days and now doing the same thing. Any suggestio
-
I have a problem with Lightroom 4 serial number
Hi, With my leica M9 coming a ligtroom 4 with a number for download. After one year i upgraded my ligtroom 4 at to lightroom 5 directly , well, now i want install lightroom 5 in my new MAC and after installation says me that i have to write two ser