Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FastReport.Base/Engine/ReportEngine.Bands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void AddToOutputBand(BandBase band, bool getData)

try
{
PrepareBand(band, getData);
PrepareBand(band, getData);

if (band.Visible)
{
Expand Down
2 changes: 1 addition & 1 deletion FastReport.Base/PictureObjectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public override void Assign(Base source)
PictureObjectBase src = source as PictureObjectBase;
if (src != null)
{
ImageLocation = src.ImageLocation;
imageLocation = src.ImageLocation;
DataColumn = src.DataColumn;
ImageSourceExpression = src.ImageSourceExpression;
Padding = src.Padding;
Expand Down
9 changes: 9 additions & 0 deletions FastReport.Base/Preview/PreparedPages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ public int Count
get { return preparedPages.Count; }
}

/// <summary>
/// Gets the XML for rendering the outline of the report
/// </summary>
public XmlItem OutlineXml
{
get => outline.Xml;
}

/// <summary>
/// Specifies an action that will be performed on <see cref="AddPage"/> method call.
/// </summary>
Expand Down Expand Up @@ -559,6 +567,7 @@ public void Load(Stream stream)
XmlItem outline = doc.Root.FindItem("outline");
Outline.Xml = outline;


XmlItem blobStore = doc.Root.FindItem("blobstore");
BlobStore.LoadDestructive(blobStore);

Expand Down
25 changes: 24 additions & 1 deletion FastReport.Core.Web/Controllers/DesignerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public DesignerController() : base()
{
msg = webReport.Designer.SaveMethod(webReport.ID, webReport.ReportFileName, report);
}
catch(Exception ex)
catch (Exception ex)
{
code = 500;
msg = ex.Message;
Expand Down Expand Up @@ -115,6 +115,29 @@ public DesignerController() : base()
{
return MakeConnectionString();
});

RegisterHandler("/designer.objects/mschart/template", () =>
{
string result;
var resourceName = Request.Query["name"].ToString();
var stream = ResourceLoader.GetStream("MSChart." + resourceName + ".xml");

try
{
result = new StreamReader(stream).ReadToEnd();
}
catch(Exception ex)
{
return new NotFoundResult();
};

return new ContentResult()
{
StatusCode = (int)HttpStatusCode.OK,
ContentType = "application/xml",
Content = result
};
});
}

#endregion
Expand Down
2 changes: 1 addition & 1 deletion FastReport.Core.Web/FastReport.Web.Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<ItemGroup>
<None Include="..\Pack\frlogo192.png">
<Pack>True</Pack>
<Visible>false</Visible>
Expand Down
4 changes: 2 additions & 2 deletions FastReport.Core.Web/Templates/outline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ string template_outline()
if (!Outline)
return "";

if ((Report.Engine?.OutlineXml?.Count ?? 0) == 0)
if ((Report.PreparedPages?.OutlineXml?.Count ?? 0) == 0)
return "";

var outline = new StringBuilder();
BuildOutline(outline, Report.Engine.OutlineXml, true);
BuildOutline(outline, Report.PreparedPages.OutlineXml, true);

return $@"
<div class=""{template_FR}-outline"">
Expand Down