How can set editor title dynamically

HI
I am using oracle forms 6i, in that i am using same editor for different items, i need to change editor title according to changing item, Is it possible in oracle forms 6i.
Thanks in Advance
Aneesh

Hi jeyanthi,
attached you will find an example.
Hope it helps.
Mike
Attachments:
Unbenannt 2_LV80.vi ‏13 KB

Similar Messages

  • How can set window title programmatically

    how to set the window title programmatically
    for example the main vi i have a combo box  which stores some names
    exp: abc
            bcd
            cde
    then it will pass the data to another vi all the names use the same vi to display the data
    i want the window title to be the name of particular name user selected.
     can anyone help me?

    Hi jeyanthi,
    attached you will find an example.
    Hope it helps.
    Mike
    Attachments:
    Unbenannt 2_LV80.vi ‏13 KB

  • How can I do a dynamic include of a page fragment?

    I have a technical support website with a lot of simple html pages. What I want to do is hyperlink from the index page to another page, which would display these html pages as a page fragment, dynamically based on a session bean set by the hyperlink.
    I basically want to do this, if it was possible:
    <jsp:directive.include file="#{SessionBean1.pageToDisplay}"/>
    Now the FAQ's has a topic "How can I do a dynamic include of a page fragment?", which would seem to answer my question.
    But this is all it says, and it makes no sense to me. Could someone please translate? :)
    "Using a page fragment file (but using instead of the usual Creator approach) will accomplish a dynamic include."

    Here is 1 solution:
    First add this to the jsp:root tag:
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    Then surround the page fragment directive with something like this:
                            <div style="position: absolute; left: 24px; top: 408px">
                                <c:if test="${SessionBean1.count > 0}">
                                    <jsp:directive.include file="testPF.jspf"/>
                                </c:if>
                            </div>

  • In Standard Report Of ALV How Can Set PF Status.

    In Standard Report Of ALV How Can Set PF Status.
    Thanking in anticipation.

    in the call function module, you pass the PF status parameter.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = pgm
       <i> <u>  i_callback_pf_status_set = 'SET_PF_STATUS'</u></i>
          it_fieldcat              = fieldcat
          is_variant               = disvariant
          is_layout                = layout
          is_print                 = print
          i_save                   = 'A'
          it_events                = eventcat
          it_sort                  = sortcat
          i_callback_user_command  = 'USER_COMMAND'
        TABLES
          t_outtab                 = a_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    ENDFORM.                    "LIST_DISPLAY
    FORM SET_PF_STATUS *
    FORM set_pf_status USING extab TYPE slis_t_extab.
      SET PF-STATUS 'ZZSTD'.
    ENDFORM.                    "set_pf_status
    Here double Click on ZZSTD. IT will take you to a different screen and you have to set it.
    Ster.

  • How can i add a dynamic header value in to the pdf

    I am using a AssemblerService (Invoke DDX) to modify a Pdf file. How can i enter a dynamic value into the header using ddx ?
    DDX used
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd">
        <PDF result="Out1">       
            <PDF source="Doc2">
                <Header>
                    <Right>
                        <StyledText>
                            <p>"here i need to add a dynamic data from the process"</p>
                        </StyledText>
                    </Right>
                </Header>
            </PDF>
        </PDF>
    </DDX>
    Thank You.

    Insertion Point is a placeholder Object which is used to dynamically replace while assembling. Search through the assmber guide to get any hints.
    Nith

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • How can set screen resolution on firefox , i know zoom in and out but i want set my broswer to my favorie levelof zoom

    hi
    how can set my firefox screen resolution ( i know zom in and zom out but when i restart my firefox , it chanaged to perviose level of zoom )

    In case you are using "Clear history when Firefox closes":
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords and website specific setting like the page zoom.
    Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception.

  • Hi, how can I make titles in premiere elements with coloured schadows????????

    Hi, how can I make titles with coloured schadows in premiere elements????????

    narrowcaster47
    What version of Premiere Elements are you using and on what computer operating system is it running?
    Are you looking for text whose fill is a 4- color gradient instead of a solid color. Or something else, like text whose fill is a still or video?
    Answers are in the details. So, please, more details so I can fine tune a reply to your question.
    Thank you.
    ATR

  • How can I creat a dynamic chart legend?

    Will,I want to show multi hosts' dynamic CPU performance (the host ip can be changed).I use those code below for a test:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" backgroundColor="0xFFFFFF" initialize="init()">
         <mx:Script>
              <![CDATA[
                   import mx.charts.ChartItem;
                   import mx.charts.chartClasses.IAxis;
                   import mx.charts.chartClasses.LegendData;
                   import mx.charts.chartClasses.Series;
                   import mx.charts.events.ChartItemEvent;
                   import mx.charts.series.LineSeries;
                   import mx.collections.ArrayCollection;
                   import mx.containers.Canvas;
                   import mx.containers.HBox;
                   import mx.controls.Alert;
                   import mx.graphics.SolidColor;
                   [Bindable]
                   private var dayTimeV:int = 0;
                   [Bindable]
                   private var legendDP:ArrayCollection = new ArrayCollection();
                   //for record whether the ip changed by using the length
                   private var latestIp2Length:Object = new Object();
                   [Bindable]
                   public var statsPpg:ArrayCollection = new ArrayCollection([
                        new ArrayCollection([{dayTime:dayTimeV,CPU:24.0, IP:"100.0.2.0"}]),
                        new ArrayCollection([{dayTime:dayTimeV,CPU:27.6, IP:"100.0.2.1"}]),
                        new ArrayCollection([{dayTime:dayTimeV,CPU:35.4, IP:"100.0.2.2"}]),
                        new ArrayCollection([{dayTime:dayTimeV,CPU:31.6, IP:"100.0.2.4"}]),
                        new ArrayCollection([{dayTime:dayTimeV,CPU:28.3, IP:"100.0.1.6"}]),
                        new ArrayCollection([{dayTime:dayTimeV,CPU:27.2, IP:"100.0.1.9"}])
                   private function init():void{
                        latestIp2Length["100.0.2.0"] = 1;
                        latestIp2Length['100.0.2.1'] = 1;
                        latestIp2Length['100.0.2.2'] = 1;
                        latestIp2Length['100.0.2.4'] = 1;
                        latestIp2Length['100.0.1.6'] = 1;
                        latestIp2Length['100.0.1.9'] = 1;
                        initLegend();
                        createLineSeries();
                   private function createLineSeries():void{
                        for(var i:int = 0 ;i < statsPpg.length ;i++){
                        var lineSeries:LineSeries = new LineSeries();    
                        lineSeries.yField = "CPU";    
                        lineSeries.displayName = "CPU";
                        lineSeries.dataProvider = statsPpg[i];
                        lineSeries.id = "lineSeries"+i;
                        lineSeries.setStyle("adjustedRadius",2);
                        lineSeries.setStyle("radius",40);
                        lineSeries.setStyle("fill","#55CC33");
                        var series:Array = chartPPG.series;
                        series.push(lineSeries);
                        chartPPG.series = series;
                   //find the record using ip
                   private function indexOf(ip:String):int{
                        for(var i:int = 0 ; i < statsPpg.length ;i++){
                        if(statsPpg[i].getItemAt(0).IP == ip)
                             return i;
                        return -1;
                   private function modifyData():void{
                        dayTimeV++;
                        //all new added data
                        var forAdded:ArrayCollection = new ArrayCollection([
                             {dayTime:dayTimeV,CPU:24.0+Math.random()*10, IP:"100.0.2."+dayTimeV},
                             {dayTime:dayTimeV,CPU:27.6+Math.random()*10, IP:"100.0.2."+(dayTimeV+1)},
                             {dayTime:dayTimeV,CPU:35.4+Math.random()*10, IP:"100.0.2."+(dayTimeV+2)},
                             {dayTime:dayTimeV,CPU:31.6+Math.random()*10, IP:"100.0.2."+(dayTimeV+3)},
                             {dayTime:dayTimeV,CPU:28.3+Math.random()*10, IP:"100.0.1."+(dayTimeV+4)},
                             {dayTime:dayTimeV,CPU:27.2+Math.random()*10, IP:"100.0.1."+(dayTimeV+5)}
                        //the data(IP) appear at first time
                        var waitedForAdded:ArrayCollection = new ArrayCollection();
                        for(var i:int = 0 ; i < forAdded.length ;i++){
                             var index:int = indexOf(forAdded[i].IP);
                             if(index != -1){//if we found,append it
                                  statsPpg[index].addItem(forAdded[i]);
                             }else{//if not,
                                  waitedForAdded.addItem(forAdded[i]);
                   var j:int = 0;
                    for(i = 0 ; i < statsPpg.length ;i++){
                         // if length not changed,delete old data and add new
                         if(latestIp2Length[statsPpg[i][0].IP] == statsPpg[i].length){
                              delete latestIp2Length[statsPpg[i][0].IP];
                              var legendIndex:int = findLegendDPData(statsPpg[i][0].IP);
                              statsPpg[i].setItemAt(waitedForAdded[j],0);
                              latestIp2Length[waitedForAdded[j].IP] = statsPpg[i].length;
                              legendDP.setItemAt(newLegendData(waitedForAdded[j].IP),legendIndex);
                              j++;     
                         }else{//if length changed,the data appended already
                              latestIp2Length[statsPpg[i][0].IP] = statsPpg[i].length;
                   private function addData():void{
                        dayTimeV++;
                        newData();
                   private function newLegendData(ip:String):LegendData{
                        var legendData:LegendData = new LegendData();
                        legendData.label= ip;
                        legendData.marker= new HBox();
                        legendData.aspectRatio=1;
                        return legendData;
                   private function findLegendDPData(ip:String):int{
                        for(var i:int = 0;i < legendDP.length;i++){
                             if(legendDP[i].label == ip)
                                  return i;
                        return -1;
                   /* [Bindable]
                   public function get legend():ArrayCollection
                        var legend:ArrayCollection = new ArrayCollection();
                        for (var i:int = 0; i < statsPpg.length; i++)
                             var dataObject:Object = statsPpg[i][0];
                             legend.addItem(newLegendData(dataObject.IP.toString()));
                        return legend;
                   [Bindable]
                   public function set legend(legendData:ArrayCollection):void
                             legend = legendData;
                   private function initLegend():void
                        for (var i:int = 0; i < statsPpg.length; i++)
                             var dataObject:Object = statsPpg[i][0];
                             legendDP.addItem(newLegendData(dataObject.IP.toString()));
                   private function yAxisLabel(value:Object, previousValue:Object, axis:IAxis):String
                        return value + ' %';
              ]]>
         </mx:Script>
         <mx:Panel width="790" title="CPU.IP" layout="horizontal">
              <mx:LineChart  id="chartPPG" name="Comparison" showDataTips="true">
                   <mx:horizontalAxis>
                        <mx:CategoryAxis dataProvider="{statsPpg[0]}" categoryField="dayTime" title="Days" id="categories"/>
                   </mx:horizontalAxis>
                   <mx:verticalAxis>
                        <mx:LinearAxis labelFunction="{yAxisLabel}"  title="CPU" id="yAxis"/>
                   </mx:verticalAxis>
                   <!--<mx:series>
                        <mx:LineSeries id="CPU" yField="CPU" xField="dayTime" displayName="CPU  "/>
                        <mx:LineSeries id="IP" yField="IP" xField="IP" displayName="IP  " />
                   </mx:series>-->
              </mx:LineChart>
              <!--<mx:Legend dataProvider="{chartPPG}" markerWidth="50" markerHeight="4" legendItemClass="MyLegendItem" direction="vertical"  width="174"/>-->
              <!--<mx:Legend id="myActionScriptLegend" creationComplete="createDynamicLegend(event)" />-->
              <mx:Legend id="userLegend" dataProvider="{legendDP}"/>
              <mx:Button label="AddNewData" click="modifyData()"/>
         </mx:Panel>
    </mx:Application>
    the result is here:
    Question:
    1.I using the binding ArrayCollection  legendDP as the Legend's dataprovider, the Legend's showing not changed  when the legendDP changed
    2.How can I fill the Legend's color,the result has no color showed.

    Can anyone help?

  • Prerender() in backing file... setting desktop titles dynamically

    I have a link in page1 (with pageflow1 and portlet1), clicking on which the user is taken to page2 (with pageflow2 and portlet2) and the begin action method gets called in pageflow2. The begin action forwards to another another action (say, action2). action2 sets some request attributes, then finally forwards to the JSP that needs to be rendered. I have a backing file for portlet2 that has the prerender method implemented. The prerender() checks the request attribute set in action2() and accordingly sets the desktop title.
    Now my problem is, the prerender is getting called BEFORE begin action is invoked. Shouldn't the prerender get invoked just beofre the JSP is rendered? If not, then how can I set the desktop title dynamically based on some data in an action?
    Thanks in advance!

    There are two backing files you can give for a portlet.
    1. Backing file for a portlet
    2. Backing file for a JSP
    Try giving the backing file reference in JSP instead of portlet.
    -sampath

  • Multilanguage - set chart title dynamically

    Hello members!
    I am developing a product which should support multilanguage support. This includes the crystal reports.
    After reading different threads on this topic, I got the idea to set the text dynamically. To achieve this solution, I need to read all texts that could be set via the code. For the TextObject and FieldHeadingObject, I got the following code to add the current text to a ResXResourceWriter:
    ReportDocument report = new ReportDocument();
    ResXResourceWriter resXWriter = New ResXResourceWriter(pathToResourceFile);
    foreach( ReportObject reportObject in report.ReportDefinition.ReportObjects)
       if(reportObject.Kind == ReportObjectKind.TextObject ||
          reportObject.Kind == ReportObjectKind.FieldHeadingObject)
           resXWriter.AddResource(reportObject.Name, ((TextObject)reportObject).Text);
    How can I read the text from the chart titles and legends? Has someone any idea?
    Thank you
    Alex

    Hello Ludek!
    With the help of the following thread
    .net TextObject with embedded Fields Question I got an idea how to achieve the first goal.
    I modified the code to read the different titles from the chart object and store the values in the resx file. The supplied resource value (GroupTitle, DataTitle, Subtitle, SeriesTitle and the Title) should be checked for null.
    public void GetTitlesFromChartObject(string reportFilePath, string resourceFilePath)
        ResXResourceWriter resXWriter = new ResXResourceWriter(resourceFilePath);
        CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
        CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rasClientDocument;
        CrystalDecisions.ReportAppServer.Controllers.ReportObjectController rasObjectControler;
        CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject rasChartObject;
        //load the report
        myReportDocument.Load(reportFilePath);
        rasClientDocument = myReportDocument.ReportClientDocument;
        rasObjectControler = rasClientDocument.ReportDefController.ReportObjectController;
        foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject rasReportObject
        in rasObjectControler.GetReportObjectsByKind(CrReportObjectKindEnum.crReportObjectKindChart))
            rasChartObject = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)rasReportObject;
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".Title", rasChartObject.ChartStyle.TextOptions.Title.ToString());
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".GroupTitle", rasChartObject.ChartStyle.TextOptions.GroupTitle.ToString());
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".DataTitle", rasChartObject.ChartStyle.TextOptions.DataTitle.ToString());
       resXWriter.Close();
    Thank you for your help
    Alex

  • How to set the title of pages created in Webcenter Spaces?

    Hi
    I need to set the title of the pages created in webcenter spaces. How can i do that? By default when i create the page in webcenter spaces the page name with which i created the page is coming up on the browser tab. But i want the browser title to be different from the page name. Is there a way to do this? I tried with using javascript and setting "document.title" but it works only partially. That is when the page is loading it shows the text that i have set using javascript but it doesnot remain persistent. As soon as the page loads it again resets back to the name of the page :(
    I also tried adding html markup on to the page in edit mode and tried giving in the <title> tag but it is not getting applied, as soon as i click on apply it just refreshes the page and my changes are gone.
    Please i need some help around this asap as it is critical.
    Thanks

    Thanks for the reply Jaap.
    It was really helpful. But i need further help on this.
    I need to change the browser title based on the tab selected. And here the tabs on spaces page is actually coming from a custom task flow. Any idea how can i achieve this? And there is no page refresh involved.
    Some help on this please.
    Thanks

  • How can I create a dynamic Dropdownlist

    Hi Experts,
    I am new in the adobe forms and I have this problem.
    I am working on a Dropdownlist in Adobe Interactive Form. In my case, my form will be used in Offline-ABAP system without any web dynpro application.
    I have an internal table containing some values like this (number of rows depend on what is store on the database dynamic)
    A0  Dropdownlist1
    A1    Dropdownlist2
    A2    Dropdownlist2
    B0 Dropdownlist1
    B1    Dropdownlist2
    B2    Dropdownlist2
    B3    Dropdownlist2
    B4    Dropdownlist2
    C0  Dropdownlist1
    C5    Dropdownlist2
    C6    Dropdownlist2
    C7    Dropdownlist2
    I would like to create 2 dropdownlist. to be as follows:
    The first dropdownlist must have for example the values A0, B0, C0 .
    When the user select for example B0 from the Dropdownlist1, then dropdownlist2 must have only the value B1, B2, B3 and B4.
    How can i do that as I have seen the example in the purchase order (country and state).
    My requirement is that, the value must be dynamic, that means i must select the value from the SAP-Database into internal table and bind it to my dropdownlist.
    Thanks and Regards.
    mishak

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • How can i create a dynamic structure based on my input from a select-option

    Hello,
    This is to develop a custom report in FI for G/L Balance based on company code.
    I have an input select-option for Company code.
    Based on the range of company code my output layout should be modified.
    I am not very much sure to create a dynamic internal based on the input from a select-option.
    Can any one please let me know how can i do this.
    I would appreciate for anyone who turns up quickly.
    Thank you,
    With regs,
    Anitha Joss.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • How to set log filename dynamically

    Hi all!
    Could anybody give me a hint how I can set file name for log4j dynamically.
    I have a log4j.properties file:
    log4j.rootCategory=debug, stdout, R
    #### First appender writes to console
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-6p [%c{1}] %m%n
    #### Second appender writes to a file
    log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.R.DatePattern='.'yyyy-MM-dd
    log4j.appender.R.File=Myfilename.log
    log4j.appender.R.MaxFileSize=10000KB
    log4j.appender.R.MaxBackupIndex=1
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} %-6p [%c{1}] %m%nand following code in my class:
    Logger LOGGER = Logger.getLogger(MyClass.class);
    File logFile = new File("newFilename.log");
                logFile.createNewFile();
                FileAppender r = (FileAppender)LOGGER.getAppender("R");
                r.setFile(logFile.getAbsolutePath());
                r.activateOptions();Unfortunately it does not work as r is NULL.
    It throws java.lang.NullPointerException.
    Could anybody help me?

    I wouldn't try to mess with the file name. I'd use logging the way it is intended - with the correct log file name configured.
    Even if you successfully do that, what do you suppose will happen when the log "rolls over"? Do you expect it to honor the fact that you've changed the base file name? I would expect it is going to fail when it closes the log, renames it using the rolling pattern, and creates a new log.

Maybe you are looking for