Deserialize into the shared C# model so master/detail bands render
Templates like report_3.frx use FastReport BusinessObjectDataSource with nested datasources (e.g. abnormally_high_water_levels_report contains abnormally_high). FastReport discovers the nested list by reflecting on the C# type — register a flat DataTable and the inner band stays empty, which is why customers saw 26-page PDFs with the master headers but no detail rows. Pull the report DTOs into the sidecar via cross-project Compile Include from pwa_api/Modules/Report/Models, take a typeName field in the request, deserialize JSON into the same concrete type, and call RegisterData with the typed list — so reflection sees the same shape it always did. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,13 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Share the report DTO classes with pwa_api so the sidecar deserializes
|
||||
JSON into the same concrete types. FastReport reflects on those types
|
||||
to find nested List<T> properties (master/detail bands). -->
|
||||
<ItemGroup>
|
||||
<Compile Include="..\pwa_api\Modules\Report\Models\report_*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- FastReport templates and fonts shared from main API -->
|
||||
<None Include="..\pwa_api\wwwroot\reports\**\*" Link="wwwroot\reports\%(RecursiveDir)%(Filename)%(Extension)">
|
||||
|
||||
Reference in New Issue
Block a user