Programmatically adding a Word Document or PDF to a crystal report

I am using Crystal XI for windows.  I have a VB.Net windows application that I am trying to insert a Word Document and/or PDF into.  I want to programmatically be able to add any file(s) to a crystal report.  Is there any sample code or guidance that can show me how to programmically add a file to a report?
In the user interface, the user can click on unlimited number of PDFs, Word Documents... to insert into a Crystal Report.  Is this possible?   If so, please show steps and some sample code how to do this.
Kind Regards,
Jeff

In this example, the ReportAppFactory gets initialized with the instance from the session object... If I am doing this in windows (not a web application), how would this change it if this is a windows application with no session object?
I am connecting against an  ADO.Net (XML) file on the same computer - no connection information required... I just want to open the report file, SetDataSource to a dataset ...then do the other stuff in the example.  I think after I get past connecting to the data and opening the report, the rest of working with sections and adding ole objects I can get from the examples.  All of the sample code that I found are web based and don't show how to connect if you are windows based - not over a web page.
I am not using a CMS or anything web / network based... I just want to connect to a local XML file that was generated from Visual Studio .Net 2005.   The example below is one of the Crystal Samples... they are all web based samples.  ...I am looking for a windows based sample to see how to connect and open a report file.
Example:
        If Not (Session("boEnterpriseSession") Is Nothing) Then
            boEnterpriseSession = CType(Session("boEnterpriseSession"), CrystalDecisions.Enterprise.EnterpriseSession)
        Else
            'Log on to the Enterprise CMS
            boSessionMgr = New CrystalDecisions.Enterprise.SessionMgr
            boEnterpriseSession = boSessionMgr.Logon(Request.QueryString.Item("username"), Request.QueryString.Item("password"), Request.QueryString.Item("cms"), Request.QueryString.Item("authtype"))
            Session.Add("boEnterpriseSession", boEnterpriseSession)
        End If
        'get report object from session or create a new report object
        If Not (Session("boReportClientDocument") Is Nothing) Then
            boReportClientDocument = CType(Session("boReportClientDocument"), CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument)
        Else
            boEnterpriseService = boEnterpriseSession.GetService("", "InfoStore")
            boInfoStore = New CrystalDecisions.Enterprise.InfoStore(boEnterpriseService)
            boReportName = "SimpleRCAPIReport.rpt"
            'Retrieve the report object from the InfoStore, only need the SI_ID for RAS
            boQuery = "Select SI_ID From CI_INFOOBJECTS Where SI_NAME = '" + boReportName + _
             "' AND SI_Instance=0"
            boInfoObjects = boInfoStore.Query(boQuery)
            boInfoObject = boInfoObjects(1)
            boEnterpriseService = Nothing
            'Retrieve the RASReportFactory
            boEnterpriseService = boEnterpriseSession.GetService("RASReportFactory")
            boReportAppFactory = CType(boEnterpriseService.Interface, CrystalDecisions.ReportAppServer.ClientDoc.ReportAppFactory)
            'Open the report from Enterprise
            boReportClientDocument = boReportAppFactory.OpenDocument(boInfoObject.ID, 0)
            'First determine where to add - in this case the details Area
            boArea = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea
            'Create the new section object
            boSection = New CrystalDecisions.ReportAppServer.ReportDefModel.Section
            'Set the properties for the section
            boSection.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail
            boSection.Name = "Detail2"
            boSection.Height = 1000
            boSection.Width = 11520
            'Now add the section
            boReportClientDocument.ReportDefController.ReportSectionController.Add(boSection, boArea, -1)
            'Add the reportClientDocument to session
            Session.Add("boReportClientDocument", boReportClientDocument)
        End If
Thanks,
Jeff
Edited by: Jeff Dressing on Aug 20, 2008 10:48 AM

