Group spacing is different between designer and program
I created a report. Ran it. Looks good.
I ran the report from within my program. Spacing for groupings is off (too much)
Code in program
mCustomFastReport.Load(Application.StartupPath & "\Reports\" & "SoapNote1.frx")
End If
Try
' mCustomFastReport.Report.SortReportTitle.Text = arrLines(0) & arrLines(1) ' pick up the headers
mCustomFastReport.Dictionary.Connections(0).ConnectionString = mConnectionString
mCustomFastReport.Dictionary.Connections(0).Delete()
mCustomFastReport.RegisterData(FBusinessObject, "SoapNote")
mCustomFastReport.GetDataSource("SoapNote").Enabled = True
Dim titleText As New FastReport.TextObject
titleText = mCustomFastReport.Report.Pages(0).FindObject("SoapReportTitle")
titleText.HtmlTags = True
titleText.Text = arrLines(0) & arrLines(1)
Dim groupHeaderBand As New FastReport.GroupHeaderBand
groupHeaderBand = mCustomFastReport.Report.Pages(0).FindObject("GroupHeader1")
groupHeaderBand.Condition = "[SoapNote.SoapGroup]"
Dim groupText As New FastReport.TextObject
groupText = mCustomFastReport.Report.Pages(0).FindObject("txtGroupHeaderText")
groupText.Text = "SoapNote.SoapGroup"
' create data band
Dim dataBand As New FastReport.DataBand
dataBand = mCustomFastReport.Report.Pages(0).FindObject("Data1")
dataBand.DataSource = mCustomFastReport.GetDataSource("SoapNote")
Dim txtSoapLine As New FastReport.TextObject
txtSoapLine = mCustomFastReport.Report.Pages(0).FindObject("txtData")
txtSoapLine.Text = "[SoapNote.SoapLine]"
I have attached frx and fpx
Roger
I ran the report from within my program. Spacing for groupings is off (too much)
Code in program
mCustomFastReport.Load(Application.StartupPath & "\Reports\" & "SoapNote1.frx")
End If
Try
' mCustomFastReport.Report.SortReportTitle.Text = arrLines(0) & arrLines(1) ' pick up the headers
mCustomFastReport.Dictionary.Connections(0).ConnectionString = mConnectionString
mCustomFastReport.Dictionary.Connections(0).Delete()
mCustomFastReport.RegisterData(FBusinessObject, "SoapNote")
mCustomFastReport.GetDataSource("SoapNote").Enabled = True
Dim titleText As New FastReport.TextObject
titleText = mCustomFastReport.Report.Pages(0).FindObject("SoapReportTitle")
titleText.HtmlTags = True
titleText.Text = arrLines(0) & arrLines(1)
Dim groupHeaderBand As New FastReport.GroupHeaderBand
groupHeaderBand = mCustomFastReport.Report.Pages(0).FindObject("GroupHeader1")
groupHeaderBand.Condition = "[SoapNote.SoapGroup]"
Dim groupText As New FastReport.TextObject
groupText = mCustomFastReport.Report.Pages(0).FindObject("txtGroupHeaderText")
groupText.Text = "SoapNote.SoapGroup"
' create data band
Dim dataBand As New FastReport.DataBand
dataBand = mCustomFastReport.Report.Pages(0).FindObject("Data1")
dataBand.DataSource = mCustomFastReport.GetDataSource("SoapNote")
Dim txtSoapLine As New FastReport.TextObject
txtSoapLine = mCustomFastReport.Report.Pages(0).FindObject("txtData")
txtSoapLine.Text = "[SoapNote.SoapLine]"
I have attached frx and fpx
Roger