[WORKAROUND] Displaying BLOB in SUBHEAD does not work in MRE
All
we've got a problem with SQL Server BLOBs in SUBHEADs when outputting to PDF.It works fine when displaying the BLOB in a PRINT statement, but that way the report gets very long since an image displays on every line, even thourg there is a "real" picture in say 10% of the rows.
SQL SQLMSS PREPARE SQLOUT FOR SELECT TOP 50 T1.[GUID], T1.[Is Image Present], T1.[Image Data] FROM table T1 END
-* This code does not work when proc in MRE TABLE FILE SQLOUT PRINT Is_Image_Present AS '?' Image_Data BY GUID ON GUID SUBHEAD " " " " WHEN Is_Image_Present EQ 1 ON TABLE PCHOLD FORMAT PDF ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=SUBHEAD, IMAGE=(Image_Data), POSITION=(5.15 +0.024), SIZE=(0.4 0.4), $ ENDSTYLE END -* This does work TABLE FILE SQLOUT PRINT Is_Image_Present AS '?' Image_Data BY GUID ON TABLE PCHOLD FORMAT PDF ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=DATA, COLUMN=Image_Data, IMAGE=('Image_Data'), SIZE=(0.4 0.4), $ ENDSTYLE END
The weird thing is that both version do work when running from an app on the server.
We're on SQL Server 2005.
Any idea?
Tia HåkanThis message has been edited. Last edited by: Håkan,
I found a workaround. Still displaying the BLOB on every single line, but if is_image_present = 0 I resize the image to the smallest possible size. That way it fitted the height of every line.