Similar Messages

  • How to embed the Word Document and PDF file into Crystal report?

    How to embed the Word Document and PDF file into Crystal report?
    I have word doc which having 10 pages. I need to show all of the 10 pages at a time. I tried OLE object but problem is it shows only one page.
    Is there any solution to show word doc / PDF file in CR?

    Symptom :
    When embedding a pdf document into a Crystal Report, only the one page shows.
    Reproducing the Issue
    Environment:
    Crystal Reports OLE object
    Cause
    An OLE object only displays the first page.
    Resolution
    Embed multiple objects, one for each page
    Or
    Use a hyperlink to the object instead
    Hope this helps!
    Regards,
    Vinay

  • After installing Mavericks I can no longer save a new word document or pdf by typing the name of the destination folder in the Finder window.  The save button greys out.  Solutions anyone?

    After installing Mavericks I can no longer save a new word document or pdf by typing the name of the destination folder in the Finder window.  The save button greys out.  Solutions anyone?

    Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in 10.8 there is only one. If you're running a version older than 10.8, this comment isn't applicable.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder—not just its contents—to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window.
    This action will delete any custom Mail stationery that you have created. If you want to preserve it, ask for instructions.
    If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:
    ~/Library/Containers/com.apple.MailServiceAgent
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • I'm having a problem saving a pages document as another format, like a Word document or PDF file.  I've never had this problem in the past.  Please help me!  I need to have this fixed a.s.a.p.

    Hello everyone,
    I'm currently having a problem saving a Pages document as another format, such as a Word document or PDF file.  I've never had this problem before with Pages.  Please help me!  I need to have this completed a.s.a.p.
    Thanks,
    Amy

    To save as a PDF, you do that from Print
    To save as Wrod format, you export
    Allan

  • Acrobat 11 Standard Office 2010 Pro Convert Word documents to PDF not working

    Adobe community,
    I can create PDF's inside Word 2010 using the Acrobat Add-in but right clicking a Word document or dragging a Word document into Adobe Acrobat 11 Standard does not work. I have updated both Acrobat 11 and Office 2010 with the latest updates available. Any suggestions would be greatly appreciated.

    Hi markl16215442,
    In order to convert word document to PDF by right-clicking or dragging the file, you must have Adobe PDF printer installed.
    For Windows, please check that Adobe PDF is set as default printer under "Start > Devices and Printers"
    While for MAC, Adobe PDF printer option is no more available and as it was removed with some changes in Apple's policy regarding virtual printers.
    So, check with your OS and then let me know.
    Regards,
    Anubha

  • Convert word document in PDF,e pub,by using third party dll in Sharepoint designer workflow 2013?

    Hi,
    I want to convert word document to PDF,  EPub, by using third party (.dll).
    In SharePoint designer workflow in 2013.
    So that I have question, Can we Install third party (.dll) in SharePoint workflow Designer for conversion?
    Means I have created one simple application conversion of word to e Pub, PDF, Image by using (Spire.doc dll) in Visual Studio.
    So this same conversion I want to work in SharePoint designer workflows?
    So anybody has any solution then please provide me.
    Thanks,
    Samadhan

    it might be worth looking at these CodePlex steps, that plug directly into the Word Automation Services.
    http://sp2010wordautomation.codeplex.com/
    It'll provide you with a configurable step like the below that should help you achieve your aims
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • How do I access Adobe from Word to convert a word document to pdf?

    How to I access an Adobe command in Word to convert a Word document to pdf?

    Certain versions of Word will have an Adobe PDF menu in the ribbon, which allows you to convert the Word file you're viewing to a PDF directly, maintaining all the links, bookmarks, destinations, etc. in it.
    The other option is to use the PDF Printer and print the Word document to a PDF. This will result in a "flat" copy of the file, without any of the meta-elements described above. Basically the same as printing it out, only you use a virtual printer that generates a PDF file.

  • Merging word document with pdf file how do you renumber pages?

    After merging a word document with pdf file, how do you renumber pages?  The pdf has more pages than the word document.  I first converted the word document to a pdf, using Acrobat Standard 9.

    Hi Petek ,
    After you merge the files or combine files ,click on the Page Thumbnails panel on the left hand side.
    In the Page Thumbnail panel ,right click and you will get a drop down list .Select the option "Number Pages".
    You will see a dialog box with several options .You can renumber the pages from there as per your requirement.
    Regards
    Sukrit Dhingra

  • Have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,.  Has anyone had this happen and if so what is the fix?

    have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,.  Has anyone had this happen and if so what is the fix?

    Is it possible to post a sample page some place for us to try out (dropbox or acrobat.com)? Is your Acrobat updated? What version of WORD are you using?

  • Convert word document to PDF file in SAP

    Hello experts,
    I've been searching around to get some code examples to upload a word document and convert it into a PDF file and then store it in unix. I hope one of you can help me, because many explanations and threads exist, but I did not get wiser reading them...
    I don't want to use 3rd party tools to do the conversion, but do it directly in SAP with abap coding and if necessary spool processing.
    System details:
    SAP ECC 6.0 (unicode system)
    SAP_ABA     700     0014     SAPKA70014     Cross-Application Component
    SAP_BASIS     700     0014     SAPKB70014     SAP Basis Component
    Thanks in advance!
    Regards,
    Danny

    Hi,
    You can get the spool no from transaction SP01 and later use this spool no to convert the word document to PDF
    using the function module CONVERT_OTFSPOOLJOB_2_PDF and give the import parameter as ur spool id.
    once the doc gets converted to PDF u can use CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    to get the path where the file is to be saved and later give the path to function module GUI_DOWNLOAD to download the file.
    or else u can manually execute the following reports:
    RSTXPDFT4  (give the spool no. as input)
    RSPO0068  (give the word doc with its full path as input)
    Hope that helps u
    Regards,
    Radhika

  • How to convert a word document to pdf

    How do I convert a word document to pdf

    Hi dionel33514362,
    You can use either Adobe PDF Pack or Acrobat to convert Word documents to PDF.
    Adobe PDF Pack is an online service, which allows you to upload files and convert them to PDF via a web interface.
    See Acrobat Help | Create PDFs with Acrobat for information about creating PDF files in Acrobat. If you don't have Acrobat, please feel free to give it a try. You can download the free 30-day trial from the Acrobat link I mentioned above.
    Please let us know if you have additional questions.
    Best,
    Sara

  • How to upload a word document or pdf file to xk02 transaction

    hi all,
    i want to upload a word document or pdf file to xk02 trasaction
    please suggest me how todo this
    Thanks
    RAM

    Hi Pradeep,
    For creating PDF documents in Webdynpro Java you can use  "iText.jar" .
    to know more about creating PDF using iText refer these links.
    http://www.brothersoft.com/downloads/itext-jar.html
    http://www.lowagie.com/iText/download.html
    Regards
    Sridhar

  • How do I retain Microsoft Word hyperlinks (internal to the Word document) in pdf export?

    How do I retain Microsoft Word hyperlinks (internal to the Word document) in pdf export? I lose them in process. Using Word 2011 (14.4.3) and Mavericks. Have tried importing to Pages 5.2 and exporting, but that does not work either.

    If you don't get an answer here, search/ask in the forums devoted entirely to MS stuff by its maker.  These forums are for the Apple app Pages.
    http://answers.microsoft.com/en-us/mac/forum/macword

  • Problems converting Word documents to  PDF

    I am having trouble converting Word documents to PDF files. Whenever I try to convert the file, I receive the following error message: Missing PDFMaker files. Do you want to run the installer in repair mode? When I run the installer in repair mode, I still receive the same message. I have Adobe Acobat Professional 8 and MS Office 2007 installed on my PC.

    Cannot delete or repair Adobe Acrobat Professional 6.0, nor access original disk since "accidently" using a registry repair program. I have used system restore to no avail.
    The following scenarios occur when trying to "change/remove" Adobe program/updates:
    Attempt to Uninstall:
    Adobe Acrobat/Reader 6.0.6 Update
    WINDOWS INSTALLER window:
    The feature you are trying to use is on a network resource that is unavailable.
    Click OK to try again, or enter an alternate path to a folder containing installation package Adobe Acrobat and Reader 6.0.6 Update.msi in the box below.
    C:\Program Files\Adobe\{9074E407-55DC-4A4C-A591-6ADA60386EF4}\
    Click Okay and appears--
    ADD OR REMOVE PROGRAMS window:
    The installation source for this product is not available. Verify that the source exists and that you can access it.
    Attempt to Uninstall:
    Adobe Acrobat/Reader 6.0.5 Update
    WINDOWS INSTALLER window:
    The feature you are trying to use is on a network resource that is unavailable.
    Click OK to try again, or enter an alternate path to a folder containing installation package Adobe Acrobat and Reader 6.0.6 Update.msi in the box below.
    C:\Program Files\Adobe\{490A4339-AFA5-4098-A374-7752A1A30308}\
    Click Okay and appears--
    ADD OR REMOVE PROGRAMS window:
    The installation source for this product is not available. Verify that the source exists and that you can access it.
    Attempt to Uninstall
    Adobe Acrobat/Reader 6.0.1 Professional
    ADD OR REMOVE PROGRAMS window:
    This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
    Anyway to recover functionality to remove/change (uninstall/repair)?
    I also am unable to access the original disc now. WINDOWS INSTALLER window:
    This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
    Any help available?

  • How to automate the generation of several Word documents into PDF?

    I want to generate in batch processes the conversion from Word documents into PDF. Could you tell me how?
    Thank yoou.

    Thank you for your answers.
    But I would like to launch a batch to generate PDFs and I don't find any explanation in the Adobe documentation telling how to do.
    Do you have any idea?

