hi telerik,
i have a grid with one row and one column. this column has a html data.. tables, images and etc..
but one of the image comes from database ( for security reasons )
when i open grid, i can see image in grid but when i want to pdf export there is an error about this image path..
System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.
as you can see '/async/display.ashx?id=1043' streams image from db.
sample code;
Error ;
System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.
at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
at System.Web.HttpServerUtility.MapPath(String path)
at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
thanks for your help..
i have a grid with one row and one column. this column has a html data.. tables, images and etc..
but one of the image comes from database ( for security reasons )
when i open grid, i can see image in grid but when i want to pdf export there is an error about this image path..
System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.
as you can see '/async/display.ashx?id=1043' streams image from db.
sample code;
<telerik:RadGrid ID="grvSchedules" runat="server" Width="100%" CssClass="GridVClass" |
AutoGenerateColumns="False" AllowPaging="True" GridLines="None" PagerStyle-AlwaysVisible="false" |
OnItemCommand="grvSchedule_ItemCommand" OnItemDataBound="grvSchedule_ItemDataBound" |
OnNeedDataSource="grvSchedule_NeedDataSource" OnItemCreated="grvSchedule_ItemCreated" |
HorizontalAlign="Left"> |
<ExportSettings IgnorePaging="true" ExportOnlyData="true"> |
<Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="Client Schedule" /> |
</ExportSettings> |
<PagerStyle Mode="NumericPages" AlwaysVisible="False"></PagerStyle> |
<MasterTableView Width="100%" DataKeyNames="RecId" CellSpacing="1" PageSize="20"> |
<Columns> |
<telerik:GridTemplateColumn> |
<ItemTemplate> |
<table width="800px"> |
<colgroup> |
<col /> |
<col /> |
</colgroup> |
<tr> |
<td style="color: White;"> |
[Fax]<br /> |
</td> |
<td> |
</td> |
</tr> |
<tr> |
<td> |
<img alt="" src="/Images/abc.png" /> |
</td> |
<td> |
</td> |
</tr> |
<tr> |
<td> |
[DateToday] |
</td> |
<td> |
</td> |
</tr> |
<tr> |
<td> |
[COMPANY] |
</td> |
<td>ClientName] </td> |
</tr> |
<tr> |
<td> |
<img alt="" src="/Images/abc_sign.png" /> |
</td> |
<td> |
<img alt="" src="/display.ashx?id=1043" /> |
</td> |
</tr> |
<tr> |
<td> |
[Name] |
<br /> |
Executive Vice President |
</td> |
<td>[Principal]<br />[Title] |
</td> |
</tr> |
<tr> |
<td style="font-size: smaller;" colspan="2"> |
<br /> |
[Descriptions] |
</td> |
</tr> |
<tr> |
<td colspan="2" style="color: White;"> |
@# |
</td> |
</tr> |
</table> |
</td> |
</tr> |
</table> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings> |
<Selecting AllowRowSelect="True" /> |
</ClientSettings> |
<AlternatingItemStyle Font-Size="X-Small"></AlternatingItemStyle> |
<ItemStyle Font-Size="X-Small"></ItemStyle> |
</telerik:RadGrid> |
Error ;
System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.
at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
at System.Web.HttpServerUtility.MapPath(String path)
at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
thanks for your help..