Возникла потребность собрать в одной ячейке таблицы результаты подзапроса - строковые через запятую.
Среди доступных функций ничуго не нашел - добавил свой метод в отчет
Код: Выделить всё
private string AllRecordsToString()
{
string result = "";
JobCandidates.Connect();
int rowCount = JobCandidates.Rows.Count;
//return rowCount.ToString();
for (int i = 0; i < rowCount; i++)
{
Stimulsoft.Report.Dictionary.StiRow row = JobCandidates.Rows[i];
result += row["CandidateName"].ToString() + ((i == rowCount -1) ? "" : ", ");
}
return result;
}
сегодня же при попытке просмотра отчета выдает ошибку:
----------------------------
[General Info]
Framework: v2.0.50727
Version: Version: 2010.1.632 from 22 February 2010
OSVersion: Microsoft Windows NT 5.1.2600 Service Pack 3
----------------------------
[Exception Info]
Message: Unable to cast object of type 'Stimulsoft.Report.Components.StiContainer' to type 'Stimulsoft.Report.Components.Table.StiTable'.
Source: Stimulsoft.Report
StackTrace:
at Stimulsoft.Report.Components.Table.StiTableCell.set_CanGrow(Boolean value)
at Stimulsoft.Report.Components.StiComponentDivider.BreakContainer(Double maxAllowedHeight, StiContainer renderedContainer)
at Stimulsoft.Report.Engine.StiBreakableHelper.Break(StiContainer originalContainer)
at Stimulsoft.Report.Engine.StiBreakableHelper.ProcessBreakable(StiContainer container)
at Stimulsoft.Report.Engine.StiEngine.InternalRenderContainer(StiContainer container, Boolean isPrintAtBottom, Boolean isFooterOnAllPages)
at Stimulsoft.Report.Engine.StiEngine.RenderContainer(StiContainer container, Boolean isPrintAtBottom, Boolean isFooterOnAllPages)
at Stimulsoft.Report.Engine.StiEngine.InternalRenderBand(StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents)
at Stimulsoft.Report.Engine.StiEngine.RenderBand(StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents)
at Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderBand(StiDataBand masterDataBand, StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents)
at Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderMaster(StiDataBand masterDataBand)
at Stimulsoft.Report.Components.StiDataBand.RenderMaster()
at Stimulsoft.Report.Engine.StiPageHelper.RenderPage(StiPage page)
at Stimulsoft.Report.Engine.StiRenderProviderV2.RenderReport(StiReport report, StiReport masterReport, StiRenderState state)
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render(Boolean showProgress)
at Stimulsoft.Report.Design.Controls.StiDesignerPreviewControl.btRefresh_Click(Object sender, EventArgs e)
Stimulsoft.Base, Version = 2010.1.632.0
Stimulsoft.Controls.Win, Version = 2010.1.632.0
Stimulsoft.Report, Version = 2010.1.632.0
Stimulsoft.Report.Design, Version = 2010.1.632.0
Можно чтонибуть посоветовать как с этим бороться.
Или может есть другой способ , чем мой велосипед?