Majorsilence Reporting 26.0.8

3 hours ago

Majorsilence Reporting 26.0.8 is a patch for the 26.0 line. A bordered rectangle now grows with the subreport inside it, the embedded designer stops stalling in hosts like WPF, and three runtime packages move past known vulnerabilities. One viewer change needs a line of code in some apps.

Ask about this presentation

Chapters

  1. 0:00Majorsilence Reporting 26.0.8
  2. 0:21A Rectangle grows with its subreport
  3. 0:45GetRdlText no longer stalls
  4. 1:09Export right after OpenFile
  5. 1:27Loading is not an edit
  6. 1:47Packages with known vulnerabilities
  7. 2:09Await EnsureRendered before reading PageCount
  8. 2:31Upgrade to 26.0.8
Show transcript
  1. Majorsilence Reporting 26.0.8 is a patch for the 26.0 line. A bordered rectangle now grows with the subreport inside it, the embedded designer stops stalling in hosts like WPF, and three runtime packages move past known vulnerabilities. One viewer change needs a line of code in some apps.

    Slide text
    MRMajorsilence Reporting
    26.0.8

    Rectangles grow with their subreports.
    The embedded designer stops stalling.

    $ dotnet add package Majorsilence.Reporting.RdlEngine --version 26.0.8
  2. Here's a bordered rectangle around a subreport that grows. In 26.0.7 the border drew as a thin strip at the top, and the item below it printed over the subreport. Now the rectangle stretches to the subreport's last item, the way SSRS does. The border and background follow it down, and the item below keeps its gap. A rectangle whose contents fit keeps its height.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    A Rectangle now grows with the subreport inside it

    report.pdf 26.0.7
    Subreport starts
    Subreport ends
    Item below
    The border stays at its designed height.
    report.pdf 26.0.8
    Subreport starts
    Subreport ends
    0.15 in gap
    Item below
    The border follows the subreport down.
    rectangles designer security viewer upgrade
  3. If you embed the designer control in your own app, this one looked like a hang. On the Design tab, GetRdlText read a setting that only the stand-alone designer has. The exception showed a message box with no owner window, which a WPF host can hide, and then returned an empty string. The read is now null-safe, and the message box belongs to the control.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    GetRdlText() no longer stalls in an embedded designer

    GetRdlText() called on the Design tab
    →
    NullReference­Exception RdlDesigner is null when the control is embedded
    →
    Message box no owner window, so a WPF host can hide it
    →
    returns "" after what looks like a hang
    RdlDesign/DesignCtl.cs 26.0.8
    NewLineChars = RdlDesigner?.XmlNewLine == NewLineChar.Unix ? "\n" : "\r\n",
    MessageBox.Show(this, ex.Message, Strings.DesignCtl_Show_UnableCreateRDL);
    rectangles designer security viewer upgrade
  4. The preview viewer only received the report when someone opened the Preview tab. So an app that called OpenFile and then exported or printed straight away used the old report. Print and SaveAs now hand the preview the current report first, edits included, so you export the report you opened.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    Export straight after OpenFile exports the report you opened

    Host.cs in
    designer.OpenFile(path);
    await designer.SaveAsAsync("out.pdf",
        OutputPresentationType.PDF);
    →
    out.pdf out
    26.0.7
    whatever report the preview had before
    26.0.8
    The report you just opened
    rectangles designer security viewer upgrade
  5. Loading a second report used to leave the editor marked as modified, with the previous report still on its undo stack. Now every load resets both. There's also a new RdlChanged event on the designer control. It fires when the user edits the report and stays quiet on a load, so your app can track unsaved changes.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    Loading a report no longer
    marks it as modified

    Modified after a load
    false
    Undo history after a load
    empty
    new on RdlUserControl 26.0.8
    designer.RdlChanged += (s, e) =>
        UpdateTitle(designer.Modified);
    rectangles designer security viewer upgrade
  6. This release also updates packages with known vulnerabilities. Microsoft's SQLite package moves from 8.0.4 to 8.0.32, and the two cryptography packages, for PKCS and for XML, each move up one patch release. Testcontainers moves too, but only the test projects use it.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    Three runtime packages move past known vulnerabilities

    Package26.0.726.0.8
    Microsoft.Data.Sqlite8.0.48.0.32
    System.Security.
    Cryptography.Pkcs
    8.0.18.0.2
    System.Security.
    Cryptography.Xml
    8.0.48.0.5
    Testcontainers.*test projects only4.13.04.16.0
    rectangles designer security viewer upgrade
  7. This is the one change that can break existing code. PageCount, PageHeight and four other viewer properties used to force the report to load. They blocked while it rendered on a pool thread, and that could hang the app. Now they return zero or the default until the report renders. If you read them, await EnsureRendered on the viewer first. The viewer's own print button already does.

    Slide text
    MRMajorsilence Reporting
    v26.0.8

    Await EnsureRendered() before you read PageCount

    PageCount PageHeight PageWidth ShowParameterPanel ReportDescription ReportAuthor
    26.0.7 blocks
    int pages = viewer.PageCount;
    // rendered on a pool thread first
    26.0.8 returns 0 until rendered
    await viewer.EnsureRendered();
    int pages = viewer.PageCount;
    rectangles designer security viewer upgrade
  8. To upgrade, move your Majorsilence Reporting packages to 26.0.8. First, check any code that reads PageCount or the other viewer properties before the report renders. It needs an await on EnsureRendered. And if you load rdlnative from another language, it now finds the HarfBuzz library in its own folder, the same way it finds SkiaSharp. That's 26.0.8: rectangles that grow with their subreports, and an embedded designer that stops stalling.

    Slide text
    MRMajorsilence Reporting
    v26.0.8
    terminal in
    $ dotnet add package Majorsilence.Reporting.RdlEngine --version 26.0.8
    Check viewer code first Before reading PageCount and the other getters, add await viewer.EnsureRendered()
    rdlnative finds HarfBuzz libHarfBuzzSharp now resolves from the library's own directory, like SkiaSharp
    github.com/majorsilence/Reporting/releases/tag/v26.0.8
    rectangles designer security viewer upgrade

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️