FR3 to FRX

Hi,

I have FR3 reports created with VCL 5 that I want to use with .NET. They all point to an explicit DataSet, from Delphi. I ran the fr3tofrx.exe conversion. I can open the FRX file in Visual Studio and edit it as an XML. fr3tofrx.exe does not convert the DataSet. What changes do I need to make to the FRX to point it to the .NET data source?

Thanks,

David

Comments

  • edited February 2019
    push dataset from .net winforms/wpf => report.RegisterData(dataSet);

    and the frx file will automatically add :
      <Dictionary>
        <TableDataSource Name="Employees" ReferenceName="Data.Employees" DataType="System.Int32" Enabled="true">
          <Column Name="ID" DataType="System.Int32"/>
          <Column Name="Name" DataType="System.String"/>
        </TableDataSource>
      </Dictionary>
    

    fr.net internally process :
    1. TableDataSource => push datatable/dataset to fastreport, or
    2. BusinessObjectDataSource => push bussiness object or array to fastreport
  • edited 10:03PM
    The original FR3 report has a dataset call "fsData"
    If I call report.RegisterData(dataSet); or report.RegisterData(dataSet, "fsData");
    I get errors that "(fsDataBillCity): Error CS0103: The name 'fsData' does not exist in the current context." The same thing happens if I manually add the dictionary to the FRX file. Do I need to change something else?

    Thanks.

    ipong wrote: »
    push dataset from .net winforms/wpf => report.RegisterData(dataSet);

    and the frx file will automatically add :
      <Dictionary>
        <TableDataSource Name="Employees" ReferenceName="Data.Employees" DataType="System.Int32" Enabled="true">
          <Column Name="ID" DataType="System.Int32"/>
          <Column Name="Name" DataType="System.String"/>
        </TableDataSource>
      </Dictionary>
    

    fr.net internally process :
    1. TableDataSource => push datatable/dataset to fastreport, or
    2. BusinessObjectDataSource => push bussiness object or array to fastreport
  • edited 10:03PM
    you have to match between
    1. in data source : TableName.FieldName, and
    2. in textobject : [Employees.ID] => tablename = Employees and fieldname = ID
  • edited 10:03PM
    My FR3 looks like this:
    <Datasets>
        <item DataSet="fsData" DataSetName="fsData"/>
      </Datasets>
    
    <TfrxMemoView Name="fsDataInvoiceNumber" Left="105.6" Top="0" Width="86.4" Height="19.2" DataField="InvoiceNumber" DataSet="fsData" DataSetName="fsData" Font.Charset="1" Font.Color="-16777208" Font.Height="-12" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[fsData."InvoiceNumber"]"/>
    

    How should I rewrite that for FRX?
    <Dictionary>
        <TableDataSource Name="fsData" ReferenceName="fsData" DataType="System.Int32" Enabled="true">
          <Column Name="InvoiceNumber" DataType="System.String"/>
        </TableDataSource>
      </Dictionary>
    
    <TextObject Name="fsDataInvoiceNumber" Left="105.60" Top="0" Width="86.40" Height="19.20" Font="Arial, 9pt" Text="[fsData.InvoiceNumber]" Padding="2, 1, 2, 1" HorzAlign="Left" VertAlign="Top" TextFill.Color="0, 0, 0"/>
    

    Is that correct for the DataSource? Do I need to changed the properties on the TextObject?

    Thanks,

    David


    ipong wrote: »
    you have to match between
    1. in data source : TableName.FieldName, and
    2. in textobject : [Employees.ID] => tablename = Employees and fieldname = ID
  • edited 10:03PM
    correct, take a look at fr.net demo
          // create simple dataset with one table
          FDataSet = new DataSet();
    
          DataTable table = new DataTable();
          table.TableName = "Employees";
          FDataSet.Tables.Add(table);
    
          table.Columns.Add("ID", typeof(int));
          table.Columns.Add("Name", typeof(string));
    
          table.Rows.Add(1, "Andrew Fuller");
          table.Rows.Add(2, "Nancy Davolio");
          table.Rows.Add(3, "Margaret Peacock");
    
          // create report instance
          Report report = new Report();
    
          // register the dataset
          report.RegisterData(FDataSet);
    
          // enable the "Employees" datasource programmatically. 
          // You can also do this in the "Report|Choose Report Data..." menu.
          report.GetDataSource("Employees").Enabled = true;
    
          // design the report
          report.Design();
    

    and the frx file
      <Dictionary>
        <TableDataSource Name="Employees" ReferenceName="Data.Employees" DataType="System.Int32" Enabled="true">
          <Column Name="ID" DataType="System.Int32"/>
          <Column Name="Name" DataType="System.String"/>
        </TableDataSource>
      </Dictionary>
      <ReportPage Name="Page1">
        <DataBand Name="Data1" Top="74.15" Width="718.2" Height="18.9" DataSource="Employees">
          <TextObject Name="Text1" Width="94.5" Height="18.9" Text="[Employees.ID]"/>
          <TextObject Name="Text3" Left="103.95" Width="198.45" Height="18.9" Text="[Employees.Name]"/>
        </DataBand>
      </ReportPage>
    
  • Where can I Download fr3tofrx.exe, could you help me please.

  • I cannot download that please help me! :)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.