Maybe you are looking for

  • Mini DP to VGA or Mini DP to DVI?

    I need to connect my MacBook (late 2008) to my AOC Fovi F22 display. The display has VGA and DVI inputs. The display resolution is 1920x1080 Full HD. 1. Which one is the more sensible choice? DVI perhaps? 2. I hear that people are facing issues with

  • Material Code with Different profit Centers in One Plant

    Hi Experts, There is one requirement in my project that given in detailed below please: Material code                     Plant                       Profit Center MSR009                            2011                       2011                     

  • Windows Vista and Shuffle 2

    I have been succesfully running the second Beta release of Vista. My I tunes works well with my existing Mini. However I just bought a Shuffle2 and I am unable to transfer music to it. I keep getting a message "unknown error 1418" I also get the othe

  • Empty Photos app, but 3.8GB in Photo Library

    All photos and videos that used to be in the Photos app on my iPad mini (iOS 8.1.2, 16 GB) have been deleted; both the "Camera Roll" and "Recently Deleted" albums are empty. This was confirmed by a separate Photo Transfer App. However, in the setting

  • AM SDK Install Problem - Two server config

    I am using the 2005Q4 release of JES on Solaris 10 zones. I have ds, web, and AM on first zone (zldap) and I have web, and the sdk installed on the second zone (zmail). No problems with the zldap appliations. The zldap apps start and run without issu