Dynamic Images at run-time

I have a report that I would like to display a different
image/logo depending on the user who is generating the report. Is
there a method to display a different image at run-time? Or, does
anyone have a better way rather than cloning 10 versions of the
report will a different image on each?
Thanks for any help in advance,
Kevin

Here is a sample that shows changing an image at runtime. If you are using a different version of Crystal Reports than XI R2, let me know.
https://boc.sdn.sap.com/node/6174
Cheers,
Jonathan

Similar Messages

  • Create LinkToAction with Image by run time

    Hi,
    I want to create linkToAction UI's with different images by run time. But if I try the code below I get always the same image for every linkToAction UI. What is my mistake? And how can I solve this problem?
         for (int i = 0; i < wdContext.nodeGlob_Struc().size(); i++){
              IWDLinkToAction linkToAction = (IWDLinkToAction)
                   view.createElement(IWDLinkToAction.class, "linkToAction"+i);
              IPrivateDocPreAppView.ILinkToActionElement nodeLink =
                      wdContext.createLinkToActionElement();                    
              wdContext.nodeLinkToAction().bind(nodeLink);     
              wdContext.currentLinkToActionElement().setImageSource(
                      wdContext.nodeGlob_Struc().getGlob_StrucElementAt(i).
                           getUrl_Thumbnail() );
              linkToAction.bindImageSource( wdContext.nodeGlob_Struc().
                       getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );     
                theGroupBox.addChild(linkToAction);
    regards,
    Sharam

    Hallo Sharam,
    The Web Dynro binding model does not support "index binding". This means binding multiple image UI elments to the same attribute in a multiple context node (cardinaltiy 1..n) means, that all images are bound to the node's lead selection. That's what you implement with
    linkToAction.bindImageSource( wdContext.nodeGlob_Struc(). getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );
    Armin's solution is based on the fact, that he breaks the data binding principle by directly setting the imageSource property values.
    Sharam, when reviewing your code I find several "problems":
    1. Never ever store UI elements in the context. I assume you do this in order to access UI elements outside wdDoModifyView() as it is static. There is no need to do this.
    2. Then you break databinding by setting the imageSource property in the linkToAction object (stored in the context) directly, breaking databinding.
    3.)  Finally you "un-do" this hard property setting by binding it to the context again. This has the effect you described.
    Breaking the data binding principle for UI elements has an important drawback. It also breaks the generic Web Dynpro caching mechanisms. Read my article on
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/301d715e-0b01-0010-1a8b-f1f83d175972">Best Practices for Building Client-Independent Web Dynpro UIs</a>, section Coding Rules, rule <i>Implement Fine-Grain UI Manipulations on Context but Not on UI Element Level</i>:
    To maximize the rendering performance of your Web Dynpro application, implement all fine-grain UI manipulations on context instead of UI element level. This means do not call the setter-methods of UI element objects inside wdDoModifyView()directly but bind the related properties to the context and call the corresponding setter methods outside wdDoModifyView():
    <b>Not:</b> wdDoModifyView(){ … theField.setEnabled(true) … }
    <b>But:</b> wdDoInit(){ … wdContext.currentFieldNode.setEnabled(true) … }.
    Otherwise Web Dynpro’s caching mechanisms cannot speed up the rendering of view layouts.
    The view controller’s wdDoModifyView() method is designed for a special purpose: the creation of a UI tree or UI sub-tree at runtime in case it is not possible to declare the UI at design time. The method is neither intended for fine-grain UI manipulations nor for context manipulations. Fine-grain UI manipulations are achieved via means of data binding. Context manipulations are done in wdDoInit(), action event handlers or event handlers.
    Unfortunately, the name wdDoModifyView() is somewhat misleading since the purpose of it is to create (and not to modify) a UI tree dynamically. While the usage of wdDoModifyView() in order to create a UI tree initially (firstTime == true) is not performance critical, modifying an existing UI tree (firstTime == false) is: Changing only one single attribute of a single UI element within wdDoModifyView() flags the complete view containing the control as dirty and the complete view must be completely re-rendered again – depending on the size and complexity of the view this can result in significant performance hits.
    But in your case databinding cannot be applied, as index binding is not supported. The only databinding solution must use multiple/n nodes of cardinatliy 1..1 instead of 1 node of cardinality 1..n with no node elements. And this would require further coding for dynamic context node creation, copy logic based on value semantic.
    Best Regards, Bertram

  • How to create transparent image at run-time?

    How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...

    i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
    greetz
    chris

  • Dynamic table in Run time

    Hi,
    I need to create a dynamic table in run time
    Input from user will be like
    Param1---->'tablename'
    Param2---->'col1name datatype,col2name datatype,col3name datatype,col4name datatype,col5name datatype,col6name datatype........................'
    Param3---->returnCode OUT NUMBER
    Param4---->errorMessage OUT VARCHAR2
    how to write a script to execute the above statement.
    The input will be from java page, it has connection string of the database
    Thanks!

    After remove *:*
    Error report:
    ORA-06550: line 4, column 6:
    PLS-00103: Encountered the symbol "CREATE_TABLE" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "CREATE_TABLE" to continue.
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can you set an image at run time?  Does it really work?

    I have read that others have been able to set an image at run time, but I cannot seem to get it to work (the image I set does not load).
    What I do is have a page, call it page2, that has two image components on it. In the constructor for page2 I do this:
    // Additional user provided initialization code
    image1.setValue("bike1.JPG");
    image2.setValue("bike2.JPG");
    The jpg files are in the build directory:
    C:\Documents and Settings\Darrin\My Documents\Creator\Projects\ImageTest\build\images
    The odd thing is that for the first image component(image1), I set a default jpg file (nogo.JPG that is in the same directory as the other two), and that does load.
    In fact, when I I check the value of image1 in afterRenderResponse by calling image1.getValue() it still has the default image (nogo.JPG) instead of the one I set it to (bike1.JPG) in the constructor by calling image1.setValue("bike1.JPG");
    So, either the image1.setValue() has no effect, or something is overwriting it.
    What is the trick to getting an image to load at run time like this?
    THANKS!

    Well after several more hours of banging myh ead against the wall, I still cannot get this to work.<br><br>
    I read in the constructor comments that whatever is in the jsp file will override the backing bean's constructor, so that might be part of the problem, but others I thought got this to work using a similar method.<br><br>
    Here is what I tried last which still does not work, but mimics what others have said did work for them:<br><br>
    //See if the default jpg file can even be copied over
    <br> image3.setHeight(image1.getHeight());
    <br> image3.setUrl(image1.getUrl());
    <br> image3.setValue(image1.getValue());
    <br>
    <br> Integer aiw = new Integer("1");
    <br> float aar = 0;
    <br> float ar = 0;
    <br>
    <br> ImageIcon ii = new ImageIcon("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images/bike1.JPG");
    <br> ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    <br> aiw = new Integer(ii.getIconHeight());
    <br> aar = ar*aiw.intValue();
    <br> image1.setHeight(""+(int)aar);
    <br> image1.setUrl("images/bike1.JPG");
    <br> image2.setValue("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images\\bike2.JPG");
    <br> image2.setUrl("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images\\bike2.JPG");
    <br><br>Note that when I run this and look at the log that I write out to in afterRenderRepsponse, it shows that image1 (which shows up as the default image I set at design time) and image3 (which does not show up which I set at run time using image1's value) both show the nogo.JPG image from the <b>resource</b> directory while image2 (that I set at run time to be bike2.JPG) is showing up as <b>empty</b>
    <br><br>
    This is really getting frustrating, and I would greatly appreciate a small tutorial from the JSC staff on just how you need to go about doing this. given that this is so common a need, a tutorial is warranted. Heck, just clue me in on how it is done and I will write one!
    <br><br>
    THANKS!

  • Check marks or dynamic items for run-time shortcut menus

    Labview version: 8.0
    I'd like to create a run-time shortcut menu for my Xcontrol, that would
    allow user to toggle between two states of the control. Is it possible
    to either
    1) dynamically apply check marks to run-time shortcut menus or
    2) dynamically modify the run-time shortcut menu content
    Tomi
    Tomi Maila

    Hi Tomi,
    Great question.  Yes, you can do what you want with run-time shortcut menus in LabVIEW 8.0.  If you want to dynamically modify the menu content, you have to do it in the "Shortcut Menu Activation?" event in the facade VI of the XControl.  In the event data for this event is a parameter called "MenuRef" which works with the same menu primitives that have been around since LabVIEW 5 for editing the menu bar at run-time. 
    With these primitives, you can add/delete/modify menu items to the shortcut menu.  The items that are already in the MenuRef when this event case executes are always the ones that are statically defined, either by LabVIEW or by customizing them.  You do not have control over the state of the items that LabVIEW adds, but you can remove them and add ones with the same text (just with a different tag).  In your case, you would probably want to use the Insert Menu Item primitive to add an item such as "Toggle State".  Give it a tag such as "USER_TOGGLE_STATE".  Then you'll want to use the Set Menu Item Info primitive to set the checkmark for that item based on the state of the XControl.
    Then, you'll need to add an event case for the "Shortcut Menu Selection (User)" event so you can handle the item being selected.  Wire the Item Tag parameter from the event data to a case structure and add a case to look for "USER_TOGGLE_STATE".  And in that case, toggle the state of your XControl.  That's all you need to do!
    The Dual Mode Thermomter shipping example in <LabVIEW 8.0>\examples\general\xcontrols\Dual Mode Thermometer\Simple Dual Mode Thermometer XControl.lvproj is a simple example of how you can modify the menu and respond to the items selected.  It's a little different than what you want to do, but it might help you to look at it.
    Good luck!  Let me know if you have questions.
    Robbie

  • [CS4 Mac] Change PictureWidget image at running time.

    Hello,
    I have a PictureWidget on a panel - by default it displays a PNG file loaded from resources.
    It can also display error icons when a query fails - etc: these icons are loaded from plugin's 'PICT' resources.
    So far so good.
    Now - when a query doesn't fail it would need to display an image stored as a 'PICT' file on a server: the query result is telling me which 'PICT' file is to be displayed in the PictureWidget.
    For QXP I was using DrawPicture() to draw the PicHandle directly in the item rectangle.
    Switching it to InDesign - I am looking for a recipe to achieve same result but following InDesign SDK means and spirit.
    In other words - how do we change a PictureWidget image at running time in order to display a PICT files from server instead of built-in default PNG or 'PICT' resources.
    Any pointer or direction to achieve this would be very much appreciated indeed.
    Best regards
    Patrick Perroud

    Hi,
    I have to add a image on a dialog, I am able to add a image on Windows by associating a image resource ID with image path in .rc file. But not able to do the same on mac. How can we associate image resource ID with image path on MAC?
    Thanks in advance.

  • How to select a sub image in run time

    Hi ,
    how can i select sub image from an image on panel in run time ?
    OR
    how to draw a rectangle(with dashed lines) on the panel and from its dimension i'll get the sub image ?
    THANKS

    BufferedImage.getSubImage(....);

  • Checking dynamic query at run time

    i need to check whether the query is valid or not at run time. The query will be formed based on the column name, table name, and where clause. this query is purely a select statement. if column name and table names are diff then system should display an error msg. i have more than 10 tables and the table name will be selected from LOV. i should be allowed to enter the condition for where clause also ar run time and this condition column should also be validated.

    Hi,
    I think you only want to see if your select statement has compilation error or not because when you use dynamic statement it doesnt show the compilation erro if the statement has it or not. What you can do is add an item say "stmt" in your control block. change the property to multi record so that you can see multiple lines in that item and make the lenght say 2000. Now assign your statement into "stmt" for example
    :control_block.stmt := 'select ' || col1
                        || ','
                        || col2
                        || ','
                        || col3
                        || ' FROM '
                        || table
                        || ' where ' || conditionput this statement on any button on when-button-pressed trigger. When you will press the button on run time you will see the statement. Run that statement on sql*plus or toad and check if there is any problem in the statement.
    Hope this helps
    Ghulam

  • Error 1003 when loading a VI dynamically on LabView Run-time ini file configuration

    hi all,
    I have a problem with my runtime excutable.
    On 4 systems, all running XP it runs fine.
    On 2 systems ( one a new install of just LVRT 2011 SP1 ) I have:
    Error 1003 when loading a VI dynamically on LabView Real-time
    Or more spoecifically the error code is 1003 and the error source is Open VI Reference.
    When the RT app runs correctly I get these paths:
    Path Sent to Open Vi Reference:              Yeast_Grower.exe\Tecan_talk_Control.vi, 
    Path Returned from Open Vi Refence:       C:\Program Files\Yeast_Grower\Yeast_Grower.exe\Tecan_talk_Control.vi, 
    On a system that does gets the 1003 Open Vi Refence error I have the same Path Sent but of course no path returned as it does not open.
    To be sure that the vi Dyanmically called vi is compiled and valid at runtime I also include a copy of in the main.vi.
    To be extra sure I have also installed the runtime versions of VISA and DAQmx.
    I have compiled it with and without the "Use LV 8 calling hiaracy"
    My conclusion as this stage is that either the installation of LVRT 2011SP1 misses something the earlier LVRT installtions make.
    or is there a MyApp.ini or LVRT .ini  that controls how the RT dyanim calls are handled.
    Help very welcome how to solve this puzzle.
    thanks
    michael

    I understand that all the PCs (6 of them) have LV 2011 SP1, runtime or the development system installed. Right?
    How many of these PCs have the source code available on them?
    -> Only one of them has the source code.
    I am not sure I understood 'I also include a copy of in the main.vi'. Does it mean you placed the subvi in the main.vi?
    -> I meant I have included in main.vi the actual vi that is called dynamically - but only where it is not called.
    Did you try including the sub vi which is called dynamically, as 'Always included' in the EXE build?
    -> No, I did not know of this option - but the above I did this by default.
    Edit: Did you verify the software versions of LV RT, VISA etc on all the PCs? Are they same?
    -> I did verify even added DAQmx just in case
    There is lots of material available on this forum for error 1003 and dynamic vi calling. Did you find anything useful to try among the forums threads?
    -> I did view many of them.
    I did finally find the answer.  
    I have a subvi (callNet.vi ) in the dynamically called vi (dynamic ) that calls .Net libraries.
    Now the thing is that this subvi callNet.vi is coded out by enclosing it in a Disable structure.
    In fact this subvi ( callNet.vi) does not even compile - ie it has a broken arrow
    however if enclosed in a Disabled structure and disabled, the enclosing vi compiles OK.
    However I have discovered that even with the .Net calling subvi (callNet.vi) in the Disabled state of the Disabled structure
    the enclosing vi (dynamic.vi ) does NOT run - although it compiles just fine.
    Once I installed the .Net libraries (I actually did include them with my app installer ) with the vender's supplied installer
    then my app now successfully calls the dynamic vi.
    So the Summary and warning is:  Even if the dynamic called vi is included in Main.vi and Main.exe runs ( but does not call the dynamic vi - except when called dynamically at later some point ) and even if, in this case, the .Net calling subvi is disabled out ie no .Net calls are made the dynamically called vi will not run when called dynamically.
    I hope that is not too confusing.  In summary it seems the Disable structure does not entirely disable.
    Michael

  • Can we create items dynamically or at run time?

    Hello expert,
    can we create some item dynamically at some button click?
    Thanks
    yash

    yash_08031983 wrote:
    Hello expert,
    can we create some item dynamically at some button click?Hello, yash
    You can not create items at run time. But you can manage them at run time by setting Visible property programatically.
    Hope this helps..
    Hamid

  • Change column header dynamically at report run time

    how to use LOV In report column definition under column attributes for display..
    If it suceeded will it dynamicaly change header name at time of running report
    my requirement is actually to change column header dynamically at time of run report
    is it possible with above mentioned way?
    Apex 4.1, Oracle 11g, PL/SQL Gateway configuration
    Please help me on this
    Thanks

    Hi,
    by making use of specific report column templates and column template conditions you can change the headers dynamically.
    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/ui_templt.htm#HTMDB25708 for more info.
    regards,
    Erik-jan

  • Dynamic Query at Run time

    Hi,
    Happy New Year!!
    I am having some problem
    Split table details
    startid, endid
    1,1
    2,2
    3,4
    expected output is 1,2,34
    Begin
    P_blob v_local varchar2(1800) ='1234';
    select listagg(COLUMN_NAME, ',') within group (order by column_id) INTO Column_name
    from user_tab_columns where table_name= upper('mytable' );
    select listagg(column_id, ',') within group (order by column_id) INTO Column_id
    from user_tab_columns where table_name= upper('mytable' );
    insert into myewtable ('|| Column_name || ')
    with t1 as( select '''|| P_blob || ''' str from dual),
    t2 as( Select startid, endid from Split),
    t3 as
    ( select str,startid s,endid e, row_number() over(order by startid) rn from t1,t2)
    select * from t3 pivot
    max(substr(str,s,e)) str for rn in ('|| Column_id || ')
    end;
    how so i represent the Column_name as column values here.
    Query should be
    insert into myewtable ('col1,col2,col3 ')
    with t1 as( select '''|| P_blob || ''' str from dual),
    t2 as( Select startid, endid from Split),
    t3 as
    ( select str,startid s,endid e, row_number() over(order by startid) rn from t1,t2)
    select * from t3 pivot
    max(substr(str,s,e)) str for rn in ('1,2,3')
    end;
    i am getting as Column_name ,Column_id.
    how to represent the column values inside the query.
    Thanks

    Can you please check if this suffices your requirement. (I extended few testcases)
    WITH t AS
            (SELECT 1 startid, 1 endid FROM DUAL
             UNION ALL
             SELECT 2, 2 FROM DUAL
             UNION ALL
             SELECT 3, 4 FROM DUAL
             union all
             select 9,9 from dual
             union all
             select 1,5 from dual)
    SELECT listagg (DECODE (startid, endid, endid, startid || endid), ',')
              WITHIN GROUP (ORDER BY 1) finstr
      FROM t;output
    FINSTR
    1,15,2,34,9Cheers,
    Manik.

  • Not able to display a dynamic image

    I'm not able to display a dynamic image on Adobe print form.
    Here is what I did.
    Please let me know what I need to do to get this working...
    1. Created a Graphics node in the Context of the Adobe form.
    2. In the URL tab of the graphics node defined the following two lines:
         <URL pointing to the MIME repository folder>
         IM_FILENAME_1
         Where IM_FILENAME_1 is being passed to the Adobeform function module.
    3. In the Layout mode, dragged and dropped the Graphics node from the
        contenxt tab to the form layout. On doing so it appears as a image field in the form layout.
    4. Activated the form.
    BUT, when I run the form , the image is not showing up.
    The idea is to pass the image file name to the form so that it will show up a dynamic image at run time.
    PLEASE HELP.

    Hi Atul,
    Try this, that should work.
    In the interface , define a parameter type string where you will store the URL of the image .
    In the initialization part of the interface , check if the URL is defined, in case it's empty define a default URL . You should put the compelte URL of the image like "http://www.company.org:8080/logo.logo.jpg" .
    Then link this parameter to the Grpahic Node in the URL parameters .
    Let me know if that works

  • Help with inserting dynamic images in BI Publisher

    Hi everyone,
    I know that this question has been asked a million times but most of the answers and examples that I found online seem so old and dated and none of them work.
    I placed an image in my Word document. I right-clicked on it and clicked on 'Format Picture' from the context-menu. I got a dialog like this one: http://etc.usf.edu/techease/wp-content/uploads/2011/05/Screen-shot-2011-05-02-at-4.16.58-PM.png
    I then chose the 'Alt. Text' menu and typed the following text into the textbox labelled 'Description': url:{'http://www.google.com.tr/images/firefox/mobiledownload.png'}. Now when I run the report, the image doesn't change. I still get the same dummy image at run time. I'm using Word 2010. This is method stated in almost all articles but for some weird reason it doesn't work.
    Any help? Thanks everyone.
    Edited by: mridang on Jun 8, 2011 6:27 AM

    Hi,
    As far as I know Word 2010 will not work as it adds the text "Description:" before the url. Open the documentin Word 2007 and edit the Alt text and save it.
    Regards,
    Imtiyaz

