Display tooltip in Chart control

I have a requirement to display a piechart with a number of sections supplied via a datasource and have the following code to display tooltip and also have the chart sections exploded. So far the Chart does not show tooltip when I mouse over section neither
does it explode the sections. Is there a flag I need to include in my web.config file or is there a setting in Internet Explorer that needs to be set? Using IE 9 and VS 2010 with .net 4.0
For Each objDataRow As DataRow In objDataTable.Rows
   Dim objDataPoint As New DataPoint(0, Doubl.Parse(objDataRow("Requested").ToString()))
   'Adding ToolTip
   objDataPoint.ToolTip = objDataRow("PRJName").ToString() & " has " & objDataRow("Requested") & " percent requested"
   Me.PrjCodeRequestedActual.Series("Series1").Points.Add(objDataPoint)
   Me.PrjCodeRequestedActual.Series("Series1").Points(intCount)("Exploded") = "True"
Next

MODULE POOL PROGRAM
http://www.allsaplinks.com/dialog_programming.html
dialog programming
http://fuller.mit.edu/tech/dialog_programming.html
http://www.sappoint.com/abap/dptc1.pdf
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sappoint.com/faq/faqdiapr.pdf
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
check sample code.
http://www.sapgenie.com/abap/example_code.htm
http://www.sap-img.com/abap.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBTOO/BCDWBTOO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRFORM/BCSRVSCRFORM.pdf
http://help.sap.com/saphelp_nw2004s/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
SAP Library:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm.
Usage of Table Control in ABAP (PDF):
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e
Rewards if useful.........
Minal

Similar Messages

  • Chart Control Error

    Dear all
    I have connected chart control with SQL database but while loading the chart it displays following error please help me in finding 
    a solution for the error.
    Thanks in advance
                                            Conversion from string "Incident_Type to type 'integer is not valid
    I don't know what is the mistake.
    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged
            Try
                If RadioButton3.Checked = True Then
                    Dim reader As SqlDataReader
                    cmd = New SqlCommand("Select * from ATRAForm", cn)
                    reader = cmd.ExecuteReader
                    While reader.Read
                        SCRChart.Series("Region_VS_Incident_Type").Points.AddXY(reader.GetString("Incident_Type"),reader.GetString("Region"))
                    End While
                End If
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        End Sub
    Nadem

    Hi Mir Ahmad Raza Nadem,
    As your issue is related to Chart, I'm moving your thread to a more appropriate
    forum--Chart Forum for help. thanks for your understanding.
    Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Dynamic tooltips for charts (BusinessGraphics) with simple series

    Hello,
    I was wondering wheter the tooltip for charts with simple series can set dynamically. I cannot bind it to the context within the properties of the BusinessGraphics control but maybe it can be set in the code?
    This way I want to show the value of the column for instance as tooltip in a chart, or is there a better solution?
    thx,
    jeroen

    I got it!
    This thread helped me.
    [http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796]

  • Htmlb chart control is not working

    Hi All
    I created chart using htmlb chart control as per documents  given in pdk. but it is not displaying any thing on the browser,I am attaching code ,Please tell me where will the wrong
    Thanks in advance
    Gopal
    Java:
    create a new JCO table
            JCO.Table table = new JCO.Table("DAX");
    //       add the info/header to the table. The header is defined by the column name,
    //       data type and length (see JCO table API for details).
            table.addInfo("GROUPID", JCO.TYPE_CHAR, 50);
            table.addInfo("X", JCO.TYPE_CHAR, 50);
            table.addInfo("Y", JCO.TYPE_CHAR, 50);
            table.addInfo("Z", JCO.TYPE_CHAR, 50);
            table.addInfo("COLOR", JCO.TYPE_CHAR, 50);
            table.addInfo("EXTENSION", JCO.TYPE_CHAR, 150);
    //       append a record to the table. setValue sets the value as string. The second
    //       parameter is the column. The numbers are according to the sequence of the
    //       definition of the header (see above).
            table.appendRow();
            table.setValue("07.2001",0);
            table.setValue("SAP",1);
            table.setValue("158",2);
            table.setValue("20",3);
            table.setValue("10",4);
            table.setValue("href=\"http://www.sap-ag.de/\"",5);
    //       create a JCOChartModel and set the JCO table
           IChartModel model = new JCOChartModel();
            ((JCOChartModel) model).setDataSrc(table);
    myBean.setModel(model1);
    JSP:
    <jsp:useBean id="myBean" scope="session" class="com.sap.barchart.ModelBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
         <hbj:chart
               id="myChart1"
               model="myBean.model"
               visible="true"
               displayObjectValues="true"
               titleCategories="Company"
               titleValues="Turnover"
               title="Washers by Companies!"
               chartType="BARS_3D"
               colorOrder="DEFAULT"
               height="200"
         />
         </hbj:form>
      </hbj:page>
    </hbj:content>

    HI,
    Check if the bean is null.
    Try displaying it using classlib in the dynpage itself .
    Regards
    Bharathwaj

  • Display data into Chart Js

    1
    I Have Problem in display data into Chart Or chartJs ,
    In my Controller I Return Json and
    use it in javascript like this but i have
    error that tell me 't' is undefined
    $(document).ready(function () {
    $.getJSON("/Report/GetTransactions/", function (data) {
    debugger;
    var ctx = document.getElementById("myChart").getContext("2d");
    var myBarChart = new Chart(ctx).Bar(data);
    debugger;
    data = {
    labels: ["January", "February", "March", "April", "May", "June", "July"],
    datasets: [
    label: "My First dataset",
    fillColor: "rgba(220,220,220,0.5)",
    strokeColor: "rgba(220,220,220,0.8)",
    highlightFill: "rgba(220,220,220,0.75)",
    highlightStroke: "rgba(220,220,220,1)",
    data: [data]
    label: "My Second dataset",
    fillColor: "rgba(151,187,205,0.5)",
    strokeColor: "rgba(151,187,205,0.8)",
    highlightFill: "rgba(151,187,205,0.75)",
    highlightStroke: "rgba(151,187,205,1)",
    data: [data]
    and my controller is this
    return Json(_reportRepository.GetTransactions(), JsonRequestBehavior.AllowGet);

    Hi Mario Castro,
                              In selection Screen  initially u have to enter the input value after provides some user command only next screen will be trigger.
    In the next screen PBO event you cant assign selection screen Variable into next screen fields.
    Eg.
    Selection Screen Variable
              s_belnr
               s_bukrs
               s_gjahr
    Next Screen
               t_belnr
               t_bukrs
               t_gjahr
    In PBO  you can code
              t_belnr  = s_belnr
              t_bukrs = s_bukrs
             s_gjahr  =   s_gjahr
    Revert back if any difficulties to do.
    Regards,
           Thangam.P

  • As a stockholder, I would like see the development of iTV with Retina display and integrating Siri control, internet access, and iTunes apps. This new product would be a large screen, thin wall mounted television, much like a oversided iPad.

    As a stockholder, I would like see the development of iTV with Retina display and integrating Siri control, internet access, and iTunes apps. This new product would be a large screen, thin wall mounted television, much like a oversided iPad.
    Do you think this product is possible?

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • Change color in chart series (Chart Controls)?

    Does anyone know if it's possible to change the color within a series in Microsoft Chart Controls?  My data is X = test time and Y = response time using a column graph.  Currently when the test to collect response time fails it does not
    record a numerical value and when graphed it appears as though the response time was minimal.  I want to make it stand out when a failure occurs, for example to draw a large column and change the color to red (other values are in blue).
    I don't have much experience using Chart Controls yet.  I know you can use an alternate color with a different series of data but it doesn't appear you can change it from within. 
    This is my chart series (when a test fails, the response matches "" and not $NULL):
    [void]$chart1.Series.Add("ResponseTime")
    $chart1.Series["ResponseTime"].ChartType = "Line"
    $chart1.Series["ResponseTime"].BorderWidth  = 1
    $chart1.Series["ResponseTime"].IsVisibleInLegend = $true
    $chart1.Series["ResponseTime"].chartarea = "ChartArea1"
    $chart1.Series["ResponseTime"].color = "#0404B4"
    $DATA | ForEach-Object {
    If ($_.RESPONSE_MS -eq "") {
    $chart1.Series["ResponseTime"].Points.addxy("FAIL",9999)
    Else {
    $chart1.Series["ResponseTime"].Points.addxy( $_.TIME.Remove(5) , ($_.RESPONSE_MS)) }
    I tried changing the color within the if/else but the first .color value it picks up will be used throughout. 

    Hi Tickermcse76,
    To create a new line chart, please refer to this script:
    function New-Chart
    param ([int]$width,[int]$height,[int]$left,[int]$top,$chartTitle)
    # create chart object
    $global:Chart = New-object System.Windows.Forms.DataVisualization.Charting.Chart
    $global:Chart.Width = $width
    $global:Chart.Height = $height
    $global:Chart.Left = $left
    $global:Chart.Top = $top
    # create a chartarea to draw on and add to chart
    $chartArea = New-Object System.Windows.Forms.DataVisualization.Charting.ChartArea
    $global:chart.ChartAreas.Add($chartArea)
    [void]$global:Chart.Titles.Add($chartTitle)
    # change chart area colour
    $global:Chart.BackColor = [System.Drawing.Color]::Transparent
    } #New-Chart
    New-Chart -width $width -height $height -left $left -top $top -chartTile $chartTitle
    [void]$global:Chart.Series.Add("Data")
    # $global:Chart.Series["Data"].Points.AddXY($(get-date), $($ht.Values))
    $global:Chart.Series["Data"].Points.DataBindXY($ht.Keys,$ht.Values)
    #$global:Chart.Series["Data"].XValueType = [System.Windows.Forms.DataVisualization.Charting.ChartValueType]::Time
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.Format = "hh:mm:ss"
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.Interval = 1
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.IntervalType = [System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType]::Seconds
    $global:Chart.Series["Data"].ChartType = [System.Windows.Forms.DataVisualization.Charting.SeriesChartType]::Line
    #$global:chart.Series["Data"].IsValueShownAsLabel = $false
    Reference from:
    http://poshcode.org/1205
    To change the chart color, please refer to this script:
    Charting with PowerShell
    I hope this helps.

  • Order of display in Org chart for ESS

    Hello,
    Is there any way to change the order of display of org chart based on per.No.
    Thanks, Abdul

    Hi Abdul,
    As name suggest ORG CHART it’s the image of your organization and its maintains certain hierarchy in SAP Standard … for e.g. You will get to see Orgunit &#61664; Then SubOrgunit &#61664; Head Position/Positions (Multipal) &#61664; Person Holding those positions.
    If you break this Hierarchy it will be difficult to trace the Employee and Duplication of records will take place …. There are Reports which displays Employee to Position and Orgunit … and the diplay of such report will be in Table and Colum Format .. it wount be in a Tree Format... you may go for Custom Development.
    But do Check these report they all are Report based on Object type.
    RHXSTR01 &#61664; Organizational Structure with Positions
    RHXSTR02 &#61664; Organizational Structure with Persons
    RHXEXI00 &#61664; Existing Organizational Units
    ~Bhawanidutt.

  • Problems with displaying data in Chart

    Hi, everyone
    I am stuck with displaying data in Chart. I set the minimum
    and maximum for LinearAxis of a LineChart, so the chart only
    display the data within this range. But sometimes I still need to
    keep the trend of all data even the data is out of range.
    eg, the range of verticalAxis is 0 -100 and I got data 70,
    120, 90. Neither I want to set the data 120 to 100 in order to keep
    the data point nor make the data 70 connected directly to data 90.
    All I want is to keep the shape, from 70 to 120, from 120 to 90,
    but 120 doesn't display in the chart.
    My another question is when I try to select an area of a
    chart to zoom in, how can I the get the exact area that I select to
    zoom,
    for example: I want to use exactly the result of the
    following line:
    ((firstMouseX - this.mouseX)/ this.dataRegion.width) *
    chart.dataProvider.length
    that is I don't want to use methods ceil or floor to get the
    approximate area.
    Excuse me, I got one question more. The weird things is my
    chart won't resize itself when I resize the VDividedBox or other
    containers. I set the width equals 100% wherever it needs to be.
    Just like the Flex sample - dashboard. If I open a small window at
    the very begining and then maximize the window, the chart still
    keep the small part of its container. I don't understand why.
    Sorry for too many questions.
    Hope someone can help me.
    Thanks in advance.

    Can I use the Interpolate to solve the first problem?
    But I have no idea about interpolate at all.
    Please help!

  • How to use Chart control in VS2012 with 3.5 project

    Hello.
    I have 3.5 framework project with MS Chart, developed in vs 2008.
    Now im moving to VS2012 and there is no chart control on tollbox in any projects below dotNet 4.0.
    Is it possible to use MS Chart in dotNet 3.5 projects?

    I have the same problem updating 2008 project to 2013. Lots of errors loading the form.
    Created a new project and had to drag and drop 3.5 onto the toolbox to get it to load. Could not add it or reference it. Dragged the tool onto form and it worked. Closed the form and opened it back up and get the same errors as the other project.
       The variable 'ChartArea2' is either undeclared or was never assigned.     
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    MSDN Help  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       The variable 'Legend2' is either undeclared or was never assigned.    
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    MSDN Help  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       The variable 'Series2' is either undeclared or was never assigned.    
    Instances of this error (3) 
    1.   There is no stack trace or error line information available for this error. 
    2.   There is no stack trace or error line information available for this error. 
    3.   There is no stack trace or error line information available for this error. 
    Help with this error 
    MSDN Help  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       Could not find type 'System.Windows.Forms.DataVisualization.Charting.ChartArea'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully
    built using settings for your current platform or Any CPU.    
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    Could not find an associated help topic for this error. Check Windows Forms Design-Time error list  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       Could not find type 'System.Windows.Forms.DataVisualization.Charting.Legend'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully
    built using settings for your current platform or Any CPU.    
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    Could not find an associated help topic for this error. Check Windows Forms Design-Time error list  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       Could not find type 'System.Windows.Forms.DataVisualization.Charting.Series'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully
    built using settings for your current platform or Any CPU.    
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    Could not find an associated help topic for this error. Check Windows Forms Design-Time error list  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       Could not find type 'System.Windows.Forms.DataVisualization.Charting.Chart'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully
    built using settings for your current platform or Any CPU.    
    Instances of this error (1) 
    1.   There is no stack trace or error line information available for this error. 
    Help with this error 
    Could not find an associated help topic for this error. Check Windows Forms Design-Time error list  
    Forum posts about this error 
    Search the MSDN Forums for posts related to this error  
       The variable 'Chart1' is either undeclared or was never assigned. 

  • What is inserting the following code onto pages " div id="bikatoc" style="display: none;" a class="control" Close /a div class="toc" ul li class="toc-h2

    I am doing web development and when working with the wordpress dashboard tiny mce, each time I hit the update button the following piece of code is inserted into the page I am working on.
    <pre><nowiki><div id="bikatoc" style="display: none;"><a class="control">Close</a>
    <div class="toc">
    <ul>
    <li class="toc-h2"><a href="#toc0">Just for the Health of it</a></li>
    <li class="toc-h2"><a href="#toc1">Wild Yukon River Salmon</a></li>
    </ul>
    </div>
    </div>
    </nowiki></pre>
    Something is scanning the h1-h6 tags and creating a table of contents and inserting it into the page. This also happens when I use firebug on other random pages while using firefox.
    I have tried several other browsers to determine if this is a wordpress issue, but this only happens in firefox. It also only happens when I make changes with firebug in firefox. Using firebug lite in chrome did not cause this problem.
    I have been looking all over to figure out what is going on and why the is happening. It is making development near impossible and is forcing me to use a different browser (which I don't enjoy at all)
    Any help you can give me would be wonderful.
    Thank you for your help

    Is it always hidden with display:none?
    One standard diagnostic step is to try Firefox's Safe Mode to see whether it is caused by a custom setting or add-on.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in [http://support.mozilla.com/kb/Safe+Mode Safe Mode] using
    Help > Restart with Add-ons Disabled
    In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
    If the inserts stop, this points to an add-on as the problem. Figuring out which one it is would be the next step. (If the TOC is always hidden, perhaps it is something SEO-related.)

  • Cursors for strip chart controls?

    I’m using a strip chart control to plot data during real-time.  I allow the operator to pause the chart to view old data.  The operators would like to be able to see a specific value when the chart is paused,  either by enabling cursors, or clicking over a point on the chart with the mouse.  I don’t see any way to do this for a strip chart control, or am I missing something? 
    Thanks!
    Angie
    Edited to add: I'm using CVI 2010.

    Some ideas have been suggested here and here, may be it's of interest

  • Hw 2 display ALV in Table control

    Hi experts,
    hw we cn display alv output in a tabl cntrl. is dere ny specific fnctn module or v hav 2 use som odr method.
    hlpful answrs 'll b suitbly rewrded....

    Hi Rohit,
    You cant display ALV in Table control.
    Both are used for specific requirements and they cant be merged.
    Could you let us know, why do you want to disply ALV in Table control ?
    Best regards,
    Prashant

  • Rogue lines appear on the 2D charting control

    I am using a the 2D charting control in a VS 6 project for plotting a barchart/histogram for a dataset. I have been developing the application without problems until I moved to a new computer. On this new development computer I get these rogue lines appearing as you can see in the attached screen capture. These lines attach the upper point of a sample back to zero as you can see in the graphic. I have never witnessed this before on the other system. Both systems are running WIndows XP Pro (SP2). Upon further investigation I have found that this problem does appear on some computers and not others which are running the same OS and configured very similarly.
    My first reaction was that this was caused by a datase
    t issue. However, running the same dataset on other computers with the same exact application does not produce this error. As well, running ANY dataset on this computer does produce the issue but not on others.
    Are there any known issues regarding this issue and certain video cards, configurations, etc.
    Attachments:
    chartcapture.JPG ‏25 KB

    I haven't been able to reproduce the problem. I suspect that my program is not similar enough to yours.
    I don't understand what you are doing with the two different plots in your example code. What is the difference between "PLOT1" and "BinCountHistogram"? Are you plotting both of these on the same graph? If so, how is "PLOT1" configured? Is it possible that the unwanted lines you are seeing are a result of plotting "PLOT1"?
    Something else you might try is using PlotXvsY for your histogram data instead of PlotY. Create an X vector of bins. Measurement Studio includes an example program that demonstrates this technique. It should be installed to MeasurementStudio\VC\Examples\Analysis\Histogram.
    If these ideas d
    on't lead us anywhere, I have attached the simple project that I was using to try to reproduce the problem. One option would be for you to modify the attached program to make it cause the problem and post the project back.
    Based on the intermittent nature of the behavior you are seeing, this does seem like a bug, so I am very interested in tracking it down.
    Attachments:
    AttemptReproUnwantedLines.zip ‏27 KB

  • Chart Control printing at the client side

    Hi,
    I have multiple chart controls (in VS2010) on an aspx page, which also show their relevant detaild data in a table on the same page. I could not found yet an appropriate solution for printing such a page with chart control and other data.
    In fact I was able to print the chart alone at the client side, but only by sending it directly to the printer, this method is unable to show print preview dialog to the client.
    Then i started thinking in another direction, and came with the idea to export my desired controls into a pdf file which then can be shown in the browser (which resolves browser independance), for that i used nReco (the dll which comes with dot net) pdf converter
    which can convert the whole html page into the pdf file (by passing the url of the page) and then opens/saves in the browser to print.
    But when i pass it (to one of the the funtion in nreco) a container means a div or a panel control which holds the chart control and other normal controls then it gives me the error that unable to convert to pdf.
    Tis may be due to the relative path of the chart control image.
    I am stuck in this situtation, My original requirement is to show the the print preview to the user at client side with all printing options. It would be very convenient if the desired control can be exprted to pdf.
    And I don't want to use any ohter third party control (for print preview at client side) which needs to be installed on the client machine.
    Thanks.
    Code Sample:
    using NReco.PdfGenerator;
    on Load
    Chart1.Series[0].Points.DataBind(datatbl.Rows, "ColHeading", "colName", string.Empty);
    On Print
    HtmlToPdfConverter nRecohtmltoPdfObj = new HtmlToPdfConverter();
    nRecohtmltoPdfObj.Orientation = PageOrientation.Portrait;
    StringBuilder sb = new StringBuilder();
    StringWriter tw = new StringWriter(sb);
    HtmlTextWriter hw = new HtmlTextWriter(tw);
    ChartPanel1.RenderControl(hw);
    string temp =
     "<html><head><style>td,th{line-height:20px;} tr { page-break-inside: avoid }</style><script>function subst() {var vars={};var x=document.location.search.substring(1).split('&');for(var i in x) {var z=x[i].split('=',2);vars[z[0]]
    = unescape(z[1]);}" +
                "var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];for(var i in x) {var y = document.getElementsByClassName(x[i]);" +
                "for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];}}</script></head><body onload=\"subst()\">"
     + sb.ToString() 
     + "</body></html>";
    nRecohtmltoPdfObj.GeneratePdf(temp);
    Please suggest a batter way out.

    Is this question hard to answer? or I am going to the wrong direction since I am new about Java EE/EJB.
    Can anyone give me some answer?

Maybe you are looking for