0
votes

I try to use FastReport open source to build reports from data I'll provide to the report.

I've found what I want in the demos (https://github.com/FastReports/FastReport/tree/master/Demos/OpenSource/DataFromBusinessObject/DataFromBusinessObject)

In this demo, I see in the report file that a BusinessObjectDataSourceis used, which seems to be what I want to use.

However, I don't see a way to add this kind of source in the community designer. Do I need to add all of this manually ? Or is there a way to generate the needed markup ? I can't find the solution on their site.

1

1 Answers

3
votes

I found a way by making the needed xml by hand like this:

<BusinessObjectDataSource Name="Invoices" ReferenceName="Invoices" Enabled="true">
  <Column Name="Reference" DataType="System.String"/>
  <Column Name="Date" DataType="System.String"/>
  <Column Name="CompanyName" DataType="System.String"/>
  <Column Name="InvoiceEmail" DataType="System.String"/>
  <Column Name="VAT" DataType="System.String"/>
  <Column Name="Street" DataType="System.String"/>
  <Column Name="Number" DataType="System.String"/>
  <Column Name="City" DataType="System.String"/>
  <Column Name="ZipCode" DataType="System.String"/>
  <Column Name="Country" DataType="System.String"/>
  <Column Name="TotalPrice" DataType="System.Decimal"/>
  <Column Name="VATValue" DataType="System.Decimal"/>
  <Column Name="VATPercentage" DataType="System.Decimal"/>
  <Column Name="VATComment" DataType="System.String"/>
</BusinessObjectDataSource>

The only drawback is that I need to update this if my object changes (but at least is is working !)