Web Elements Dynamic functionality

Hello Jamie,
I am in great hopes that you wil help me overcome my problem in regards to webelements. I've been going through lot of WE samples for crystal and have seen them working well. However I have noticed that most of the examples have hard coded the data within. Currently I am working on a project which has a requirenment to display interactive and dynamic content through crystal, I am using WE functions to achieve the functionality.
Example: I am trying to build a checkbox which should display dynamic content based on the users promtp selection. Like if a user selects country then the chkbox should display all the countries from the DB. The syntax for the chkbox goes something like this:
Stringvar values:= "1|2|3|4";
Stringvar displays:="some values";
stringvar defaults:=(?user prompt)
Wecheckbox("user prmpt",values,displays,defaults,rest of the parameters..........)
In this if i hard code the value the checkbox works fine.
My questioni is, how do I program this to show me the dynamic content in the report, I've been struggling a lot on this issue but unable to figure out. I want my syntax to be like:
stringvar values:="|";
stringvar displays:=({My database table name or formula})
stringvar defaults:=(?user prompt)
I have tried doing the above but I receive only one value or rather only the first entry of the database along with few array error messages,
while declaring the stringvar for values and displays,how should I specify the database entries, I cannot hard code all the country names here and tht too which are dynamic, it could be country today, may be produt tomorrow and so on....Also how would the value variable would know the count of countries
Please let me know a solution out of this. I have more confusions in regards to WE functions, I would post my rest of the questions on a different thread.
I would appreciate your help on this.

hello,
as you've found out if you put the functions on the report header you get the first record...on the report footer you get the last record. webelements are the same as crystal formulae in that they take the records available to them at that time.
first off, have a look at the webelementsDCP (dynamic cascading prompt) report...this is an example of a report using dynamic / database driven values for the functions.
in order to get a list of values from your database, you need to roll them up into a long text string while the report is reading the records from the database. in crystal reports, this happens top to bottom on the report. in the subreports in the DCP report, values are rolled up and then passed to the main report via a shared variable.
if you put a formula on your report details section that reads something like
whileprintingrecords;
stringvar s1:= s1 + + "|"
you will see the values roll up.
if you have a webelements report where you have the option of putting the controls at the report footer, then there's not as much work involved.
if you need the controls at the top of the page then you can use the technique like in the DCP report. look at the "select..." formulae on the webelementsDCP report and you will see that they use the shared variables created in the subreports.
cheers,
jamie

