Using a field hierarchy for selecting checkboxes?
I have a bunch of checkboxes in a PDF that are dynamically added to the PDF during its creation process. Each checkbox is a cell in a table, and I do not know the number of rows or columns that will be in the PDF beforehand. What we are trying to do is add a header row to the table that allows the users to select/unselect all the check boxes in a column at once. I figured I could use the field name hierarchy approach to select/unselect all the checkboxes as long as I named them appropriately but I appear to be missing something.
Take for example this table (assume [] denotes where a checkbox will go):
Title
Category 1
Category 2
[check.global.category1]
[check.global.category2]
Some Product
[check.category1.cell1]
[check.category2.cell1]
Another Product
[check.category1.cell2]
[check.category2.cell2]
What I would like to do is add a JavaScript call so that when check.global.category1 is clicked I could add something like this to the click event:
var field = getField("check.category1");
field.checkThisBox() //or checkThisBox(false);
And that would toggle all the check boxes in the Category 1 column. However, that does not appear to work. Is there another mechanism to do this, or some way I can loop over all the check boxes that belong to the same hierarchy? I know this approach works with buttons and text fields but checkboxes appear to be different.
I found the answer. To get all the checkboxes use getArray() after calling getField.
http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/w whelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJS.88.744.html
Similar Messages
-
What makes a field eligible for selecting data in a subreport?
Hello,
I have posted the following question to [StackOverflow|http://stackoverflow.com/questions/4366702/what-makes-a-field-eligible-for-selecting-data-in-a-subreport], but it has so far generated no replies. I decided to cross-post it here to see if I could get a better result.
The TL;DR of it is that I have a field which I should be able to link in my Subreport, but it does not appear, and I was wondering what I need to do to make it appear.
I have a Crystal Report I'm trying to recreate from scratch after an update from VS2008 to VS2010 caused it to implode horribly.
I've gotten most of the way through, but I'm at a stage where I'm linking a field in the Main Report to a corresponding field in the Subreport.
I have set up a bunch of Database fields in the Subreport, I've added the table I want, TableA, I've linked it up as everything was linked in the original report, with TableA at the head of the linking chain, so that all the rows I want can be derived from the result of that first query ( Actually, all of the links from the original Report were red in the Database Fields linking dialog, whereas mine are a bit rainbow-y. All the links in TableA are red, though... _ )
In the "Subreport Links" dialog, I have an integer which I know is being pulled from the database correctly. I've added it in the "Fields to link to" listbox, and selected the newly-created parameter in the "Subreport parameter to use" combobox. I've ticked the "Select data in subreport based on field" checkbox.
The database field I want to link to then does not appear in the second combobox.
Another integer field in TableA shows up fine in the "Select data..." combobox (and is linked to another field being passed in), so I don't know why these two integer fields, which are equally important, and exist on the same level, on the same table, are being treated differently by the report designed.
Any ideas what I'm doing wrong?Here is what I'd do:
1) Download CR 2008 eval designer from here:
http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
2) Try the linking in CR 2008 designer
3) If it does not work there, ask why not in the [CR design|SAP Crystal Reports, version for Visual Studio; forum.
4) If you get the linking working in the CR 200 designer, try to run the report in your VS2010 app (after ensuring the report woks as expected in CR 2008).
5) If (4) above works out for you, please let me know as this may be an issue with CRVS2010.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
Single Date Parameter, but using a date range for selection
Post Author: fireman204
CA Forum: Formula
I'm fairly new to Crystal Reports, so be gentle with me. I have a report that has 4 parameters. The report asks for data for a specific month, the YTD data to the end of the selected month, and the same data from the previous year. It seems there should be a way to enter a single parameter (ie., 2007-4-1), and off that date select all the data for the month, the current year to the end of that month, and then the data from the previous year for the same period. I know this will be a formula field needed to select the data, but not sure how to get there from here. Any ideas? Thanks in advance!Post Author: SKodidine
CA Forum: Formula
It should be possible for you to create just one parameter to have the user input a single date and then create formulae to create the begin and end dates for the month, YTD and PYTD. You can then use these formulae for record selection criteria.
For example, if the user inputs a date of 2007-04-01 for the single parameter then create formulae such as:
beginmonth
datevar beginmonth;
beginmonth := date(year({?My Parameter}),month({?My Parameter}),01);
endmonth
datevar endmonth;
endmonth := cdLastDayOfMonth ({?My Parameter});
To use the cdlastdayofmonth function, In the formula workshop window, click on "Repository Custom Functions" then under CRYSTAL and DATE right click on cdlastdayofmonth and click on ADD TO REPORT. Once that is done, then create the above "endmonth" formula. You should see this new function in your formula workshop window in the FUNCTIONS window under CUSTOM FUNCTIONS.
beginytd
datevar beginytd := date(year(currentdate),01,01);
endytd
datevar endytd;
endytd := cdLastDayOfMonth ({?My Parameter});
beginpytd
datevar beginpytd := date((year(currentdate)-1),01,01);
endpytd
evaluateafter({@endytd});
datevar endytd;
datevar endpytd;
endpytd := date(year(endytd)-1,month(endytd),day(endytd));
In your record selection criteria, you can use the above formulae like this:
in {@beginmonth} to {@endmonth}
or
in {@beginytd} to {@endytd}
or
in {@beginpytd} to {@endpytd};
This is one way of doing it, perhaps others might pitch in with a more efficient way. -
ALV Grid OO : Set Field editable for selected rows
Hello ABAPers,
I used object cl_gui_alv_grid to created ALV grid and i succed to set an editable
field for all rows. However my request is to set it for and only for selected rows
I could get the row index but i didn't know how to use it
Thanks in advance
AmineHi Amine,
I think the standard SAP sample program might help you, BCALV_EDIT_02.
I will tell the procedure to make the selected rows editable on ALV.
1. Add a additional field of type LVC_T_STYL in the internal table that you are displaying in the ALV. LVC_T_STYL is a actually a table type.
2. Place a button on the ALV toolbar for EDIT/DISPLAY.
3. Once you press the EDIT button after selecting the rows, loop through the records which you have selected (you have already said that you have the index of selected records).
4. The table type LVC_T_STYL has fields for FIELDNAME and STYLE.
If you have 10 fields in the internal table, then all these ten fields name should be appended to the newly added field in the internal table (LVC_T_STYL) and their style should be populated with value cl_gui_alv_grid=>mc_style_enabled.
Regards,
Rahul MB -
How to use Multiple Single Option for selection in the Customer Exit
Hi,
How can we handle the multiple single values in the customer exit variable.
I have a requirement which is as follows -
Table A fiields -> Field Coach, Partner 2, Relation between PArtner 1 & Partner 2, Valid from, valid to date.
Table B -> Service Month, Start Date, End Date.
Table C -> Billing Date, Execution Partner,cal month /year.
For the Field coach in TABLE A, multiple Partner 2 are present.
Report has to be built on Table C.
User inputs the Service month and Field Coach . User can enter multiple field coach values.
For the All the Field Coach values entered, corresponding Partner2's have to be found from Table A and to be passed to the Execution Partner in Table C.
Now if we want to use customer exit variable on the field Execution Partner, how can we handle the Multiple Single selections in the customer exit.
Thanks,
ShubhamHi,
While creating the variable you must have to specify multiple value.
In customer exit
write code multiple times and append the values.
For example:
when 'variable'.
l_s_range - sign = 'I'.
l_s_range - OPT = 'EQ.
l_s_range - LOW = EXECUTION PARTNER 1.
APPEND L_S_RANGE TO E_T_RANGE.
l_s_range - sign = 'I'.
l_s_range - OPT = 'EQ.
l_s_range - LOW = EXECUTION PARTNER 2.
APPEND L_S_RANGE TO E_T_RANGE.
l_s_range - sign = 'I'.
l_s_range - OPT = 'EQ.
l_s_range - LOW = EXECUTION PARTNER 3.
APPEND L_S_RANGE TO E_T_RANGE.
Regards,
Ranganath. -
Should I use Sub-Equipment Hierarchy for sub-systems (first post)?
I am 2 months into the maintenance manager role for a fleet of Locomotives and it has been decided to use SAP PM by senior management based on a separate business arm requirements.
I believe for this to be successful the first step is to get the structure right so that data is collected in the most logical manner.
I intend to use SAP to schedule all maintenance tasks based on measuring points and dates of previous work orders, capture system and sub-system failure history, capture costs and parts usage and trend performance of subsystems based on their own and system level measuring points.
I have been told that all locomotives are assigned to a single functional location within the business model. The individual locomotives themselves are assigned as separate pieces of equipment in this functional location.
Within the individual locomotives there are a series of subsystems that have associated maintenance requirements based on time and usage and they are serial number tracked. These items are exchanged between the locomotives and the warehouse upon failure, upgrade or overhaul and include:
AC traction Motors
Wheelsets
Diesel Engine
Main Generator
Auxiliary Generator
Dynostarter
Gearbox
Compressors
Traction motor blowers (Fans)
Radiator fans and AC radiator fan motors
Is it logical to put these as sub-equipment within an Equipment Hierarchy with the Locomotive being the superior equipment?
Should notifications regarding their failure be assigned to the Superior Equipment (Locomotive) or the Sub-Equipment and what are the implications of each? If assigned to sub-systems can I still report on system reliability by "rolling up" the failures?
Do the measuring points (e.g. kilometres) assigned to the Superior Equipment (Locomotive) accumulate to the Sub-Equipment automatically and does installation and removal from different Locomotives with different kilometres affect this? For example a traction motor in Locomotive 001 is installed from 100,000 to 360,000 locomotive kilometres and then it is installed in Locomotive 002 from 300,000 to the current 340,000 locomotive kilometres. Does SAP accumulate 300,000 kilometres of life to the traction motor sub system based on its superior equipment's measuring points?
I have many more questions to come that I will most likely solve through experimentation and future questions, but in order to hit the ground running I would appreciate your feedback if any of you have similar experiences.
Thanks in advance
Glenn SandersIn SAP, you can define "N" no. of hierarchies for Functional Location & Equipment.
But in the reporting, you can get the costs at Functional Location level & Equipment level at next. Its not possible to have Sub Functional Location level or Sub Equipment Level.
Also, you have mentioned that you will interchange the Sub components between Locomotives. Also, you want to maintain those using Serial Numbers. You can define these Sub Components as Assemblies with Serial Numbers so that Equipment can be created for those combinations.
To maintain Measuring Point for Sub Components, Equipment should be created. In SAP, you have the option to transfer the Measuring Points from One Equipment (Superior Equipment) to another Equipment (Sub Equipment).
While interchanging the Sub Component from One Locomotive to another Locomotive, without Measurement Reading Transfer, you can dismantle & install the same. -
Extra column names selected when using the 'popup describe' for selecting columns
Hi,
In SQL Developer 3.2.20.09, if you use the popup describe function on a table and individually select some columns using Ctrl + click (not shift click which would select a range of columns), and then drag them to the SQL worksheet so the column names come across, it will include all columns between the individual columns that were selected.
For example if I choose column 1 and 5, it will include columns 1,2,3,4,5 when I drag them across.
Simple to reproduce on any table, just open the SQL worksheet, type the name of a table, open the popup describe and select some columns.
regards,
SteveThis isn't happening in v4 EA2 so it appears to be fixed.
-
COPA extraction issues - Incorrect field name for selection
Dear gurus,
I've issues with my COPA extraction, hope you guys could give me some clue here, point will be rewarded if I could fine the solution.
Requirement:-
To add additional field.
Step:-
As usual 1) Delete
2) Create back with select the new field. (KEB0)
3) Do not have issues when check RSA3 from DEV, but when transport to QAS I hit this issues.
Issues:
At RSA3 , when do check hit the error, "Errors occurred during the extraction"
When check from RSA3 log here I get..
** Did try to find any solution in SCN forum, with no luck. Hope get some help here.
thank you
rgds
Edi.Yes I did get this feedback ..
Hi Edi,
As per the standard SAP, once you have assigned characteristics and values fields to your operating concern (KEA0), you can't de-assign them. When characteristics or values fields are in assigned status, you can't delete them.
But I hope there won't be much problem of having that characteristic also. If you look at performance wise, then instead of deleting, make "not used" under profitability segment characteristics, remove from the characteristic groups etc. While doing so, please check any derivation rules written based on these, or any assessment cycles defined with these also..
Regards...
Jose
forward to my FICO .. -
Use of field exit for validation of KNTTP in ME51N
Hi All,
I've a client who is still running on SAP 4.6C. There is a requirement to validate the Account Assignment Field KNTTP based on the document type, and if the validation fails, to raise an error message. As there is no standard user exit that I've been able to find for this field, and we don't want to modify standard screens, I've created a field exit against the KNTTP field and generated the FM FIELD_EXIT_KNTTP, and activated it, but it doesn't work.
As this is the first Field Exit I've coded could someone please assist me with understanding the following: in the parameters list is the value of INPUT the value of, in this instance, the KNTTP field and also is it possible to read other screen data within this FM, for example, if the KNTTP value eq 9, can I read the BSART field of the current transaction, and if so, how do I reference it (BSART, EKKO-BSART, MEREQ_TOPLINE-BSART, parameter id BSA, etc)?
Any suggestions on how to debug the process would be greatly appreciated as well.
Any help would be greatly appreciated.
Regards,
SteveDue to lack of assistance, we were unable to pursue this requirement - the users were not happy, but what can you do, huh!
-
How to use common event handler for selected movie clips?
I have a 50-state map in a flash movie. Each state is a movie
clip.
Goal: when mouse moves over a state or is clicked in a state,
the state will be highlighted in a bright color and a small box
will pop up near the state and display some information about the
state.
Question: I know I can add mouse event handler for each state
movie clip. But this is simply not good since this has to be done
50 times and codes thus scattered different places. Ideally, I only
want to have one script that determines where the mouse position is
when events trigged and then do right things (highlight the state
and display info. in a pop-up). How can this be implemented?
Thanks!There are a number of ways. Which way is best depends on how
you have things set up so far.
E.g. If they have an enumerable naming convention:
e.g. each clip is like state_0 , state_1 etc.
Then you can loop through them and assign them all to the
same mouse event handler via the loop. You would need properties
other than the name of the clip to identify the state. E.g. each
clip could contain its own data or the index could be a pointer to
the state data (objects with state name and info properties) in a
separate array.
//state clips named
for (var i=0;i<50;i++) {
this["state_"+i].stateindex=i;
this["state_"+i].onPress= statePressHandler;
var stateData:Array = [{name:"StateName,info:"this state
Info"}, name:"StateName,info:"this state Info"}, etc...]
function statePressHandler() {
trace(this);
trace(stateData[this.stateindex].name+"="+stateData[this.stateindex].info);
Other ways are possible too but the best approach depends on
how you have named the clips and whether you're creating them with
code or whether they're already on stage from authoring (my guess).
If they're already on stage and they're called "Alaska" etc, then I
would be inclined to put them all inside a container clip that
contains nothing else other than states. It would avoid the need
for an array of clip names or for checking some other specific
property of each clip to determine if its a 'state' clip and not
something else in a for..in loop. -
Apex 3.1 - checkbox for selecting email addr - problem w/ HTMLDB_MAIL.SEND
So prior to the upgrade to 3.1 I had working where I use a multi-select checkbox to show email addresses with a comma behind each email address it to send via:
HTMLDB_MAIL.SEND(
p_to => :P24_EMAIL_LIST,
p_cc => :P24_CC_EMAIL_LIST,
And basically the list looked like this and was stored like this [email protected],:[email protected],:[email protected]
The way checkbox selection are stored in the database it has the colon separation. Prior to 3.1 it would send with colon : preceeding the email address, but now it doesn't. Any thoughts? I've tried using Trim(':' xxx) but not solved it yet
Message was edited by:
user604228Hi Frank,
Can you show me the code you used to create the multi-select checkbox to show email addresses with a comma behind each email address it to send via:
HTMLDB_MAIL.SEND(
p_to => :P24_EMAIL_LIST,
p_cc => :P24_CC_EMAIL_LIST,
I'm trying to do the same or something similar to this [http://cloudisfuture.blogspot.com/2012/05/sendemail-to-multiple-contacts in apex-oracle.
I'm using Apex 4.0 on oracle express edition 11g.
Thanks -
Field in the Selection Screen.
Hello Experts,
I need some info to list all the reports which uses a field in the selection screen.
For example the field SAKNR (G/L Account). If this field used in the 10 reports selection screen, then I need to display all the 10 reports.
Is it possible to get the fields used in the Sel. screen of a report.
Please give some suggestion.
Regards,
VasanthHello Narendra,
Thanks for the reply.
See In a program I declared the field like this:
PARAMETERS: P_SAKNR LIKE EKKN-SAKTO.
So in this case I have to list this report name.
Hope you understand my requirement.
Thanks !!!
Vasanth -
Using a parmater field for a Date field using the "in the period" selection
Users would like to fetch records using the "in the period" record selection. They would like to be prompted on the period to run the report. ie
MonthToDate
YearToDate
Last7Days
Last4WeeksToSun
LastFullWeek
LastFullMonth
AllDatesToToday
etc...
I've created a parameter with a dropdown list of values. However the parmeter field I created isn't available as a value in the date field in the "Select Record Expert" function.
Is there a work around?Ron,
Unfortunately you still have a little bit more work to do... but not much.
You need to add a formula to your selection criteria. Something along these lines:
IF {?DateRange} = "MonthToDate" THEN {TableName.DateField} in MonthToDate ELSE
IF {?DateRange} = "YearToDate" THEN {TableName.DateField} in YearToDate ELSE
IF {?DateRange} = "Last7Days" THEN {TableName.DateField} in Last7Days ELSE
IF {?DateRange} = "Last4WeeksToSun" THEN {TableName.DateField} in Last4WeeksToSun ELSE
IF {?DateRange} = "LastFullWeek" THEN {TableName.DateField} in LastFullWeek ELSE
IF {?DateRange} = "LastFullMonth" THEN {TableName.DateField} in LastFullMonth ELSE
IF {?DateRange} = "AllDatesToToday" THEN {TableName.DateField} in AllDatesToToday
On the plus side, you'll be able to go back into your parameter and add some spaces to list options... which will look better for the end users.
HTH,
Jason -
CAN USE SELECT OPTION FIELD IN FOR ALL ENTRIES CONCEPT
Hi sir/ madam,
can i write code like this .
i have data in itab1 .
select-options : s_matnr like lips-matnr.
SELECT VBELN VGBEL VGPOS MATNR
FROM LIPS
INTO TABLE I_LIPS
FOR ALL ENTRIES IN ITAB1
WHERE VBELN = ITAB1-VBELN AND
MATNR = S_MATNR.
Thanks & Regards
Suresh kumarHi Suresh,
To correct ur code syntactically, repacle the
=
operator with
IN
. This may be correct but from data consistency point of view this may not be the ideal thing to do.
You can foolow thw following steps:
1. Fetch data in ITAB1 using the MATNR in the select-option. I hope you do have
MATNR in ITAB1.
2.
SELECT VBELN VGBEL VGPOS MATNR
FROM LIPS
INTO TABLE I_LIPS
FOR ALL ENTRIES IN ITAB1
WHERE VBELN = ITAB1-VBELN AND
MATNR = ITAB1-MATNR.
This should be correct form data consistency view-point.
Hope this answers ur query. Please award points if u find the answer helpful.
Regards,
Suhas
Maybe you are looking for
-
Skip_unusable_indexes and primary keys
Hi, if have data for a big table splitted in multipe files which i want to load via sqlldr all in the same table as fast as possible. The indexes should be rebuild after the last file was loaded. So I use SKIP_UNUSABLE_INDEXES=TRUE,SKIP_INDEX_MAINTE
-
How to change the order of the buttons in MIDlet?
Hi everybody, I need to put at the right side of my screen the button menu which includes �Save� and �Save Group� buttons and at the left side the button �Back�. I declared commends like these: private Command backCommand = new Command("Back", Comman
-
Error in recreating SE16 Transaction
Hello All, Using the Thomas Jung's blog I'm trying to recreate the SE16 Transaction. But now I'm facing a Problem . When I execute my Application I'm getting the following runtime Error : Error when processing your request What has happened? The URL
-
Moving Adobe Photoshop Elements 13 & Adobe Premiere Elements 13 to a different PC
I bought a download copy of Adobe Photoshop Elements 13 & Adobe Premiere Elements 13 from Adobe site - and am planning to install on my older desktop and my new laptop. In few months, I will be upgrading the desktop to a newer model. Once I upgrade
-
Why does GarageBand crash every time I try to record a certain song.
I have recorded many songs using the GarageBand app. However I've been trying to record a new one and every time I get just past the middle point, the app crashes. I reset it and am able to retrieve all my other songs but when I try to pull up the on