Programatically set ole object image path

Hi to all,
I'm using Visual Studio 2005, Asp.net 2.0-C# and CR 11 Sp2.
In my rpt file i added one ole object as bitmap i want to pass the data(image path) to this bitmap by programtically how to do this? Experts please help me

Hello, Winseelan;
If you are using Crystal Reports XI R2 (11.5) SP2 or later you can do this programatically using the 'Graphic Location' conditional formula.
To do this, perform the following steps:
1. Open the report in the Crystal Reports Designer.
2. Create a formula called "Location" that contains a temporary path string to an image file. For example, "C:\Images\Image1.jpg".
3. Right-click the image on the report and click 'Format Graphic'. The 'Format Editor' dialog box appears.
4. In the 'Picture' tab, click the 'Graphic Location' conditional formula button. The Format Formula Editor appears.
5. Call the "Location" formula from this conditional formula.
6. Save changes to the report.
7. In your application, you can now change the location of the image file at run time, by modifying the text in the "Location" formula programmatically using the following code:
myReport.DataDefinition.FormulaFields.Item("Location").Text = "C:\Images\Image2.jpg"
You can now view the image successfully when previewing your report in the application.
Elaine

Similar Messages

  • Setting Image Path

    Hi,
    Merry Easter to All of You!..
    i am facing a problem in setting the dynamic image path in crystal report
    the path is stored in Database field,and physical images are stored in a folder
    the path specified is relative path and works fine when the report is run directly , but it seems that the report runs in temp folder when called from vb.net windows application.
    hence the relative path specified w.r.t to database field fails when called from application.

    Download SP 0 for CR 2008 from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100007528552008E/cr2008_sp0.zip
    Next, see [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note on how to work with image in Crystal Reports.
    Ludek

  • Dynamically set image path

    Hello all,
    I've created a XFA Dynamic form that imports a number of records from one of our local databases. One of these fields is the path to an image. I would like to set an image field to that url... or, better still, embed the image into the .pdf form itself.
    Everything that I've read has told me that the only way to do so is to set the image field's raw value to a base64 string representation of that image. This isn't an option, as I have no way to convert that image to base64.... unless I can do so via SQL or javascript. I've been trying to do this for a few days with no luck.
    I figure that I'm not the only one who has had this porblem. I was hoping that someone out there has developed a solution that they would be willing to share. I'd appreciate any help that anyone might be able to offer. Thanks =)
    - Scott

    Hi there,
    Thanks for your reply. The URL field is useful only to set a default image path. under the binding tab, when I bind the image to the url from a data connection, the url is displayed as text within the image field. No image appears.
    The only solution that I've found online is to somehow get the image converted to base64... the issue is that the only technologies that I have available to me are SQL or javascript... neither of which were designed to convert images to base64.
    Does onyone know where I can find a javascript function to convert an image to base64?
    - Scott

  • Ole object not visible on oracle report

    Hi,
    I have an oracle report built in oracle report 6i builder I have used a Boilerplate OLE Object(image.bmp) in the report but when I am executing the report on Oracle E Business(Application) then that OLE object is not visible on the report output(output is in the pdf format).
    Please help me out with this
    Thanks in advance

    If you want to display an image on your report, use Link File as item type in the Layout Editor.
    Note that the image has to be accessable from the Reports Server.

  • The Picture of OLE object  in the report  can't be printed, and how to sovle dynamic OLE object based on path

    <p>Hi, everybody,</p><p>  I have a problem which the picture in the report can&#39;t be printed.</p><p>I want to display some pictures  in the reports and print them.So I insert the picture as OLE object, select the graph format and set graph location fomular with the path of the picture which is stored in the local machine. I run the system and generate the report,  the picture is displayed correctly in the report, but when i print the report using ie&#39;s tool, the picture is gone and replaced with a little red mark. </p><p>I want to use the new feature of dynamic graph location about  the  crystal report xi version, but I don&#39;t know where I should put the picture into on the web server and what the path is . Because my web server is installed in the another machine.</p><p>I check the view source of html report and  find that the system searches the picture under  the crystalreportviewer11 folder on the web server.</p>

    Need to give the web server access to the folder

  • Image path sets ( servername) instead of \\servername

    Due to a hardware meltdown I have had to rip the NW server out of the tree
    and install a new one.
    I have re-installed the server NW65sp8 and reinstalled ZENworks for Desktops
    7
    Now, When I set an imaging job on a workstation I browse to the server etc
    and set the file path.
    When I click apply or ok leave the object and go back in the path has
    changed;
    eg
    (ZFDSRVSR) USER\zenimg\ws_master.zmg
    instead of
    \\ZFDSRVSR\USER\zenimg\ws_master.zmg
    Any ideas on how I fix this?
    Manual imaging works ok. I have deleted the ws object and re imported into
    eDir
    Tom

    I have resolved this.
    >>> On 21/07/2010 at 12:54 p.m., in message
    <[email protected]>,
    Tom Cummings<[email protected]> wrote:
    > This is turning out to be serious ant not server related. I installed a
    > new
    > ZFD7 server into a new container. Setting an image path on using that
    > server reproduces the same problem.
    >
    > Help! :‑(
    >
    >
    >
    >>>> On 20/07/2010 at 9:07 AM, in message
    > <[email protected]>,
    > Tom Cummings<[email protected]> wrote:
    >> Due to a hardware meltdown I have had to rip the NW server out of the
    >> tree
    >> and install a new one.
    >>
    >> I have re‑installed the server NW65sp8 and reinstalled ZENworks for
    >> Desktops
    >> 7
    >>
    >> Now, When I set an imaging job on a workstation I browse to the server
    >> etc
    >> and set the file path.
    >>
    >> When I click apply or ok leave the object and go back in the path has
    >> changed;
    >>
    >> eg
    >>
    >> (ZFDSRVSR) USER\zenimg\ws_master.zmg
    >>
    >> instead of
    >>
    >> \\ZFDSRVSR\USER\zenimg\ws_master.zmg
    >>
    >> Any ideas on how I fix this?
    >>
    >> Manual imaging works ok. I have deleted the ws object and re imported
    >> into
    >> eDir
    >>
    >> Tom

  • Display byte array image or ole object in Section through dynamic code?

    To Start I am a Complete Newbe to Crystal Reports. I have taken over a project originally written in VS2003 asp.net using SQL Server 2005 and older version of Crytal Reports. I have moved project to VS2010 and Cryatal Reports 10 still using SQL Server 2005. Have multiple reports (14 to be exact) that display data currently being pulled from database suing a dataset, each report has from 4 to 14 Sections. I have modified database table with two new fields. Field1 contains string data with full path to a scanned document (pdf or jpeg). Field2 holds a byte array of the actual image of the scanned document. I have tested the database and it does infact contain the byte array and can display the image via VB.net code. I can make the report display the scanned image using ole object.
    Now my real question: I need to add a new Section and it should display either the byte array of the scanned image or the actual scanned image (pdf or jpeg) . How can I have it do either of these options via code dynamicly while application is running?

    First; only CRVS2010 is supported on VS2010. You can download CRVS2010 from here;
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Developer Help files are here:
    Report Application Server .NET API Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_api_en.zip
    Report Application Server .NET SDK Developer Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_dg_en.zip
    SAP Crystal Reports .NET API Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip
    SAP Crystal Reports .NET SDK Developer Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip
    To add the images, you have a number of options re. how to. You even have two SDKs that y ou can use (RAS and CR).
    Perhaps the best place to start is with KB [1296803 - How to add an image to a report using the Crystal Reports .NET InProc RAS SDK|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233393336333833303333%7D.do]. The KB describes how to add images to a report using the InProc RAS SDK, but also references other KBs that use CR SDK.
    Also, don't forget to use the search box in the top right corner of this web page.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • I would like to create a custom datagridview column containing text images and MS Word OLE objects

    I am an old time LabView programmer going back to 2.0.  But moved on with my career several years ago.  But here I am back attempting a custom column in dataviewgrid control.  .NET is hard.  My goal is to read in an MS Word document and parse it out to a custom column.  The column will contain regular old text, images and MS Word objects, sometimes called OLE objects.
    There is scant information on creating .NET and labview when it comes to form manipulation.  I have stuggled through the learning curve and now able to insert a text box column into a datagridview and add it to the form container and actually size it to the datagridview control.  I've added a menu, but still figuring out the layout class.  Did I say .NET is hard?
    I know there must be a custom column created and even found a C# example, sorta.  Trouble is the example uses easy stuff like override and private.  It will take me another 3 weeks for that, darnit I'm getting lazy.
    Does anybody out there have some example of a custom column in the datagridview?
    If you ask to post code.  I have nothing I would be proud to show.
    The sorta go by: http://www.codeproject.com/Articles/31823/RichTextBox-Cell-in-a-DataGridView

    This is what the progress looks like so far.  I broke the tasks down in sub VIs.  One to create a custom cell so I can add it to the column CellTemplate.  The other to add the column to the control.  My limited knowledge of .NET and the implementation in LV causes me to question the value of LV .NET.
    The coding to create a TextBoxCell override with ImageCell CellTemplate.  Honestly I'm guessing what to do, because the LV documentation on inheritance and overriding is poor at best.
    The column coding to add the cell to the custom column.
    Probe 19 always comes up with an error.  The error is the standard 1172 with no clue what is causing it.  The "index" will work on 0 or 1, I suspect bc the two cell types are 0 and 1 but nothing tells me that, just guessing.

  • Retrieving an image stored as OLE Object in the Ms Access database

    I stored an image as an OLE Object in Ms Access Database so I want to retrieve it using java.I tried to get it using the getBlob method from the ResultSet but it didn't show up.I'm so confused i don't know what to do.Please anyone familiar with ma problem try to help me.

    try getBinaryStream() instead of getBlob()

  • Formatting OLE object to variable file paths.

    I am currently using the trial version (2008) of Crystal Reports...at least for the next 7 1/2 days!  I have worked through all my problems/questions except one.  I am trying to insert a SolidWorks drawing document as an OLE object (linked) & the file path for the SW drawing needs to vary by the part name.  I placed a column in my Excel worksheet titled "Drawing File" & have tried several different formats to point the OLE to the correct file.  Thus far I am successful only in showing the original file the OLE object was created with.  The file path is Z:
    Jesse\Crystal Reports Tests\9-15-2009\FILENAME.slddrw
    I've tried adding hyperlinks to my Excel document, & I've typed out the address to the letter, but I just can't seem to get it to work.  Can anyone offer a solution here?

    I got the format right from the start.  Crystal '08 simply would not link to a SolidWorks file as it will a JPEG file (or any other picture file).  So be warned...if you want a SolidWorks drawing to show on your Crystal Report, you MUST save it as a picture file, which as SolidWorks users know, puts EXTREME limitations on a super product since your drawings & models are dynamically related.

  • How to i add an image path with spry data set

    hi
    how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
    this is my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <banner width = "185" height = "400">
        <item>
            <image scr = "nui-panforte-recipe_01.jpg" ></image>
            <description>CHOC-COCONUT PANFORTE</description>      
            <text1>Try this delicious GLUTEN FREE Christmas treat</text1>
            <text2>CHOC-COCONUT PANFORTE</text2>
        </item>
    </banner>
    this is my HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="../../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr spry:repeat="ds1">
          <td>{image}</td>
          <td>{description}</td>
          <td>{text1}</td>
          <td>{text2}</td>
          <td>{text3}</td>
          <td>{text4}</td>
          <td>{link}</td>
          <td>{url}</td>
          <td>{target}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>

    It would be helpfull if you actually created an <img> tag to start with
    <img src="{image/@src}" />
    would work.

  • OLE objects linked to MS Word/MS Excel do not update in InfoView

    I am facing the following problem:
    - Embedded a Word document as linked OLE object into a crystal report and stored it to Enterprise repository.
    - When opening the report with CR Developer from my workstation, links are updated and changes made in the .doc file are reflected, the report is updated
    - However when displaying and refreshing the report in InfoView changes aren't reflected.
    The OLE link (type document) is set to update automatically. I tried to store the report to the enterprise repository with and without data. Yet no difference - no update in either case. Neither scheduling nor opening and refreshing the report in InfoView helps.
    I further inserted an OLE object linked to a bmp image, and for the image refreshing works, even in InfoView
    So am I doing something wrong?
    Some threads in this forum indicate that only OLE linked pictures (bmp, jpg) can be refreshed dynamically, e.g.
    [Dynamically change path to OLE file]
    Others indicate that it is also possible to dynamically refresh OLE objects linked to .doc, e.g.
    [Re: Link to Word document doesn't refresh when running from Infoview]
    - Is it at all possible to dynamically display the contents of .doc or .xls files in a CR when viewing and refreshing the report in InfoView (without the need to reopen and resave the report with CR Developer first) ?
    - We are using BOE XI3.1 SP3 and Crystal Reports 2008 SP3.  On the BOE server Crystal Reports Developer is not installed. Can this be a prerequisite for the OLE links to update in InfoView?
    - Any other suggestions?
    Thanks
    Konrad

    Hi Don,
    Thank you for the quick reply.
    - You say that this works in CR Designer. That's right. As described above, even I can open the report with CR Designer and the links are getting updated.
    - However if I do not reopen and resave the report with Designer ... if I just open and refresh the report in InfoView to get the updated information from the files ... changes are not shown. I face this problem ONLY with ole links to .doc and .exe. OLE links to image formats such as .bmp do work. WHY?
    My files are already stored locally to the BO server and the (changed) image files are read and updated from exactly this directory. But not the linked Excel and Word files...
    Thanks
    Konrad
    Edited by: Konrad Hartl on Jan 25, 2011 8:04 PM

  • Linked OLE Object on a Web Server

    I searched for the answer to this, and haven't found it.  If it's already been answered, and I missed it, I apologize.
    I have a report (several actually) that has a link to a MS Word document.  It was added to the report as an OLE object, type "Document", update "Automatic".  The location of the document is C:\Program Files\Common Files\AppName\BlahBlah.DOC.
    The report is installed in two places.  In one place, C:\Program Files\AppName\ , I have a winforms app that opens and displays it.  The report links dynamically and works like a champ.  Changes to the document appear in the report.
    The report is also installed to C:\inetpub\wwwroot\AppName\Reports.  There's a web app running there that prints the report.  It looks good, except it only shows the snapshot of the original document as it was when the report was created.  Changes to the .DOC are not appearing.
    I'm sure the problem is that the path to the document is in the C:\Program Files\ ...  directory which isn't in the web path of C:\inetpub\wwwroot\AppName.  Normally, a web server can only see the files in it's own directory tree, as that is it's root directory.
    When the document is originally added to the report, it won't let me set the link as "./Reports/BlahBlah.DOC".  That would solve the problem.  But it stores the full path, which isn't available to the web app.
    I'm sure theres something simple that I must do to make this work, but I haven't found a solution yet (perhaps because the answer is too simple).  Thanks in advance.
    Glenn

    Hi Glenn
    Please provide following information:
    1.Version of crystal reports(HELP>>About Crystal reports)
    2.Is crystal reports embedded in any other application
    3.What is your runtime environment(.NET,Java)
    4.Are you programatically modifying report(s).
    FYI -
    1.In crystal reports stand-alone application(XI Release 1,XI Release 2,CR 2008),user is able to insert a .doc and when the 'Link' checkbox is checked (while inserting the doc into the report),the changes are automatically reflected.
    2.As a test,you can create a new report (in any of the versions mentioned above)on Xtreme sample database(using odbc connection and the "Xtreme sample database 11.5" dsn),and insert an OLE object in the report.
    Thanks

  • Memory problem if OLE-object references to WMF files

    Hi there,
    I have a report with an OLE object containing WMFs.
    The graphic files are variable and their name is loaded from the database during runtime (path + filename).
    Running the report leads to 185 pages, each one containing a different WMF.
    If I preview the report in CR, everything looks fine.
    If I print the report, the OLE object / graphic is left empty....
    If I export the report to PDF (as an example) I get the error message 'memory full'. Reducing the data set to ~50, the PDF is created. But the pictures get resized (much bigger) and only parts are visible.
    The machine I'm using doesn't have any memory problems.
    The WM files are only 3 to 12 KB each.
    If I convert the WMFs to JPG and use these within the report it works...
    Problem with this: a loss of quality (it is necessary to stretch the pictures to certain size)
    Thanks in advance for any ideas!
    Susanne
    I'm using CR 2008 SP 3 on Windows 2003 Server

    Format the pictures outside of CR for best results.

  • OLE object not linking... is CR10.5 on VS2008

    Running Crystal Reports 10.5 which comes with VS2008
    i have inserted an OLE object and told the Insert object to Create From File - i then browse to the location of the BMP file and click on link
    I do NOT have Display as Icon checked
    the image does not show up - has the name of the image (Command Line)
    i've saved the report, closed the report and reopened it - there is NO updating links message
    and when i run the report, the image isn't displayed
    How do i get it to display the image and not the icon...
    this really shouldn't be this hard.

    Hello,
    Try adding the following line in <httpHandlers> section of web.config
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version= 10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    Thanks,
    Saurabh

Maybe you are looking for

  • 1st generation ipod 1GB replacement

    I have a 1st generation Ipod Nano 1GB Iunderstnd if i return it to apple they will replace it... some people have told me the replace it with a 5th or 6th generation ipod nano is this true.and ifit are they new or refurbished ones

  • Lightroom 5 adjustments not showing in Photoshop CC

    Until a few days ago, when I choose "Edit in Lightroom" my RAW files (NEF) would show up in Photoshop with the Lightroom adjustments (without a warning dialog), but somehow this changed. When I open an image in Photoshop from Lightroom it does not sh

  • I'm receiving an error message 7 (Windows error 127) while installing latest iTunes

    While installing the latest iTunes i'm receiving a message Error 7 (Windows error 127) please reinstall iTunes.

  • Help with installing a CHAT CLIENT/SERVER

    i cant seem to get my chatclient or chatserver to successfully connect to my server. even if i do a local host 127.0.0.1 thing it STILL says that it cannot connect. the server is a stand alone. is there a general place to install the compiled files?

  • Using non public callable API

    Hello All, I had a post before about using work incident API but nobody responded to me. Here is the link: https://forums.oracle.com/forums/message.jspa?messageID=10458788#10458788 Any way, I found out how should I find the incident reference . Actua