Maybe you are looking for

  • How to open and read pdf and micrsoft word (.doc) files or documents

    My problem is how to use my BB 9800 software version 6.0.0.546 to read/view pdf files and microsoft office documents. I have also bought documents to go from online and have installed it on my phone, but whenever i try to open it I receive a message

  • Values not available in Table

    Hi I have created one node  with attributes following properties and mapped to one view. Cardinality = 0..n Selection =  0..n Fields : f1 - Dropdown f2 f3 - Date f4 In the view, i created table and assigned to those fields. I wrote below code for ins

  • Multiple selection in a Combo Box of a JOptionPane.

    Hello, Can we have multiple selection of the items in a Combo Box of a JOptionPane? An example will be highly appreciated. Thanks.

  • All files larger than the screen aligns to the right by default

    Hello, I looked around from the existing solution pool but could not find one so here I go; PROBLEM; All files or programs(Numbers, Pages, Finder, Web brousers, Itunes etc)that do not horizontally fit the sceen(ie requires horizontal scroll bar) in m

  • Can't get Class-path to work

    I'm trying to package an ear file with a common jar file and a war file. The base of the ear file looks like this: /mycaller.jar /mycaller.war /meta-inf/manifest/mf /meta-inf/application.xml the manifest for the ear file looks like: Manifest-Version: