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?

Similar Messages

  • How to use javascript to print on the client side

    hi all,
    Now i'm facing a problem:
    I want to use javascript to print something(for example, a table) on the client side. So i must get a connection with the printer installed in the client computer.
    some says that getObject() function can do this,but i don't know how?
    Who please help me!

    window.print();

  • How to Print Crystal Report without any dialog message on the client side

    Hi!
    I've read too much questions like this, but i can't find any answer.
    How can i print a report on the client side directly?
    I have three buttons, "Generate Report", "Generate PDF", "Print".
    I want when the "Print" button was clicked, automaticaly the report is printed using default printer, like PrintToPrinter function, but in the client side.
    Thanks!

    If you search for previous posts about this, you will see many posts saying not possible.  If this functionality was possible, you could essentially have a page that would send something to a clients printer just by visiting the page, how bad of security hole would that be?

  • Controlling the client-side cache

    At the current stage on my project I'm finding that I'm changing my mapping definitions fairly frequently (because the country side is just the wrong shade of egg-shell). Clearing the server side cache is fairly easy to do, provided you remember to do it, but my problem is on the client side.
    Right now, the tiles are returned with a one week time to live. So if I change the mapping definitions it might not propagate through to all the clients until up to a week later. What I'd like to do, at least for now, is turn off storing of map tiles on the client-side. The easiest way to do that would be to specify the cache-control header but I can't seem to find a configuration option for that.
    Has anyone setup MapViewer to use a different cache-control?

    Hi Mark,
    You can specify the cache control statements for the page itself.
    If this does not help, try to set expires header for the images. ex for Apache see mod_expires for a directory/location setting
    regards, michael

  • ADF Faces + hardware device in the client side.( adf swing  or adf java fx)

    We are using adf+swing in desktop app.
    We like ADF Faces but we need interations with Hardware device in the client side: scan reader, web cam, bar code reader, finger prints reader …
    How to do that’s in the adf faces web environment ( what about with sandbox security) how to obtain in the adf faces web page in the client side de video streams.
    In the future adf will be use Java FX?
    Thanks
    Juan Carlos Llanes

    Hi,
    see sample 71 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    You can use ActiveX plugins or JavaApplet to access the client system. To reach out of the sandbox, it will require a certificate
    In the future adf will be use Java FX?
    No.

  • How do I get an XML file on the client side hard drive

    Is there a way to get XML files from a Flex form and get it
    to the hard drive on the client side? I realize Microsoft got
    impaled by allowing this sort of thing with ActiveX. We would like
    the app to be browser based but need XML files dropped off on the
    hard drive. There is an application running locally that needs to
    consume them. Can I run flex standalone without web services and
    still access the hard drive? Seems robust enough to do so.

    dadanas wrote:
    Hi Simcah, I have a similar problem. Have you found out any solution?
    thanks, dan
    You need to ask the printing service provider. Dealing with color totally depends on the printing process involved and of course the machines used.

  • Is there any way for a basemap to be manipulated from the client side?

    Hello,
    Essentially, we have a basemap (+basemap A+) that contains boundary geography (i.e., county, tract, block boundaries) and we have a theme (+theme A+) that contains housing unit points.
    The idea is that theme A will be a layer that the user will be able to switch on/off. We know how to do this, but the problem comes in where performance is concerned.
    Previously, theme A was actually included in basemap A, and performance was not an issue, but the problem then was that the user was not able to turn that layer on/off.
    Also I have done everything I know in terms of caching as well as using the mapviewer API
    (e.g.,
    test_theme.setClickable(false);
    test_theme.enableInfoWindow(false);
    test_theme.enableInfoTip(false);
    test_theme.enableLabels(false);
    test_theme.enableAutoWholeImage(true);
    test_theme.setMinVisibleZoomLevel(5);),
    but rendering the theme on the client side is still way too slow (even at zoom level 5).
    So, my question boils down to this. Is there any way for a basemap to be manipulated by a user? I.e., Is there a way for a user to pass parameters to a basemap, essentially telling it which themes to turn on/off?
    I know you can specify which zoom level the basemap's themes are visible, but again, we want the user to be able to have control of when a certain theme is shown or not.
    Thank you for any help you can provide,
    John
    Edited by: user641525 on Mar 18, 2009 10:29 AM
    Edited by: user641525 on Mar 18, 2009 10:30 AM

    What you may try is to replicate your base map but take the point theme out of its definition. Then create a second tile layer for the new base map. You can add both tile layers to the client (but set only one of them to be visible). Then simply switch the tile layers' visibility on/off based on user turning on/off the point theme. The built-in Oracle Maps tutorial #22 (Multiple Base maps) has some sample code you might be able to re-use.
    thanks
    LJ

  • How can i print on the both sides of the paper on printer 5520

    how can i print on the both sides of the paper on printer 5520 when printing too many papers?

    Hi hamad5520
    I have included a document for two sided printing.
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c03476083&lc=en&product=5157536&tmp...
    Hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Opening a Java Window from a jsp page on the client side

    Hi all,
    Thanks in advance to all who could help me for this problem.
    I've written some jsp pages. In one of them, I open a new Java Window,
    which is a simple Java Frame. If I test this directly on the Tomcat
    server, everything works well.
    But when I call the jsp page through a web browser of a distant client
    (normal use), and when I want to see the java window, no window pops
    up. It appears that the Java Window pops up on the server, and not on
    the client side, which is what I wanted.
    Could someone tell me how to make the Java frames appear on the client
    side ? (Is it linked to the code or to the configuration of Tomcat ?)
    Thanks in advance,
    Alexis.

    JSP always run on the server. On the client you only see the results.
    But you can use applets on the client side: http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html

  • Fusion 4.1.2.  After install can no longer print on the Mac side.

    Version:1.0 StartHTML:0000000167 EndHTML:0000003793 StartFragment:0000000475 EndFragment:0000003777         
    Greetings,
    I'm using a MacBook Pro running OSX SL at the most current level.
    I upgraded from Fusion 3 to Fusion 4 (uninstalled 3 first then installed 4) after which I did the update to Fusion 4.1.2 which appeared to run fine.
    Being I'm new to the Mac I installed Fusion because I need Windows-XP.
    Prior to the installation of Fusion I spent 2 weeks trying to get my printers working just on the Mac side without Fusion.  I'm using an HP Deskjet 5850 (5800 series) printer which worked just fine.  The printer is an IP printer at IP address 192.168.1.11 and can be pinged from both the Mac side and the Windows-XP side. Before Fusion there wasn't any issue printing on the Mac side.
    After Fusion installation I didn't have any issues printing on the Windows side.
    Now with Fusion installed I can still print on the Windows side but not on the Mac side.
    All settings are as normal with printer sharing.
    When trying to print on the Mac side I see the printer queue for the HP pop up and it says 'waiting to connect' to 192.168.1.11.
    I tried a dozen different settings non of which worked.
    I switched from a NAT connection to a Bridged connection for Windows but still the same result, no printing from the Mac side.
    Is there a problem with this release of fusion or is it somewhere in my system settings?
    Any help will be appreciated.
    Thanks

    Run through this list of fixes including #16 then stop and report.
    Step by Step to fix your Mac

  • Auto remove of log files on the client-side is not working

    Hi,
    I have a setup for one-to-one client/server replication database. Everything is replicated ok.
    But on the client side, I see the log.00000000xx files are not removing at all,
    while the server has only 2 last log.00000000xx files left. But if I switch the role of the client/server,
    the newly server will eventually removed the unused log.00000000xx file, and have two last log file left.
    Both client and server database environment setup has called dbenvp->log_set_config(dbenvp, DB_LOG_AUTO_REMOVE, 1).
    Is there any additional setting for the client-side to auto remove the unused log files?
    Thanks,
    Sandra

    Hi.
    First, what version are you running? We created a test to confirm that this feature is
    working as expected on both a master and a client site. What flags do you have set
    for replication? I think we need to have you run with replication verbose messages
    set on the client site and possibly other diagnostics in order to determine what is different
    about your setup. We should take that level offline. Verbose messages can generate
    a large amount of output.
    You can contact me at the typical [email protected] and we'll move it
    forward that way. Thanks.
    Sue LoVerso
    Oracle

  • Possible to delete Offline Files content for a specific user from the Client Side Cache (CSC) ?.

    Hello Everyone,
    We would like to implement a script to delete the offline files in the Client Side Cache (CSC) for a nominated user (on Windows 7 x64 enterprise).
    I am aware that;
    1. We can use a registry value to flush the entire CNC cache (for all users) next time the machine reboots.
    2. If we delete the user's local profile it appears that Windows 7 also removes their content from the local CSC.
    However, we would like to just delete the CSC content for a particular nominated user without having to delete their local user profile.
    In our environment we have many users that share workstations but only use them occasionally. We don't use roaming profile so we would like to retain all the users' local profiles but still delete the CSC content for any users that haven't
    logged on in a week.
    Any ideas or info would be appreciated !
    Thanks, Makes

    Hi,
    I don't think this is possible.
    If you want to achieve it via script, I suggest you post it in official script forum for more professional help:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Karen Hu
    TechNet Community Support

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • Open/read a txt file on the client side in a Form server architecture

    We are moving our software from client-server to Web architecture but we have problems
    with all the forms that use GET_FILE_NAME and
    TEXT_IO built-in functions.
    This commands, in fact, work on the application-server side and not on the client (browser-side) as we need.
    How can we solve this problem??????
    Thank-you for your help.
    null

    there is a way to solve this problem.
    you must use developer 6 and above.
    you will have to modify your appliaction and use developer ability to work with javabeans
    you will have to write a javabean that will do the read/write operation at the client side.
    for more details look at my answer to the following topic:
    "Read and Write Files to user from FormsServer "
    that was opened at dec 15.
    Yossi

  • The service DS.RFCService could not be found on the client side

    Hi Experts,
    I am facing the following error message when i try to create SAP connection from management Console of DataServices 4.0 SP1
    "The service DS.RFCService could not be found on the client side"
    In Management Console...
    SAP connections->RFC  Server configuration.
    Trying to add RFC Server interface. it says
    The Service DS.RFC Services could not be found on client side.
    can anyone help me out of this issue..plz
    In my System I installed SAPBusinessObjects BI Platform 4.0 instead of Information platform services,BODS 4.0 SP1,IS 4.0 SP1...
    I checked the CMC ->servers->EIM -APS services->properties. i could not find any RFC or admin services running.
    anything is missing? any note explain about this?
    Pls advice
    Thank You In Advance.

    Hi,
    Check this note - KBA 1671522, it holds good for RFC also.
    Arun

Maybe you are looking for

  • Reg : Connecting an XE database -

    Hi Experts, Suppose I install Oracle XE database in my machine. Then, will my other team members (from their machines) be able to connect it and use. Sorry, for not being able to phrase the question properly (much ignorance in this domain). Can anybo

  • Verifying the Workflow Configuration - does not appear for the workflow services.

    hi! the services for the workflow services is not in windows service, I´ve installed workflow manager and correctly configured, service bus correctly configured etc verify

  • Mountain Lion not producing desktop thumbnail image

    Since installing Mountain Lion on my Mac Mini, files saved to the desktop from Photoshop CS6 intermittnetly appear without a thumbnail  image. The file name label is present, and if you select the file a dotted line placeholder border appears, but th

  • Placed Image problem solved

    Both my colleague and I had problems with Adobe Illustrator CS5: Problem: 1) AI refuses to "Place" external images. 2) Any existing AI documents with extant placed images now refuses to show them. The bounding boxes are there, but no images. Solution

  • Please Help! For some reason when ever I type in PSE it comes out very faint and almost invisable???

    Please Help! For some reason when ever I type in PSE 10 it comes out very faint and almost invisable like. I'm not sure what I did but I cant get it back to the normal black font??? Please help. I know this seems like a very simple and easy question.