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

Similar Messages

  • 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

  • Issue setting chart title styles.

    Hello all,
    For some reason I am having an issue with setting underline and color fill for the title.
    -fx-font-size: 12px;
    -fx-underline: true;
    -fx-fill: red;
    the font size works, but the other 2 do not.  When in scene builder and this is put under "Style" I have to click .chart > .chart-title > -.text and it will switch the font size, but wont do anything else.
    Am I doing something wrong?
    Thanks,
    ~KZ

    I made a styleSheet and it worked, not too sure why it isn't working with setStyle, but hopefully someone can explain .

  • Changing a chart title dynamically

    Hi all. I'm on apex 3.1.0. I have a list_item with some values and a chart that depends on the value of this list item. I have no set at the moment title of this chart. What I want is to set title depending on value of my list item. So if value of list item is AAA I want that title of chart is AAA, if BBB then title should be BBB and so on.
    How can I achieve that??
    Thanks for collaboration,
    Fabrizio

    I guess you mean a select list. You could use a select-list-with-submit or select-list-with-redirect item to ultimately redirect back to the page, passing in the selected value name for use as the chart title. Or you could do something with javascript to capture the selected value and save it in session state immediately. Others will have to advise you on these possibilities.
    Scott

  • CR2008 - Set chart titles during run time

    Hello community!
    Is there a way to change the chart titles during runtime with the fullversion?
    I have the following code to change the text of the "FieldHeadingObject" and "TextObject" and this is working.
    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject repObject in sec.ReportObjects)
       if (repObject.Kind == ReportObjectKind.TextObject ||
           repObject.Kind == ReportObjectKind.FieldHeadingObject)
            ((CrystalDecisions.CrystalReports.Engine.TextObject)repObject).Text = "my new Text";
    How can I change the titles of the chart object?
    I know already that there is the class "ChartTextOptionsClass"
    Does someone know how I could access the TextOptions in the ChartObject so that the new Titles are displayed in the report?
    Thank you
    Alex

    Hello Ludek!
    Thank you for the example code. I modified them to meet my requirements.
    void LoadReportLanguageResources(ReportClass report)
       foreach ( CrystalDecisions.CrystalReports.Engine.Section sec in report.ReportDefinition.Sections)
          foreach (CrystalDecisions.CrystalReports.Engine.ReportObject repObject in sec.ReportObjects)
             if (repObject.Kind == ReportObjectKind.TextObject ||
                  repObject.Kind == ReportObjectKind.FieldHeadingObject)
                ((CrystalDecisions.CrystalReports.Engine.TextObject)repObject).Text = "test";
       CrystalDecisions.CrystalReports.Engine.ReportDocument rptDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
       CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc;
       report.Load();
       rptClientDoc = report.ReportClientDocument;
       CrystalDecisions.ReportAppServer.ReportDefModel.ReportObjects myCharts;
       myCharts = rptClientDoc.ReportDefController.ReportObjectController.GetReportObjectsByKind(CrReportObjectKindEnum.crReportObjectKindChart);
       foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject oldObject in myCharts)
          if (oldObject.Kind == CrReportObjectKindEnum.crReportObjectKindChart)
             CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject oldChart;
             CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject newChart;
             oldChart = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)oldObject;
             newChart = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)oldChart.Clone(true);
             newChart.ChartStyle.TextOptions.Title = "My new Title";
             newChart.ChartStyle.TextOptions.DataTitle = "My new data Title";
             newChart.ChartStyle.TextOptions.SeriesTitle = "My new series Title";
             rptClientDoc.ReportDefController.ModifyChartObject(oldChart, newChart);
    But I am hvaing problems with the method modifyChartObject(oldChart, newChart). When the method is called i get an COMException with a message like "The data fields of the diagramm are not valid" (German message: "Die Datenfelder des Diagramms sind ungültig"); ErrorCode -2147213287;
    LoadReportLanguageResources is called via the following functions - I left out the outermost functions where the reportingList is loaded and the parameter is built.
    //Checks the list with the report items and call the main load method
    void IReportView.LoadHusReport(IList<HusRepItem> reportingList, BDEA01RangeParameter parameter)
       if ( reportingList.Count > 0)
          reportClass = new repHusReport();
          reportClass.SetDataSource(reportingList);
          LoadReport(reportClass, "Hus Station Report", parameter);
    void LoadReport(CrystalDecisions.CrystalReports.Engine.ReportClass myReport, string title, BDEA01Parameter parameter)
       //check the parameters
       //set the parameters for the report (start and end time of the displayed report range)
       myReport.SummaryInfo.ReportTitle = title;
       if(reportViewer == null)
          crCrystalReportViewer = new CrystalReportViewer();
          reportViewer.Child = crCrystalReportViewer;
       LoadReportLanguageResources(myReport);
       crCrystalReportViewer.ReportSource = myReport;
    Is there something I have forgotten?
    I checked the datafields of the old and the new chart and both have 0 entries before the ModifyChartObject method is called.
    If the method is not called, the report is functioning and all values/diagrams are displayed correctly.
    Thank you Ludek for your help.
    Alex
    Edited by: Alexander Frwirth on Jul 7, 2010 10:13 AM

  • Set Chart element dynamically

    Hi,
    Is it possible to reference an xml field in a chart element. For example I want to be able to set the axisMaxValue dynamically. I've tried several things including the following but to no avail.
    <Y1Axis axisMaxAutoScaled="false" axisMaxValue="{(xdoxslt:group(.//ROW, 'GRAPH_MAX_VALUE'))}">
    <ViewFormat scaleFactorUsed="true" scaleFactor="SCALEFACTOR_NONE"/>
    </Y1Axis>
    Thanks
    Grant

    Yes you can, I use this method to define a dynamic minimum value:
    <Y1Axis lineWidth="1" lineColor="#DDDDDD" ascending="true"
    axisLocation="AL_LEFT" visible="true"
    axisMinAutoScaled="false" axisMaxAutoScaled="true">
    <axisMinValue>
    <xsl:value-of select="//ROW/GRAPH_MIN_VALUE"/>
    </axisMinValue>
    </Y1Axis>
    Hope it helps!
    DrPlexi

  • Setting Page Title Dynamically in OAF

    Hello All,
    I have a Requirement wherein i have to display a 'Welcome <UserName>' message at the top of a OAF page.
    I want to implement this using the 'Title' propery of the Page.
    Is there any way to set the Title of a Page Programatically(by checking the value of a VO/EO Attribute.)
    (OR)
    Is there any other way to implement this functionality.
    Any inputs on this will be really helpful.
    Thanks & Regards,
    Satya

    Hi satya,
    The same thred posted twicely,so pls close this to avoid confusion in searching thred's.
    oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean oapagelayoutbean = oapagecontext.getPageLayoutBean();
    oapagelayoutbean.setTitle("PageTitle");
    Regards
    Meher Irk

  • Set page title dynamically

    Hi,
    I am trying to set page title programmatically.
    I am calling following in prerender method but it is not working
    this.getHead1().setTitle("This is new title");Any idea, what can I do achieve the same?
    Thanks.

    hi
    this can be done by goinig to design view ,, then make sure that no component of the page ( if there exixt ) is not selected
    then go to properties palette ,, and choose the smale button opposit TITLE and make data bidning with any object u want

  • Can I set preview title dynamically in Reports 6i?

    Dows anyone know a way to dynamically change the title that is printed in Preview Window of a report in Reports 6i?
    Thanks in advance

    Hi Chai,
    Yes you can do this in SAP Mobile BI. You would configure alerters in the Web Intelligence report the same way you would for a BI Launchpad user.
    See section 5.15 of the following document for more info
    http://help.sap.com/businessobject/product_guides/sbo41/en/519_mobiOS_admin_en.pdf

  • 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

  • How to use the region parameter of main report for subreport chart titles?

    I am using Crystal Reports 11.
    I create 1 main report with 10 sub-reports that contain cross-tabs & charts. The main report has a parameter regarding 3 different areas: region1, region2, and region3.
    I use the method of adding the u2018regionu2019 parameter of main report to the selection formula of the sub-reports. So, I can select 'region' from main report to controll outputs in sub-reports by region.
    I use formulas for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    Since I pass the u2018regionu2019 parameter of main report to sub-reports, I have to change chart titles dynamically based on the region I select.
    How can I use the region parameter from main report in the formulas to get chart titles dynamically?
    Thank you in advance.

    Thank you.
    I am not using Chart Title with "Chart Expert".
    I am using a formula for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    I drag this formula above the charts and it looks like a dynamic title. So, for product a111, the chart title would be "Region1 u2013 a111 Counts"; for product b222, the chart title would be "Region1 u2013 b222" Counts; and so on ...
    Because I pass the region parameter from master report to subreport, I want to change the region part of the chart titles dynamically.
    For example,
    when select Region1, the chart titles should be: "Region1 u2013 a111 Counts"; "Region1 u2013 b222"; ...
    when select Region2, the chart titles should be: "Region2 u2013 a111 Counts"; "Region2 u2013 b222"; ...
    I want to add the region parameter into the tiltle formula.
    How should I do?

  • Dynamically displaying SPC Chart Title

    Hi
    I have created SPC Chart Disply.I did dynamic change of chart types(like xbar,xbar-range). Now i want to  reset the Chart title property dynamically. if any methods available.
    Thanks in advance.
    Regards,
    Malini.V

    This method and all of the other helpful get/set syntax methods are easy found by using the Script Assistant, which is part of the Productivity Tool installation that you can add to your client workstation by running the Wizard Install link found in the xMII Menu's Visualization Services section.
    If you are working on a dynamic SPC charting application you might also be able to learn from some pre-installed content:  http://localhost/Lighthammer/Samples/SPC/Servers.irpt
    Regards,
    Jeremy

  • Dynamic Chart title

    Hi,
    I need to make the title of the chart dynamic by showing the User entered variable value + fixed text. Say if the user enters Model (LD) then my title for the graph should be 'LD FFV Graph'.
    I was able to modify the title by setting the webtemplate parameters for Chart item and by changing the XHTML code as shown below.
    <bi:TITLE path="DATA_PROVIDER:DP_1?/BICS_VIEW/SELECTION_STATE/SELECTION/CHARACTERISTICS/CHARACTERISTIC[@name=&apos;0MATERIAL__ZARC_MOD1&apos;]/SELECTIONS/SELECTION[1]/MEMBER/" />
    But I was not able to concatenate the fixed text (Eg. FFV Graph) and variable value(LD) into the chart title (LD FFV Graph).
    Please help if you came across similar requirements.
    Regards
    Karthik Muthyala

    Hi,
    You can type "FFV Graph "in your web template in WAD and use "Info Field" web item before FFV Graph. You need to select Model variable in Info Field web item settings like below:-
    Regards,
    Suman

  • Set Region/Chart Width Dynamically

    I am sure this has to be simple, but have been searching the forum for "Chart Width" and a LOT of data comes back. So, after searching for a long, time, I ask here... :-)
    I would like to set the width of my charts dynamically from settings in the database. I know I can set the width and height in the chart settings section, but this hard codes them.
    What I would like to do is get the width and height values from the user or a database query (so the user can customize how big a chart is) and set the values dynamically instead of hard coding.
    Any suggestions or a shove in the right direction would be greatly appreciated.
    Thanks!

    Varad,
    Thanks for the reply. This solved the problem of resizing the chart. What happened then was the the region was staying the same size, so the chart was running of the bottom and right if I increased the chart size. To fix this, I also had to update the region source to use the application items to pass in the width and height as well. Evidently the region was inheriting the width and height from the chart definition.
    Anyway, go it working pretty much like I want it, although it does take some calculating.
    On a side note, one irritating thing... When you turn on "User Custom XML" for the chart, it looses a bunch of stuff - like the Y axis information, grid-lines, etc. and you have to go put that back in manually.
    Thanks again...

  • Flex 4 Chart title won't move when positioned

    Hi,
    I have an issue with my horizontal chart title in my Flex 4 bar chart--it just won't move when I try to position it someplace other than the default (which is center).
    I followed the example in the livedocs: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_05.html, specifically the one using the 'titleRenderer" property of the AxisRenderer, and setting it to my custom AxisRenderer class. Here is my code:
    package classes.view
        import mx.charts.*;
        import mx.charts.chartClasses.ChartLabel;
        public class ChartTitleRenderer extends ChartLabel
            public function ChartTitleRenderer()
                super();
            override protected function updateDisplayList(w:Number, h:Number):void {
                super.updateDisplayList(w, h);
                this.setStyle("textAlign","left");
    Setting the textAlign property doesn't work. I have tried setting this property in the css as well and applying it directly to the axis, which also doesn't work. I have also tried "this.x = -100" etc, to no effect. Any ideas?
    Thanks

    Ray,
    To do the "masking" that you are referring to, I think that two Effects (explore each, to see which works best for you), will give you what you want:
    The Crop Effect, applied to the Still Images in Video Track 3. This Effect can be Keyframed to change, as is required over time.
    The 4-Point Garbage Matte Effect.
    If the Still on Video 2 is sized to the Frame of the Project, say 1920 x 1080 for Full-HD, it will "cover" the Video on Video Track 1.
    Note: it is best to Scale the Still Images to very close to what you want/need, in PS, or PSElements, prior to Import. What you are doing with the Still Images in Video Track 3 is creating a PiP (Picture in Picture). This ARTICLE goes into more detail on
    Good luck,
    Hunt

Maybe you are looking for