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-