This project is read-only.

Images on Report

Aug 19, 2011 at 9:57 PM
Edited Aug 22, 2011 at 6:16 PM

On my report, the charts/header images are named C_169iT1_1 locally and linked as SRC="./images/C_169iT1_1".

They won't display.  So what I went ahead and did was:

(under the foreach streamid):

$result_png = $result_png.".jpg";  $StreamId = $StreamId.".jpg";

(right before displaying in my wrapper):

if ($new_images = preg_replace('/(\/images\/)((?!\.gif|\.jpg|\.jpeg|\.png).*?)("\/>)/i', '$1$2.jpg$3', $report)) {$report = $new_images;}

Then I'm terrible with regex apparently and the above doesn't work, so today I added the following to remove the .jpg on "/images/TogglePlus.gif.jpg"

if ($new_images = preg_replace('/src="[^"]+?(TogglePlus|ToggleMinus|unsorted|sortAsc|sortDesc)\.gif.jpg"/i', 'src="/images/$1.gif"', $report)) {
         $report = $new_images;}

This could easily break in the future.  Do all images come across as .jpg types, but without .jpg filetypes?  Seems weird that they'd come across without a filetype.  The documentation leads me to believe that it will display without a filetype?  Maybe this is just something w/ IIS?  I've never had anything like this.

I use IIS7/Windows 2008 Server R2 w/ 2008 Report Services (one express, one full).  If nothing else, maybe this may help someone else out.