C# winform + crystalreportviewer to export HTML format  ?

Hi,guys.
  I create a winform app with a crystalreportViewer[cr dev for vs 2012], and i found CR can export many formats,like pdf,word,excel.
  But I can't find "HTML" format. Although I know we can export HTML in the editor environment's preview mode, but my winform app can't export.
  What should I do?Many thanks!
Message was edited by: Ludek Uher

What you want to do is load a strongly typed report. This method of loading a report uses the ReportDocument component from the Components tab of the ToolBox.  When this component is added to the form, a dialogue box appears and prompts the Developer as to which type of Component to add to the form -> Crystal Report.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        crReportDocument = New test
        CrystalReportViewer1.ReportSource = crReportDocument
    End Sub
Remeber that a strongly typed report is compiled into the app exe. E.g.; use with care as the exe size will grow by leaps and bounds...
- Ludek  
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter

Similar Messages

  • How to export the report in HTML format for desktop application

    Hi,
    i have wrote the JRC desktop application to export the report and i am able to export it in PDF and other formats as mentioned in "ReportExportFormat" API.
    i would like to know is there any API there which can export the report in HTML format.
    i know it would be possible with web based application of JRC, but how can i do it in desktop application?

    There's no mechanism for static HTML pages that displays the report.
    You can use the CrystalReportViewer DHTML viewer, but that's 'interactive'.
    Sincerely,
    Ted Ueda

  • Export to exchange folder in HTML format not working

    Hi All
    I am trying to export report in HTML format directly to exchange folder and sending it as mail. I am using below code for it but it is not working for html format only. I am able to export other formats (rpt, pdf, word, excel...) using below snippet.
    Crazy thing is that it doesn't give any error or exception. It just ignores the code. It will great if someone can sneak in below code and point out what I am doing wrong.
    Dim destination As ExportDestination = ExportDestination.ExchangeFolder
    Dim options As New HTMLFormatOptions
    options.HTMLFileName = "report1.rpt"
    options.HTMLBaseFolderName = System.IO.Path.GetTempPath()
    ExportToExchangeFolder(format, options)
    Private Sub ExportToExchangeFolder(ByVal format As ExportFormat, ByVal options As ExportFormatOptions)
        Dim myExchangeOpts As ExchangeFolderDestinationOptions = ExportOptions.CreateExchangeFolderDestinationOptions()
        Dim myExportOpts As New ExportOptions
        myExchangeOpts.DestinationType = ExchangeDestinationType.ExchangePostDocMessage
        myExchangeOpts.Profile = "Outlook"
        myExchangeOpts.FolderPath = "[email protected]#Drafts"
        myExportOpts.ExportDestinationOptions = myExchangeOpts
        myExportOpts.ExportDestinationType = ExportDestinationType.ExchangeFolder
        myExportOpts.ExportFormatType = ExportFormatType.HTML32
        myExportOpts.ExportFormatOptions = options
        report.Export(myExportOpts)
    End Sub

    Hi Saurabh,
    The logic does not make sense.... Open a report up in CR Designer and export to HTML, notice it creates a few folders and a bunch of files, depending on the options you select.
    It's not one file so what you should do is export to disk, use a third party API set to zip up the files and folders and then e-mail the zip file to the server/user.
    Actually what you should do is not give the users that option, PDF works for viewing through a browser so use it, easiest way to do this.
    And because you are attempting to send HTML through E-mail there are all sorts of security issues sending that format and lots of permissions required. Best to avoid it.
    Don

  • Please help -  How to export HTML file into MS word format

    How to export HTML file into MS word file without any change
    in design format?
    As I have been trying to do that but problem is coming in
    formating. Table's witdth and height get disturbed in MS word when
    I import the html file.
    What I do after creating HTML in dreamweaver I save that file
    into .txt format in dreamweaver. and then import it in MS Word. And
    I tried too much for it but invain.
    Please help me in finding the way of solution.
    Please help me as my job is in trouble. It's very urgent
    pleeease help me. I'll be thankful to you.

    Just open the HTML file in Word.
    Walt
    "apollo321" <[email protected]> wrote in
    message
    news:gavbhd$6j4$[email protected]..
    > How to export HTML file into MS word file without any
    change in design
    > format?
    >
    > As I have been trying to do that but problem is coming
    in formating.
    > Table's
    > witdth and height get disturbed in MS word when I import
    the html file.
    >
    > What I do after creating HTML in dreamweaver I save that
    file into .txt
    > format
    > in dreamweaver. and then import it in MS Word. And I
    tried too much for it
    > but
    > invain.
    >
    > Please help me in finding the way of solution.
    >
    > Please help me as my job is in trouble. It's very urgent
    pleeease help me.
    > I'll be thankful to you.
    >

  • How can i export animations in html format?

    i made some animations with indesign 5.5
    Can i export these animations in html format?
    thanks

    You can try to export your selected animations as Flash CS5 Professional format and then convert them to HTML5 animations with
    -free flash plugin http://www.google.com/doubleclick/studio/swiffy/ (there´s online converter for testing)
    -Flash Professional CS6 which can export HTML5
    Then you can continue wotking with them in HTML5 editor like Edge....

  • Disc viewer  10.1.2.48.18 export in html format

    Hi,
    i want to export query result on html format but i can't find this option.
    Any Help?
    Thanks in advance
    lukx

    Hello
    Are you using Desktop or Plus? If you are using Plus I strongly recommend you upgrade from 10.1.2.48.12 as that is an awfully buggy version and I would not be surprised if it is doing some odd things.
    10.1.2.2 and 10.1.2.3, patched appropriately to the latest cumulative patch, are much better.
    I just tried on my PC in Plus on 10.1.2.3 and from the File menu is an option called Export to HTML. What this does is create an HTM file in my Documents and Settings folder and then launches another browser window to display the results.
    I also tried it in Desktop and it exported an HTM file into the place where I told it to do so.
    Best wishes
    Michael

  • In what character format does CS5 Export HTML?

    In what character format does indesign export html?
    I am having trouble writting a parsing script because text that looks like:
    of mutations to particular “hotspot” regions
    becomes, to my chagrin,
    of mutations to particular “hotspot� regions
    Here is my java code that simulates this problem. Perhaps somebody knows which encoding to choose on Windows 7 pro x64?
        public static int CopyFile()
            try
            StringBuffer sb = null;
            String NullSpace = System.getProperty("line.separator");
            //Writer output = new BufferedWriter(new FileWriter(outputFile));
            BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile),"UTF-8"));
            String line;
            BufferedReader input =  new BufferedReader(new FileReader(myFile));
            while((line = input.readLine())!=null)
                    sb = new StringBuffer();
                    //Parsing happens
                    sb.append(line);
                    output.write(sb.toString()+NullSpace);
                return 0;
            catch (Exception e)
                return 1;

    This particular line is the culprit (a case of What You Ask Is What You Get, really a rarity):
    BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile),"UTF-8"));
    -- and what you see is UTF-8 Encoding in action (rather, what you see with a non-UTF-8 aware text editor).
    Check the Javascript Tools Guide, section "File- and Folder-supported encoding names", for an encoding that better suits your needs. Actually, you might want to check the generated HTML file -- UTF8 is a perfectly acceptable character encoding, but you have to tell your browser it is this one.
    Alternatively, you can always check the string buffer text for any character codes (which are Unicodes) above 126 and replace these with the universal "&#xxx;" notation for out-of-range character codes.

  • Export or package a DPS folio file to a html format

    Can you export or package a DPS folio file to a html format, packed with all of the images? Thank you for letting me know

    Thank you for letting me know Neil. Is it possible to export the DPS Folio File to any other format than .folio, which could be accessible for someone who doesn't have InDesign or an Adobe account?
    Thank you for your help!
    Fanny

  • How i prevent text converting into image when exporting as a HTML FORMAT IN ADOBE FIREWORKS?

    ]I am an architect and wants to design my basic website with minimum graphics.
    I am using coreldraw for graphics design but it is related to print (Hardcopies) and corel is not smart soft compared to adobe software.
    So, for web design, I started to learn Fireworks. After some practice, i m able to design web graphics in fireworks.
    But the main problem is that, when that page is exported into html format. All text were converted into Image and it is not useful.

    Fireworks was devdeloped to use with Dreamweaver. It's not a stand alone app for developing web pages. Adobe Muse might be more the kind of app you are looking for. First, however, Give this tutorial a try.
    http://www.adobe.com/devnet/fireworks/articles/css_export_rectangles.html

  • Exporting data from a html format into database

    Hello:
    Maybe someone can help me. I wrote a Test Stand program and save the test results in the html format everyone liked be able to access the data thru a web page but now we want to save the data to a database witch I was able to do. I need import the files save in html to the database. Does any knows how to do this or at least convert into a .txt or .csv format

    Hey Toro,
    Unfortunately there is no utility that will parse your HTML format files into your DataBase. This is primarily because the report files don't have all the information that is stored in the database. The data stored in the database is quite complex. So you might have to resort to manually inserting the fields, although this process is quite tedious. Also you cannot really convert your HTML files into .csv file, just because once a report is created TestStand doesn't know what data fields of the HTML file is important or not.
    I'll place a product suggestion over to R&D to maybe look into creating a utility for our future releases.
    SijinK
    National Instruments

  • How to make a background in a report exported in html format

    Hi every body,
    i made a report using ireport in the design phase and jasperReport 1.3.1 api to generate the report in html format, the problem is that i can't see the background when i run the application :(
    so how to display the background in the html report ?
    tahnks in advance.

    Hi Nav,
    You can create a lov using the APEX_ITEM.SELECT_LIST in report query. http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_item.htm#insertedID12
    For e.g.
    http://apex.oracle.com/pls/otn/f?p=50942:63
    Thanks,
    Manish

  • Jasper Report in HTML format

    Hi
    When I try to open the jasper report on browser ,It displays
    the report but not clear.The image does not display on the client.
    below is my code ,please help me......
    MY Code:
    /*3 Preview in HTML format */
    File imagedir=null;
    JRHtmlExporter exp = new JRHtmlExporter();
    StringBuffer sbuf = new StringBuffer();
    exp.setParameter(JRHtmlExporterParameter.JASPER_PRINT, print);
    exp.setParameter(JRHtmlExporterParameter.OUTPUT_STRING_BUFFER, sbuf);
    exp.setParameter(JRHtmlExporterParameter.IMAGES_DIR,imagedir);
    exp.exportReport();
    out.print(sbuf.toString());
    Thanks
    By sathesh

    Alright there is a dedicated ImageServlet(provided in jasper reporting framework) which is used to Link Static image content along with your HTML report content.
    and here is how you have to do it is ??
    is by setting few parameters for JRExporter Object and making use of image servlet provided under jasper libraries.
    ImageServlet configurations in web.xml:
    <servlet>
            <servlet-name>ImageServlet</servlet-name>
            <servlet-class>
                net.sf.jasperreports.j2ee.servlets.ImageServlet
            </servlet-class>
    </servlet>
    <servlet-mapping>
            <servlet-name>ImageServlet</servlet-name>
            <url-pattern>/imageServlet</url-pattern>
    </servlet-mapping>Html Exporter code..
    JRExporter exporter = null;
    JasperPrint jasperPrint = null;
    Connection conn = null;
    String sourceFile = ReportService.getReportSourceFile(request);
    Map map = ReportService.getParameterMap(sourceFile,request);
    String contentType = ReportService.getContentType(sourceFile,request);
    if(contentType.startsWith("text/html")){
    PrintWriter printWriter = response.getWriter();
    try{
       /* Fetching Connection from a Connection Pool VIA a service*/
      conn = DbUtils.getConnection();
      /* Creating a JasperPrint Object*/
      jasperPrint = JasperFillManager.fillReport(sourceFile,map,conn);
    exporter = new JRHtmlExporter();                          
      request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint);
       /* printWriter here is a reference for  response.getWriter() */
      exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_WRITER,printWriter);                  
      // gonna set url pattern given for Image servlet with a reponse parameter <url-pattern>/imageServlet</url-pattern> 
      exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"imageServlet?image=");              
       response.setContentType(contentType);
       /* Would write the HTML content to ServletStream Provided */
      exporter.exportReport();
    }catch(Exception exp){
         exp.printStackTrace();
    }finally{
      try{
         if(conn != null && !conn.isClosed())
           conn.close();
      }catch(Exception ep){
         ep.printStackTrace();
      }finally{
           conn = null;
           sourceFile = null;
           map = null;
    }For any other issues with report format and others try to go through my post.However, you might have to edit your customized settings in terms of image rendering problems or to some customized implementations.
    http://forum.java.sun.com/thread.jspa?threadID=5203324&messageID=9811077
    Hope that might help :)
    REGARDS,
    RaHuL

  • Scheduling deski report to html format fails

    We're running boxi 3.1 SP4 on a Linux redhat machine. When scheduling a deski report to html format to unmanaged disk, the report stays in processing state for 10 minutes and then it goes to failed state with error "Object failed to run due to an error while processing on the Job Server" . Additionally I get the message "The scheduler component failed the object identified by <jobnumber>. The job associated with the object was unresponsive."
    Scheduling to other formats works fine. I have tracing on but there's not any hint in the logfiles. The htm file and it's subdirectories are created on the temporary location /data/procSched/<name>.DesktopIntelligenceJobServer but it's not copied to the configured destination. It is not an issue with permissions, the server has write permissions to the directory.

    Hi Clive,
    since your are in XI R2 you can only try to modify the layout of your report. In XI 3.x a new feauture was introduced, which allows the user to choose between keeping the layout or facilitating further processing in Excel when exporting a document in Excel.
    Regards,
    Stratos

  • How to send program output as  mail in HTML format

    Hi Friends,
    I have a BDc which runs in background and its been Stored in my system and displayed as HTML format.
    My requirement is now i want that Same HTML file which i am displaying to be sent as a mail in HTML format itself..Kindly help me on this
    Thanks in advance
    kishore

    Hi,
    Below sample program might give you idea on sending HTML attachment.
    TYPES: BEGIN OF t_sal_ord,
               vbeln TYPE vbeln_va,
               posnr TYPE posnr_va,
               auart TYPE auart,
               vkorg TYPE vkorg,
               matnr TYPE matnr,
             END OF t_sal_ord.
      DATA: i_sal_ord TYPE STANDARD TABLE OF t_sal_ord,
            i_header TYPE STANDARD TABLE OF w3head,
            i_fields TYPE STANDARD TABLE OF w3fields,
            i_html TYPE STANDARD TABLE OF w3html,
            wa_header TYPE w3head.
      DATA: i_fcat TYPE lvc_t_fcat,
            wa_fcat TYPE lvc_s_fcat.
      DATA: g_send_request TYPE REF TO cl_bcs,
            g_document TYPE REF TO cl_document_bcs,
            g_recipient TYPE REF TO cl_cam_address_bcs,
            g_cx_bcs TYPE REF TO cx_bcs,
            g_sent_to_all TYPE os_boolean.
      DATA: g_lines TYPE i,
            g_size TYPE so_obj_len.
      PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY,
                  p_mailad TYPE ad_smtpadr OBLIGATORY.
    START-OF-SELECTION.
      SELECT a~vbeln b~posnr a~auart a~vkorg b~matnr
        INTO TABLE i_sal_ord
        UP TO 20 ROWS
        FROM vbak AS a
        INNER JOIN vbap AS b
        ON a~vbeln  = b~vbeln
        WHERE a~vkorg = p_vkorg.
      wa_fcat-coltext = 'SalesOrd#'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Item#'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'OrdType'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Sales.Org'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Material'.
      APPEND wa_fcat TO i_fcat.
      LOOP AT i_fcat INTO wa_fcat.
        wa_header-text = wa_fcat-coltext.
        CALL FUNCTION 'WWW_ITAB_TO_HTML_HEADERS'
          EXPORTING
            field_nr = sy-tabix
            text     = wa_header-text
            size     = '2'
            fgcolor  = 'BLACK'
            bgcolor  = 'VIOLET'
            font     = 'CALIBRI'
          TABLES
            header   = i_header.
        CALL FUNCTION 'WWW_ITAB_TO_HTML_LAYOUT'
          EXPORTING
            field_nr = sy-tabix
            size     = '2'
            fgcolor  = 'BLACK'
            bgcolor  = 'WHITE'
            font     = 'CALIBRI'
          TABLES
            fields   = i_fields.
      ENDLOOP.
      wa_header-text = 'Sales Order Details'.
      wa_header-size = '2'.
      wa_header-font = 'CALIBRI'.
      CALL FUNCTION 'WWW_ITAB_TO_HTML'
       EXPORTING
    *     TABLE_ATTRIBUTES       = 'BORDER=1'
         table_header           = wa_header
    *     ALL_FIELDS             = 'X'
        TABLES
          html                   = i_html
          fields                 = i_fields
          row_header             = i_header
          itable                 = i_sal_ord.
      TRY .
          g_send_request = cl_bcs=>create_persistent( ).
          g_document = cl_document_bcs=>create_document(
                        i_type  = 'RAW'
    *                i_text  = i_content[]  " Body for Mail
                        i_subject = 'Sales Order Details' ).
          DESCRIBE TABLE i_html LINES g_lines.
          g_size = g_lines * 2 * 255.
          CALL METHOD g_document->add_attachment
            EXPORTING
              i_attachment_type    = 'HTM'
              i_attachment_subject = 'Sales Order Details'
              i_attachment_size    = g_size
              i_att_content_text   = i_html[].
          g_send_request->set_document( g_document ).
    g_recipient = cl_cam_address_bcs=>create_internet_address( p_mailad ).
          g_send_request->add_recipient(
             EXPORTING
               i_recipient = g_recipient
               i_express = 'X' ).
          g_send_request->set_send_immediately( 'X' ).
          g_send_request->send(
              EXPORTING
                i_with_error_screen = 'X'
              RECEIVING
                result = g_sent_to_all ).
          COMMIT WORK.
        CATCH cx_bcs INTO g_cx_bcs.
          WRITE:/ g_cx_bcs->error_type.
      ENDTRY.
    Kind Regards
    Eswar

  • Trying to export html to dreamweaver but save images as pngs.

    I'm designing a floating site.  My workflow is PS=====>Fireworks====>Dreamweaver.  I made a navbar in FW with a transparent background and exported html to dreamweaver.  I inserted the fireworks htm, put it online and it looks terrible.  You can see it here:
    http://www.njtraininggrounds.com/thirddaydesign.com/identity.html
    Don't worry about the portfolio button, I know what's going on there.  But I can't figure out why there is "stairstepping" on the logo and on all the navbar buttons.  This is the first time I've ever created a floating site.  I just put a jpeg for repeat using the dreamweaver css, and then inserted the rest in a table. I got some good replies in dreamweaver forums, but they all centered around saving the images when you export as pngs or as transparent gifs with a green matt.  How can I do this with fireworks cs3?
    Could anyone give me an idea of what I'm doing wrong?  Thanks so much.
    Wil

    The GIF format supports only one value of transparency. Your text, when anti-aliased against whatever background in Fireworks (transparent?), probably looks fine. When you export, though, you lose the smooth transition. (If you zoom in, you can see the blending of text to background and that's what you're losing.)
    You have two options.
    You can still use the GIF format. Just pick a green value out of your background image and use that for your canvas. Then, when you export, set that color to transparent. Where the pixels of the text and that color blend for the anti-aliasing, you'll have opaque pixels, but they'll look all right against your background image.
    Use a PNG8, which is an indexed palette like the GIF, but it supports semi-transparent colors. When you go to export, you may want to add more colors using the eye dropper tool, as FW doesn't quite pick out all the values it might for a smooth image. See this article:
    http://blogs.sitepoint.com/2007/09/18/png8-the-clear-winner/
    (I like exporting through File>Image Preview, myself.)

Maybe you are looking for

  • FTP  receiver adapter does not transfer (STORE) file

    Hello gurus, In my scenario I want to transfer files from server X to server Y using FTP. To get the files from server-X I use the FTP sender adapter, to put the files on server-Y I user the FTP receiver adapter. Getting the file (QoS = EOIO) is not

  • How can i create my own component

    hello all, how can i create my own componet, say for example i want to create my own JTextField. give me links, or give me a examples thanks daya

  • How to initialize the Sample app in Planning 11.1.2.2

    Hi, After creating the sample application in Planning 11.1.2.2, how to initialize it.

  • WebDynpro and Google integration question

    Hi all, I saw some tutorials and discussion on the topic of integration of WebDynpro with Google Maps. But my question is: Has any of you tried to integrate Google docs (for example a spreadsheet) into WebDynpro for Java? If yes, can you please give

  • Flash/Authorware programmer needed

    I have a large Authorware CBT that I'm converting to Flash. I'm looking for former Authorware programmers who have migrated to Flash and would be interested in helping out. It's a paying gig that will last at least a month, totally virtual office. If