Similar Messages

  • How to populate data dynamically in WSelect web element.

    How to populate data dynamically in WSelect web element. what is the syntax of WSelect web element to populate data from the database

    Hi Jamie,
    There is no Url to download ackage, instead the link is taking here
    Crystal Reports webElements
    Can you give me correct link?

  • Fetch dynamic value form a web.element of Web applicaiton

    Hi,
    How can I fetch the dynamic value/values displayed on the web page?
    For Textbox we can use .getattribute("value") method.
    temp1 = web.textBox(64,"/web:window[@index='0' or @title='Regular Entry']/web:document[@index='3' or @name='TargetContent']/web:form[@name='win0' or @index='0']/web:input_text[@id='DISTRIB_LINE_MERCHANDISE_AMT$0' or @name='DISTRIB_LINE_MERCHANDISE_AMT$0' or @index='27']").getAttribute("value");
    How about retrieveing value for web.element object?
    web.element(314,"/web:window[@index='0' or @title='Regular Deposit']/web:document[@index='3' or @name='TargetContent']/web:label[@index='1' and @text='Deposit ID:' and @className='PSEDITBOXLABEL' and @innerText='Deposit ID:']").click();
    Here for /web:label[@innertext='Deposit ID:'] I need to fetch dynamic value displayed against Deposit ID.
    Can anyone please help?
    Thanks
    Bhaskar

    Hi Bhaskar,
    You can fetch a value dynamically using the Syntax,
    ]").getAttribute("*text*");
    Hope this Helps,
    Nishanth Soundararajan.
    Edited by: user9277220 on Apr 26, 2010 8:43 PM
    Edited by: user9277220 on Apr 26, 2010 8:43 PM

  • Web Elements 2.4 - Encoding Values

    I am using web elements 2.4 on XIR2.
    I have some cascading dropdown boxes populated with dynamic values from a subreport.
    This all works fine.
    However, some of the data has ampersand's in it such as 'B&P Level'
    Looking at the opendocument URL that the web element creates, it does not encode the values and so
    the & in the value is mistaken as the start of a new parameter.
    My question is, is there any update to web elements to handle non-standard characters and to encode the values in the javascript before it passes them to the opendocument URL?
    Thanks

    hey Brian,
    you have a couple of options when you have characters in the database that url's do not care for.
    option A
    if you use the extended (ext) cascading controls, they allow for a display value and an ID value to be passed. the ID is then used in your target report instead of your display value. this way the database values that you display in the controls do not have to be changed or encoded.
    option B
    you can use the urlencode function in crystal reports to change the value in the subreport that is rolling up the data.
    cheers,
    jamie

  • Crystal Reports XI Web Elements - populate WESelect element values from database field

    <p>Hi,</p><p>I am using Web Elements with Crystal Reports XI. I need to know how to populate the ElementValues and ElementDisplays arguments of the WESelect function from a database field. </p><p>In the function expert when I click on the ElementsValues and ElementDisplays values a drop down appears which will let me select a field or formula. However, when I try saving and leaving the formula workshop an error message is generated.</p><p> "A subscript must be between 1 and the size of the array".</p><p>I assume this is because the WESelect function is looking for the "|" separator in the ElementValues and ElementDisplays arguments.</p><p>Please advise.</p><p>Thanks</p>

    hello,Â
    in the webelements.zip download you should find a DCP report which shows the method for "rolling up" data using a subreport and passing these to a select control using shared variables.
    basically a string running total rolls up the values at run time and character separates them for use by the controls. for any type of select (drop down menu etc.) controls all of the values have to be made available before the main report is run so that's why you use this techique. you can think of it this way...instead of having an asp page that runs a database query and then populates a javascript array for the control, the subreport rolls up the values and passes them to the control.
    other types of controls that you wish to place directly on a group header or details section can be run off of main report fields or formulae...e.g. you can place a checkbox control on the details section without having to roll up the data in advance.
    by just putting a field name in the parameter for a select control, you will only get one value per control.
    i hope that this makes sense as it takes a bit to get used to at first,
    jamie

  • Web Elements in Crystal Reports on BOE XIr2

    <p>Hi</p><p>I am trying to set up my crystal report with multiple web elements controls and had a few questions.  Any assitance would be appreciated:</p><p>1) I have set up a radio button control and two drop down controls in my report.  When I post the report to BOE and view it in Infoview, I still see the initial parameter page pop up before getting to the report.  I have default values for each of the parameters and would like the report to bypass the parameter page and use the default values.  Once in the report, I am able to change the parameter values by using the web elements controls.  Any suggestions to get rid of the parameter page?</p><p>2) I also need to set up a hierarchical set of controls in the report.  I would like my radio button to be at the highest level and have the drop down box data be controlled by the radio button selection. How can I set this up?</p><p>3) Radio button - dynamic labels: I&#39;ve done this with a drop down box where the data gets populated from the result set data.  I was hoping to do that with a radio button as well, where the number of radio buttons and labels get dynamically generated based on the number of values in a column. </p><p> Appreciate any help with these.</p><p>Thanks<br />AJ</p>

    <p>hello AJ,</p><p>1) good question. once you&#39;ve built a custom page you never want to see that default prompt page again. what you should do is publish a hyperlink to your CMC that is an opendocument link with default prompt values to your report containing the controls. then hide the report itself in a folder that the end users can&#39;t see. this way only the hyperlink is available and no one will see that prompt page again.</p><p>2) if you open up the webelementsdcp.rpt from the webelements.zip folder, this is an example of heirarchical controls. for the first control in the ElementSet, substitute the WESelectCascade for a radio button control and you&#39;ll get the result you&#39;re looking for.</p><p>3) see #2...once you&#39;ve done the substitution above, the radio button will be using the same live data that the cascading select menu did.</p><p>cheers,</p><p>jamie</p>

  • Crystal Reports Web Elements - database write back question

    Hi,
    I have a question about Web Elements. In description of them on SAP site it says they can provide "write-backs to the database". This is something I would really like to see. I have a scenario:
    User sees a long report and sometimes she needs to add a quick note that should be saved into the database. That note can be entered into WETextArea I suppose and WESubmit button click can be an event  trigger for such a write back.
    I would like to see example of such functionality on Crystal Report rpt file.
    Please advise if anybody knows, I would highly appreciate your assistance.
    Regards, Grettir

    hello,
    webelements can be used for the interface to database writebacks...they don't do the writebacks themselves but create the interface to make it easier for an end user to add annotations etc...these values are then passed to a second report or a subreport. using the default prompting interface makes this quite difficult.
    here's where the database writebacks are done...since version 9 of crystal reports there have been command objects. command objects have the ability to use any database syntax that is compliant with the database connection. i.e. if the syntax can go through the odbc layer then you can do this in a command in crystal reports.
    commands will honour database securities so you don't have to worry about someone dropping a table if rights have been properly assigned. a word of caution there to ensure that database rights have been done properly as you don't want all end users to have the ability to write a report that can do database updates.
    commands are also database specific so you would have to check your database online help to see what syntax would be appropriate.
    the workflow would be to have 2 reports, one that had the webelements user interface and one that did the writeback. this user interface report would have the text object and submit button and using open document syntax, the values would be passed to the 2nd report that had the command object. the command object would have a prompt that would take the values from the open document url and then use the values in the write back.
    for example,
    1) the user interface report has one text object called "t1" and one submit button.
    2) the target command object report has a prompt called "t1".
    3) the target report command object has syntax like
    INSERT INTO yourtestable
    VALUES    ('{?t1}')
    SELECT     1
    4) yourtesttable in this case has only one text field
    5) the "SELECT 1" at the end of the command ensures that a dummy value is returned after running the update...to avoid a database error
    6) this syntax would be for sql server
    this is of course a very simplified example.
    if you are at tech ed phoenix, please drop by the business objects test drive area & i will be there. i can show you a bunch of different webelements examples and write back reports etc. until you become quite bored
    i hope that this helps,
    jamie

  • WEB Elements Usage

    <p>Can WEB elements be used by reports that are not viewed through Infoview?  For example a report being produced via a .NET application?  If so are there examples of this available? </p>

    hello,Â
    any html Crystal Reports viewer that can display passthrough HTML should be okay to use this function suite. viewers such as active x will not work.Â
    in order for the controls to pass the proper context from main to target report, opendocument syntax must be supported by your environment.
    even if you are using the business objects viewers, you do not need to present infoview to the end user...by creating a favourite that points to a "portal" report (i.e. a main report that has links, tree menus, tab menus that open up a report within an iframe or in a new window...) you can bypass infoview altogether. for example, if i have a report, webelementsdemoportal, i can use a favourite to access that report and not see any of the infoview wrapper using opendocument syntax similar to below...
    [http://machine:8080/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sType=rpt&sIDType=Name&sDocName=WebElementsDemoPortal | http://machine:8080/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sType=rpt&sIDType=Name&sDocName=WebElementsDemoPortal]
    watch in the next week or so for a package called "Crystal Reports Web Pack" which will have a portal example that uses the xtreme sample reports. there will also be an interactive quadrant report, and a yahoo maps integration report.
    i'm not familiar with any .net examples nor have i tried this. one main purpose of building the function suite was to allow the report developer to develop more aspects of their web application within crystal reports and without an additional development tool...to create things like simple reporting portals, jump pages, custom parameter pages, embedded controls, etc.
    let me know if it works out in your environment as i am curious.
    cheers, jamie

  • Web Elements

    Hi Webelements Masters,
    i am using the crystal with WEBELEMENTS...I have managed the webelemnts on to my report....but i actually struggling to connect. ex : i have a submit button or radio button or check box how can i link them?
    ex : i have submit button : when i click on it i want another report to display...but i dont get instead it says path is incorrect?
    stringvar path:= WETargetPath ("rpt", "Name", "jcalc", "weWindow=New");
    WESubmitButton ("update", path, "")
    am new to the web elements...
    pls looking for ur feed back.
    thank

    hello,
    on your report you should have a formula that contains a WEBuilder function. in this function, there is a "debug" mode that is either 1, 2, or 3.
    1) if you set it to 2, then when you press the submit button, an alert popup will appear that has the URL that is created by webelements. this uses opendocument syntax.
    2) you can write this URL down and then paste it into a new browser window and see if the path is correct there. most likely it will return the same error.
    3) you should then go into the Launchpad / InfoView portal and find the "jcalc" report to see if the name is correct. you may wish to change the path to use an ID instead of a name.
    i hope this helps,
    jamie

  • Back to Main Report-Web Elements

    Hi
    Based on the Web Elements prompts selection on the report we are displaying graph and table output which is an aggregarte information. On the same report, we are also using opendocument function called DetailReport to show detail information which shows the data in different report. On the other report we have kept BacktoMainReport using open document to show the Main report with graph and table output .
    Just wanted to know when we hitting on backtomain report with opendocument function, right now we are using query to go back to MainReport. Without doing that, is there any option to show the MainReport without generating query again .. i mean Report storing the information in cache,just showing that directly.
    Thanks
    Edited by: MUFIZA on Jan 25, 2010 8:31 PM

    hi Mufiza,
    if you are using cr2008 you can do this by saving a report to your enterprise system with the File > Save Data With Report option in conjunction with using the Saved Data Record Selection Formula. then every hit to that report will hit the data cache stored in the report as opposed to hitting the database.
    if you are using a lower version, the only thing you can do is cache your reports using the enterprise server settings. however, if you have parameter / prompts on the report in question, then this can become difficult. you can only hit a cached instance if that parameter / prompt combination has already been viewed within the caching time period, otherwise a database hit will be done.
    again, this is much easier to do with cr2008.
    also, you don't necessarily have to use opendocument linking either...to create a "back to main report" between 2 reports, here's a really easy way that uses Report Part linking:
    1) open up your 2 reports in the crystal reports designer (assuming that both are already stored in your enterprise system)
    2) on your "main report" Insert a Text Object on to the Report Header...leave it blank
    3) right click on the new Text Object and choose Copy
    4) on your 2nd report, Insert a Text Object on the Report Header and type in "Back to Main Report"
    5) right click on this new Text Object and choose Format Text > Hyperlink > Another Report Object and then Paste...this will paste the Report Part info from the Main Report into this 2nd report
    after saving the reports you can test the hyperlink in your enterprise viewer. for more info on Report Park linking see your online help in the Crystal Reports designer.
    cheers,
    jw

  • Forcing the opendoc call to open in the same page when using web elements

    Hi,
    I'm using the WE Submit web element to send an opendoc call to BOE, I'm calling the same report and re-running with new search criteria.
    Is there a way to force the report to open in the same viewer as opposed to opening a new window?
    Thanks in advance,
    Angela.

    hello Angela,
    i assume that you're using a WETargetPath function along with the submit. normally the submit function should then open the report in the same window.
    for example, if your report has an ID of 12134, then the following code should open the same report in the same window
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "");
    WESubmit ("S1", "Button", "GO", path, '')
    you can also use the last parameter in the WETargetPath to specify a location...using "Same" will force opening in the same window, while "New" will force a new window.
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "weWindow=Same");
    WESubmit ("S1", "Button", "GO", path, '')
    If you've downloaded the latest version of webelements from [here|http://www.sdn.sap.com/irj/boc/webelements] there's a "submit methods" report in the download that you can publish and have a look at the various options.
    cheers,
    jamie

  • Year in drop down appears  using web elements as decimal

    Year field in database as number. I used crystal web element and deployed report in Infoview. But LOV for Year appear as decimal eg: 2,011.00. How to convert to number format as eg: 2011

    Hi,
    I am using the below code in sub report:
    stringvar field4:=left(replace(cstr({AllData.SLS_YR}),",",""),4);
    And using the below code in main report
    WESelect ("Year", P1L4,P1L4,cstr(year(CurrentDate)),MultiSelectfont)
    I am getting drop down with out decimals but current year is not appearing on top instead 2010 appears in infoview.
    Any help appreciated.

  • Hiding an UI element dynamically in webdynpro ABAP

    Hi Gurus,
      I want to hide a Interactive form UI element dynamically at run time. Please let us know how to proceed with this and provide the code for this, which will be helpful.
    Thanks
    Rahul

    hi ,
    bind the VISIBLE property of the UI element with  a context attribute created in the CONTEXT tab. This context attribute should be of type WDUI_VISIBILITY
    u can refer this code
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
    regards,
    Amit

  • Add web element in Crystal report for SAP system

    Hi all,
    I have added web element in Crystal report for SAP system (BI or R/3) . But it does not show the control. It shows only scipt.It does not render the HTML.
    But if I add the webelement for Excel sheet ,It shows the control.
    How can I add web element for SAP System? Can't we use web controls in SAP system ?
    Help me in this regard.

    Hi All,
    i have the same issue on crystal report add-ins. Have you able to solve this without upgrading our sap business one to the latest version or patch level? Please see details below.
    OS: MS Windows 7 SP1
    SAP Business One 8.82 pl7
    Crystal report 2011
    Crystal report integration package installed under B1_SHare/Client
    But still the problem persist on the workstation.
    Please help me solve this problem.
    Thank you,
    ana

  • Pass values from report1 to report2 but without displaying the web element

    Need to pass a string value from report1 to report2.This can be done by using web elements. But in that case the web element is showing up when we run report1.So what is the way to avoid display of web element but still pass the value to report 2.
    Thanks

    if you have no need for webelements controls on a report and just need a simple hyperlink, use opendocument syntax in conjunction with an object's hyperlink properties in the formatting editor.
    see your online help for more info on opedocument.

Maybe you are looking for

  • Headphone jack problem agai

    Hi, i am wondering whether any of one of you have any problems with Creative MP players headphone jack I had 2 creative MP3 in the past and the headphone jack failed on me after few months. There are instances whereby I have to slightly tilt the head

  • Need to sort results in a report in descending order

    Hi, We have OIM 10g and we need to sort the report on date in descending order. I tried this code but still the column is not getting sorted. Evertime I generate the report, the results are sorted only in ascending order. Here the stored procedure co

  • Tcode j1ia101 for ARE1 internal document in background

    Hi gurus, Can any body tell me BAPI or any FM to run tcode j1ia101 in background. regards manas

  • Anyone know of a PDF Editor for Curve 8530?

    I have done some searching via my laptop, and while there are many PDF viewers, I have been unable to find a free or other version of a PDF editor (that would for instance allow me to insert UID and password in the editable field of a PDF doc) for th

  • Prime Infrastructure 2;x

    Hi, When will Nexus 7706 be supported in Prime Infrastructure? Is there today a workaround to manage configurations and to report performance on the Nexus 7706? As I understood, Prime DCNM does not handle the full configuration and performance manage