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>
39 lines
1.6 KiB
XML
39 lines
1.6 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net6.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<RootNamespace>pwa_pdf_service</RootNamespace>
|
|
<AssemblyName>pwa_pdf_service</AssemblyName>
|
|
<InvariantGlobalization>false</InvariantGlobalization>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="FastReport.Core" Version="2021.3.0" />
|
|
<PackageReference Include="PdfSharpCore" Version="1.3.65" />
|
|
<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)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Include="..\pwa_api\wwwroot\documents\**\*" Link="wwwroot\documents\%(RecursiveDir)%(Filename)%(Extension)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Include="..\pwa_api\Fonts\**\*" Link="Fonts\%(RecursiveDir)%(Filename)%(Extension)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
</Project>
|