Migrating C1Report to FlexReport

Posted by: piacopetti on 23 January 2019, 5:30 pm EST

    • Post Options:
    • Link

    Posted 23 January 2019, 5:30 pm EST

    Thanks to this forum, I have been able to solve many of the startup issues with this process.

    However, I have reached problem I cannot seem to solve via research. My reports are actually very simple, but they contain a series of subreports that can be conditionally displayed. From my application the subreports are populated on the fly from a DataTable.

    VB.NET Code that adds the two fields to a subreport:

    Private Sub AddParameterToReportInStyle2(

    ByRef subReport As Field,

    ByVal strLabelKeyword As String,

    ByVal strValueKeyword As String,

    ByVal intTop As Integer)

      Dim txtfldAdd As TextField
    
      Try
         ' Add the prompt as the label
         txtfldAdd = New TextField()
         With txtfldAdd
            .Name = "lbl" & strValueKeyword
            .Text.Expression = strLabelKeyword
            .Left = REPORT_LEFT_COLUMN_PROMPT
            .Top = intTop
            .Width = REPORT_LEFT_COLUMN_PROMPT_WIDTH_STYLE2
            .Height = 500
            .Align = FieldAlignEnum.LeftMiddle
            .WordWrap = False
         End With
         subReport.Subreport.Fields.Add(txtfldAdd)
    
         ' Add the value in a column to the right of the label
         txtfldAdd = New TextField()
         With txtfldAdd
            .Name = "txt" & strValueKeyword
            .Text.Expression = strValueKeyword
            .Left = REPORT_LEFT_COLUMN_VALUE_LEFT_STYLE2
            .Top = intTop
            .Width = REPORT_LEFT_COLUMN_VALUE_WIDTH_STYLE2
            .Height = 500
            .Align = FieldAlignEnum.LeftMiddle
            .WordWrap = False
         End With
         subReport.Subreport.Fields.Add(txtfldAdd)
      Catch ex As Exception
         m_erh.HandleErrors(g_sfkState, ex)
      End Try
    

    End Sub

    The subreports are populated properly with the parameter data (“Fields” are added dynamically), however the subreports are overlapping instead of moving down with the resizing.

    My initial C1Report report was set with GrowShrinkMode set to C1Report, but I’ve tried it set to Access and it made no difference.

    All subreports are set to “CanGrow”.

    My original FlexReports were converted from C1FlexReportDesigner.

    An example of one of my FlexReports is attached, along with a populated output saved to PDF.

    I thought I had tried everything, but I obviously missing something as the C1Report version worked just fine.

    Thanks,

    -Paul-

  • Posted 24 January 2019, 5:51 am EST

    Hi Paul,

    there are not attachments…

    Best regards

    Wolfgang

  • Posted 24 January 2019, 5:57 am EST

    Hi Paul,

    Can you please zip the attachments and share again?

    ~Pragati

  • Posted 24 January 2019, 10:23 am EST

    Sorry, missed the bit about zips only.

    I have also included a PDF output from the original C1Report, to show what it should look like.

    Lastly, I had added a border around the subreport to highlight the fact that the size is not increasing.FlexReportProblem.zip

  • Posted 25 January 2019, 1:39 am EST

    Hello Paul,

    Thanks for sharing the files.

    This issue is generally observed when the Top property of certain fields is not properly set. This leads to the fields overlapping each other.

    To check the same, we modified your report and added a few static fields in the subreports (see the attachment). Everything worked smooth and no overlapping was observed. There is a chance that some property value needs to be checked from your application. Thus, we would need your report with data and thus, we request you to share your stripped down sample through SupportOne: https://supportone.componentone.com. This will help us investigate the issue further.

    Regards,

    Esha

    SetupPress3_mod.zip

  • Posted 25 January 2019, 5:51 pm EST

    I have created a very simple example project and report to illustrate this issue.

    I have a clearer understanding of what the problem is, but am unsure if FlexReport is intended to work this way, as C1Report had.

    The Case ID number in SupportOne is 364234, if it is not apparent.

  • Posted 28 January 2019, 5:02 am EST

    Thanks, Paul.

    We have responded on the S1 ticket. Kindly follow the same to avoid confusion.

    Regards,

    Esha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels