Using WE to display a custom box

I have a report that I want the user to be able to sort or filter by clicking on a col header. When the user clicks on a col header, I want a small box to appear just below the col header with radio buttons to choose Asc or Desc and a drop-down list to choose a value to filter the col on.  I worked out the javascript for this in a text editor and it works (and I thought it was pretty cool). I've converted the javascript to Crystal Reports syntax and created some Webelements functions:
This first one sets up the styles and js functions -
// WEsortfilter
// Add options to sort A/D and to filter on columne clicked
// Pass in string of values from main rpt and sort ASC
// When col header is clicked - display form with radio buttons and drop
//      down list of values.
//When sort is selected or member of list execute sort/filter.
Function ()         
'<STYLE type="text/css">'
+ '.Test{border-style:solid;border-width:1px;border-color:navy;'
+ 'position:absolute; z-index:66; background-color:lightblue;width:6cm;'
+ 'height:.83cm;padding-left:10px;padding-top:5px;font-family:Verdana;font-size:9pt;}'
+ '.sortlink{font-size:10;font-family:Verdana;color:blue;}'
+ '</STYLE>'
//End of styles
//Javascript  to call sort/filter box
+ '<SCRIPT LANGUAGE="JavaScript">'
+ 'function displaySortFilter(myid){'
+ 'var topObj=document.getElementById(myid).offsetTop;'
+ 'var leftObj=document.getElementById(myid).offsetLeft;'
+ 'var cdObj=document.getElementById("Test").style;'
+ 'cdObj.display="";'
+ 'cdObj.left=leftObj;'
+ 'cdObj.top=topObj+26;'
+ '}</SCRIPT>'   //End of function
+ '<form name="sortfilter">'
+ '<div ID="Test" NAME="Test" class="Test"'
+ 'STYLE="display:none">'
+ '<div id="divradio" STYLE="position:absolute">
+ '<input type=radio name=radio ID=radio value="asc">'
+ '<Span>ASC</Span>'
+ '<input type=radio name=radio ID=radio value="desc">'
+ '<Span>DESC</Span>'
+ '<SELECT NAME="filteroptions" ID="filteroptions" >'
+ '<OPTION VALUE="0" selected>Choose One<BR>'
+ '<OPTION Value="00">First<BR>'
+ '</SELECT>'+ '</div></div></form>'
The second function creates a link for the user to click:
//WEcallSortFilter
Function ()
'<A Style="text-decoration:underline" ID="sbu" class="sortlink" href="" onClick="'
+ 'displaySortFilter(this.id);return false">SBU</A>'
The third one adds the style and js functionality to the report:
//Display sortfilter custom function
WhilePrintingRecords;
WEsortfilter
The last one adds the link to the report for the user
//Call sortfilter custom function
WhilePrintingRecords;
WEcallSortFilter
When I run this in the report through Infoview, the box pops up, however,
1)     it doesn't show up right under the link clicked, but in the location where it was placed in Crystal Reports design view. It shows up like a static object instead of at the location clicked.
2)     When the box displays, it is transparent. The other text on the rpt shows right through the box. I've tried changing the z-index to no avail. And no, making the box a solid color doesn't make it opaque. The other text showing through makes it difficult to click on any of the radio buttons.
All this is beyond the WE examples, but I''ve to kick it up  a level (or three) to get this project done.
Thanks

hey, ran some tests on your scenario. to answer your questions...
1) all of the functions are designed so that you don't have to make copies of them...all controls should be aok with being on a report more than once, as long as the element names are different...the ones that create on-click functionality (such as the collapsible section) require a different name for each control or you'll run into problems...the last iteration of the control on the report will be the only one that (sort of) works.
that being said, i created 2 formulae and ran your code without any issues with a duplicate of the function.
the only things that should cause something like this is
(a) a control name starting with a number or containing certain non alpha-numeric characters...they follow the same rules as javascript...unfortunately this little tip was not in the user guide even though it was on the list (my fault, sorry) or
(b) two control names that are the same or
(c) a duplicate of the same formula on the report.
2) another little tip that seemed to not make it into the user guide is to follow the same ordering principles on a report that you would with normal layering when designing a crystal report...i.e. right-click on objects in the designer and choose Format, then use the Move object action to bring the objects to the front.
note that if there is a select menu below these controls you will not be able to have the collapsible section (or any other control) cover that select menu up...this is a known issue in internet explorer and there is no workaround for that one.
hope that this helps,
jw

Similar Messages

  • Using BBP_CUF_BADI to display custom screens

    I am using BBP_CUF_BADI to display my customer screen on the Shopping Cart Item Screen. How do I pass data to my custom screen? I would like to display my CUF fields, I would like the data from the standard fields on the Shopping Cart line item. Any help would be appreciated.

    Hi Jagathi,
    You'll name the FM as you want.
    The pupose of these 2 FM is to exchange data between the BADIs methods and the Function Group (with global data of the FG).
    The 1st FM is to be called from the PUT_DATA method of the BADI, to send data to the Function Group (FG global data): for example items and/or header and iv_mode, ...
    The 2nd FM is to be called from the GET_DATA method of the BADI to get the result of the subscreen (CUF changes).
    Hope you'll get it all.
    Vadim

  • Firefox not displaying buttons and boxes when allow other pages to use their fonts instead of my selection is selected

    Firefox not displaying buttons and boxes when allow other pages to use their fonts instead of my selection is not selected. The irritating thing is that Firefox used to display pages until FF 31. Please fix this
    Thanks
    Randy

    The missing icons are supplied by a font that is downloaded from the server (@font-face) as you can probably see by little boxes that show the hex code of the characters.
    You will have to make sure that you allow pages to choose their own fonts to see such an icon font.
    *Tools > Options > Content : Fonts & Colors > Advanced: [X] "Allow pages to choose their own fonts, instead of my selections above"

  • When i try to use my apple acocunt for the first time i get a prompt to put in my CC info but after i agree to the TOS the ipad only displays a black box no text, ive erased the ipad and still the same thing

    When i try to use my apple acocunt for the first time i get a prompt to put in my CC info but after i agree to the TOS the ipad only displays a black box no text, ive erased the ipad and still the same thing

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • When I print out any web page, I get date/time at the bottom. I just want to print the date , what format do I use in page setup custom box ??

    I want to print just the time at the bottom of my printed page
    what format do I input into Page Setup>Custom box
    What ever I input it is shown in the actual format that I have input
    i.e date is shown as date not 28/06/2010
    == This happened ==
    Every time Firefox opened

    I do not know much on this subject. But check Window to see if
    all the languages you need are listed. Then check your other
    programs that, like Firefox, have their own language files.

  • Delivery address of a PO has German display for PO Box

    Hi Experts,
    Delivery address of a Purchase Order has the German display for PO Box .
    This happens when the user tries to get the print Purchase Order.
    In print preview , everyhting is in English except PO Box (showing like postfatch(German word for PO Box))in the delivery address.
    Pl Help me to resolve the issue.
    Thanks!

    For your reference, I am pasting the text in this note
    Symptom
    When you print foreign addresses, the word "Postfach" (PO box) does not appear in the language of the recipient or the recipient country but rather in another language, for example, in the logon language, or always in English (PO box).
    When several documents are printed in succession, the word "Postfach" may also be printed in the language used in the previous document.
    Other terms
    Postfach, PO box, abroad, SAPLSADR
    BAS_PRINT
    Reason and Prerequisites
    The most common cause is that the word "Postfach" is not translated for the corresponding language.
    The word "Postfach" is stored as numbered text in program SAPLSADR.
    In function module ADDRESS_INTO_PRINTFORM, the text is read using the ABAP command SET LANGUAGE.
    Normally, the word "Postfach" is written in the language of the
    recipient, alternatively in the language of the recipient country (based on the setting in the country definition). This is also the case for form printing, the form langauge is not taken.
    In case no text is available in the entered language, the system responds in the following way:
    In Releases R/3 4.0B (as of Support Package 16, see correction instructions) to Basis Release SAP Web AS 6.10 the command SET LANGUAGE as SY-SUBRC returns the value 4. In function module ADDRESS_INTO_PRINTFORM the text language is then set to English (SET LANGUAGE 'E').
    The text 'PO box' is then displayed.
    As of Basis Release SAP Web AS 6.20 access to the secondary language is possible.
    The secondary language is defined using the profile parameter zcsa/second_language.
    The command SET LANGUAGE then returns the value 0 as ST-SUBRC so that the function module can no longer explicitly respond to the command SET LANGUAGE 'E'.
    The outcome can then be completely unexpected, for example, the German text 'Postfach' is displayed even if neither the logon language nor the recipient address bear any reference to the German langauge.
    Solution
    The following are possible solutions:
    1. Translate the text element into the language of the recipient country.
    2. As of 6.20: Change of profile parameter zcsa/second_language
    1. Possible Solution: Translation of the text element
    This is possible in all Releases for languages compatible with the installed codepage.
    For languages that are not suitable for the installed codepage this is no longer possible as of Release R/3 4.0. The translation Transaction SE63 then delivers error message SD836. This check cannot be avoided, in this case a translation is impossible.
    Translate the text element into the language of the recipient, or recipient country:
    To do this, call Transaction SE63 and choose the menu path:
    Translation -> Short texts -> Program -> Numbered texts
    (or Translation -> Short texts -> ABAP/4 -> Program texts)
    Program: SAPLSADR
    Source language: your logon language, for example, 'D',
    Target language: Enter your required language, for example, 'E'
    Choose 'Translate', enter the foreign text there and save.
    As described above, the language of the recipient, or the recipient country (and not the form language) is normally relevant.
    If you are in doubt, find out which country has been maintained for the recipient country in the country Customizing settings (Transaction OY01, or, in non-R/3-systems such as CRM,EBP, etc.: Transaction oy07).
    To be able to translate a text into a particular language suitable for the installed codepage, it is not necessary to install the language.
    The language key should have been entered in the language table (T002) and in the check table TSKT9 (for the translation tool).
    For languages not suitable for the installed codepage the translation will not be permitted as of R/3 4.0.
    Since the translations of texts in the SAP system are delivered for each language it is unavoidable that this text element in an installation may not be available in all necessary languages.
    Below is a list of translations of the word 'Postfach'
    CS  Czech           Postbox
    DA  Danish          Postboks
    DE  German          Postfach
    EN  English         PO Box
    ES  Spanish         Apartado
    FI  Finnish        PL            
    FR  French          Boîte postale
    HU  Hungarian       Postafiók
    IT  Italian         CP
    NL  Dutch           Postbus
    NO  Norwegian       Postboks
    PL  Polish          Skr. poczt.
    PT  Portuguese      Caixa Postal
    SK  Slovakian       P.O.Box
    SV  Swedish         Box
    2. Possible Solution (as of 6.20): Change of profile parameter zcsa/second_language
    By setting the profile parameter Zcsa/second_language to value 'E' you obtain the same behavior as found in Releases up to 6.10, in which case the text is not available in the entered language.
    The secondary language, English, is then accessed, resulting in the text 'PO box' being displayed.
    Refer also to Note 140130 if illegible special characters are displayed for countries whose language does not fit the codepage installed. Example: English codepage, destination country Japan. Normally, the Japanese text elements should not be contained in the system, and the English text should be printed. If nevertheless special characters are displayed instead of the English text, Note 140130 may help.

  • Non-english character display as square box

    Hi all,
    I'm not very sure if this question should be asked here or in the JRE board, thus I'm trying here also
    I have been trying an opensourced application called Alliancep2p (could be obtained from www.alliancep2p.com) using JRE 1.6 on an English Windows XP Pro machine.
    The problem:
    all chinese input are displayed as "square box". It looks like the programme "gets" the correct character, only that everything is displayed as "square box".
    It looks like a font issue, though I'm not that sure. Is there anyway the default fonts could be changed, or to get the characters correctly displayed?
    Note: I have east asian fonts installed, and the Java config panel can display chinese or other non-english characters correctly.
    I tried the same application under GNU/Linux (locale is UTF-8) and chinese input/display correctly without any problem at all. Does it mean that it is not the problem of the application, or?
    The original question in the JRE board:
    http://forum.java.sun.com/thread.jspa?threadID=5265369&tstart=0
    Thanks for all the input.

    I'm not really sure if it's a problem of the application or not. But the fact that it works perfectly under Linux makes me think maybe it's not the problem of the program, and actually their developers said that unicode is being used all over the program and seems like they're not CJK users also.
    I'm not a java guru so I can't really tell from the source if there's anything wrong.

  • Help using a mini display port to HDMI cable with MacBook Air and TV

    Hi, Apple gurus. I need help setting up my MacBook Air to my Vizio TV using a mini display port to HDMI cable that I just purchased on Amazon.
    And here's info about my MacBook Air:
    In the Amazon reviews, someone posted the following how-tos, which aren't working for me:
    1. Plug in both ends, mini display port on your macbook and the HDMI on any available port on your LCD.
    2. Go to upper left Apple menu and scroll down to system preference. Or use your FINDER from the dock, go to applications, then system preference.
    3. Click on Displays
    4. Click on DETECT DISPLAY
    5. A similar screen pops up with name of your LCD, mine says SONY LCD, click on ARRANGEMENT
    6. Click the box that says MIRROR DISPLAYS.
    7. Go back into system preferences and go to SOUNDS which is located under HARDWARE.
    8. Click on OUTPUT, then select HDMI, which should be listed next to your LCD name.
    I ran into trouble at step #4. My MacBook Air doesn't list the option of "detecting display." I do, however, have the box mentioned in step #6, "Show mirroring options in the menu bar when available."
    Regarding step #8, HDMI didn't appear in the list — I only see "internal speakers."
    So, what am I doing wrong? Or, did I buy the wrong cable?
    Thanks in advance for your help!

    Or you need to get an appropriate adaptor. The Griffin adaptor sold on Apple's Online Store will work with a standard HDMI cable.

  • Can I use a mini display port to VGA adapter and then a VGA to av adapter to connect my MacBook pro to my standard definition tv?

    Can I use a mini display port to VGA adapter and then a VGA to av adapter to connect my MacBook pro to my standard definition tv?

    No. You need a converter box like this to go with your MDP-VGA adapter:
    http://www.amazon.com/PC-To-TV-Video-Converter/dp/B001CJOLBW/ref=pd_cp_e_2

  • How do you use the Multiple Item Information dialog box ???

    How do you use the Multiple Item Information dialog box ???
    Where are the instructions on how the information in the Multiple Item Information dialog box equates to ...
    1. The way iTunes sorts tracks and albums
    2. The reason to select a leading check box
    3. Why there are Option selections (Yes /No) and leading check boxes.
    4. Why some changes remain in the track info, but do not "take effect" in iTunes (Part of a compilation is an example)
    Looked in Help, Support, went to the local Genius bar for an hour, even arrainged a call from apple support ...
    Thanks

    As Christopher says, it's a compilation. Different tracks are by different artists.
    Setting the *Album Artist* field to *Various Artists* and setting *Part of a compilation* to Yes should be all that is required. Depending on your *Group compilations when browsing* setting ( I recommend On ) either should suffice but I suggest doing both.
    Based on your commentary, I selected all the "O Brother" tracks, and checked the boxes for everything line that was blank in the Info and the Sort panes. Only exceptions were the album name and the disc number 1 of 1 and the artwork. I blanked and checked anything else.
    That's not what I meant. When you select multiple tracks, only those values which +are already common+ to all tracks are displayed. Typically these will include Artist, though not with compilation albums, Album Artist, Album, No. of Tracks, Genre plus various sort fields. A blank value may indicate that different tracks have different values or it may be that the value is blank for all tracks. For the drop down values on the Options tab the value shown may not reflect the information in every tag. If values you expect to be common, such as Album Artist or the Album title are not displayed you can simply type these in and click OK. This will often be enough to group the album.
    If you place a checkmark against the blank boxes and apply changes then you will clear those fields so you should only do this if that is the effect you want. Putting a checkmark next to an empty (representing different values) *Track No.* box, for example, will just clear the all the track numbers which is very rarely useful.
    Adding then removing extra text is for a specific problem where despite all common values being identical across the tracks of the album iTunes seems to "remember" that it should see two albums. A typical example would be when an album originally listed as *Album CD1* & *Album CD2* is given disc numbers X of Y and then has the Album name changed to Album. I've seen iTunes merge all but one track into the new album, but insist on listing one remaining track separately, despite both albums having the same title. In this case I've found overtyping the album title again has no effect whereas changing it to AlbumX and then back to Album does what I was trying to achieve in the first place.
    Don't forget that even properly organsied albums may still break up if you don't chose an album-friendly view. Sorting on the track name or track number columns can be useful in some circumstances but in general I revert to Album by Artist when browsing through my library.
    tt2

  • How can i display a message box when error comes in jsp?

    Hi,
    i need to display a message box whenever an error comes in my jsp. Actually my appln is that i am creating a bar chart using one applet by taking data from the database. When a user does not select a number data for y axis, now in the centre of the web page one java error is coming. "not in number format". it is looking very odd.
    so i want to display the error in a message box whenever it comes as above. pls help me how can i do the same...
    Regds,
    Abhi...

    Hi,
    thanx for ur response. so u mean to say that i can
    display the errors in the web page itself instead of
    displaying as a message box?Either way. You can have the JSP send a message to the applet to display a message box. Or you can just have the JSP do it. or you can have the applet detremine if the JSP would produce an error and then display the message it would display.
    >
    actually i am using servlets. jsp pages are used only
    as the front end. all the background works are doing
    in servlet only.It should be the same in any case. Is the applet connecting to the JSP pages or are you having the browser do it?
    >
    pls get back...

  • How to display a message box in a UIX JSP page?

    I've a UIX JSP Application with BC4J developed with JDeveloper RC.
    The problem is that when the user mistakes in the insertion/updating, I'd like to help him displaying a message box or a modal dialog window.
    In particular, I've the following code:
    <%@ page errorPage="errorpage.jsp" contentType="text/html;charset=WINDOWS-1252"%>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui/bc4j" prefix="bc4juix" %>
    <%@ page import="oracle.jbo.JboException" %>
    <%@ page import="CdssPackage.*" %>
    <%-- Define Application Module and DataSource--%>
    <%-- Define Application Module and DataSource--%>
    <jbo:ApplicationModule configname="CdssPackage.CdssPackageModule.CdssPackageModuleLocal" id="app1" username="scott" password="tiger" releasemode="Stateful" />
    <%
    //Check the mandatory fields are not null
    if ((cod_comm.compareTo("")==0) || (nome_ruolo.compareTo("")==0)){
    throw new JboException(Errors.ERR_REQUIRED_FIELD);
    //Now, the errorpage.jsp is displayed, while I'd like to display a message box or a modal dialog window
    %>
    How can I do it?
    Thanks in advance.

    Michele-
    You can use javascript to send a message window in the http protocol.
    Hope this helps,
    Lynn
    Java Tools Team

  • Web-based BEx: How to display a customized message on the variable screen??

    Hi All,
    I'm now using the web-based BEx. Recently I want to display a customized message (e.g. the usage of the report) on the first page (i.e. the variable entry screen) of the query. Is it possible?
    Thanks.
    BR,
    M. Ng

    Hi marco,
          Check here. itmay help you.
    Custom Messages WAD
    Thanks,
    Vijay.

  • Customer number needed in "GL a/c line item display" for customer gl?

    Hi SAP Experts,
    while running GL account line item display in FBL3N,customer number is not displaying against the gl accounts relating to customer reconcilation account or the gls relating to the customer line item entry.my clients need that in either ASSIGNMENT field(where presently showing the document entry date as defult) or in a different column.for that he even does not want to write any report.
    How can i solve this problem?
    Plz guide me.
    I need a quick response.
    Regards,
    Biswa

    Hi,
    Check If you are using the G/L account which is the reconciliation account for your customer, then it is possible to display the special field1-U_KUNNR and it is ALSO possible to add Sort Key 031 into the Assignment field of that account in FS00 tab Control Data and therefore to display your 'Customer no.' in the Assigment field in FBL3N.
    If you are using the G/L account which is the offsetting entry or the other side of the posting, then it is NOT possible to display your 'Customer no.' neither in the Assignment field, nor adding the
    special field 1-U_KUNNR to the display. At this stage, notes 112312 and 217189 may be of use, which enable you to use a Business Transaction Event to populate offsetting account information.
    I hope these helps.
    Regards
    Ravinagh Boni

  • Chinese Character displayed as square box

    I have been trying an opensourced application called Alliancep2p (could be obtained from www.alliancep2p.com) using JRE 1.6 on an English Windows XP Pro machine. The problem is all chinese input are displayed as "square box". Searching for a particular chinese phase works, only that everything is displayed as "square box". It looks like a font issue, though I'm not that sure. Is there anyway the default fonts could be changed, or to get the characters correctly displayed?
    Note: I have east asian fonts installed, and the Java config panel can display chinese correctly.
    I tried the same application under GNU/Linux (locale is UTF-8) and chinese input/display correctly without any problem at all. Does it mean that it is not the problem of the application, or?
    Thanks for all the input.

    Hi,
    Please check below notes which could be helpful for your issue
    After Korean Language Installation Oracle Apps Displays All Characters As Squares [ID 731894.1]
    Chinese Display as Square on the Form Menu after Apply NLS Patch 6678700_ZHT [ID 839957.1]
    Chinese Characters are displayed as Empty Squares using Courier New Font [ID 578656.1]
    Regard
    Helios

Maybe you are looking for

  • How to check data records in R/3 (source system)

    Hello, I need to check the data records in R/3 (source system). Is Transaction RSA3 the only option or is there another way. When I use RSA3, all I see is the sandbox and cursor. Nothing seems to happen. Pls help. SD

  • Crystal Reports 2008 Can not edit in the formula editor? Help?

    I just used Crystal 2 weeks ago just fine. Now when I go into a report and then into the select expert then into the formula editor it will not let me edit my formulas. The cursor is there, but I can do anything. I tried to find and replace, but I ge

  • LDAP Reconciliation

    I've seen in a couple of posts that limiting the resource schema improves reconciliation performance. Now I'm assuming this is because the attributes that are brought back during a the list users process is limited to the attributes defined in the sc

  • Have G4 start up in Target Mode all the time?

    Hi again, I now have OSX 10.3.9 on the Power Mac (see more on that in this thread: (http://discussions.apple.com/thread.jspa?threadID=668359&tstart=0) I found out it has 512mb RAM, had OS 9.0.4 on it so I went through several upgrades of software and

  • "the MDM repository is invalid"

    Hej All Vi have updatered our MDM server with standard update from Microsoft. Later on we can't start MDM services, therefore after "a long fight" it was decided to restore repositories in that way: we restored a backup of the MDM database on the new