For example, I have in reportviewer in a table that I show the following data, grouped by account:
But it turns out, that for each account (n accounts), above the row where the name of the account is n °, I want to add a row with a data of the previous balance of the account. For example:
I have the query to obtain the previous balance, but I do not know how to pass it in the yellow row to the corresponding account in reportviewer, I would like to know if anyone has any idea of how it could be done. I do not think it can be done with groups, or in any other way. I hope someone has some idea. So far, so I generate the report viewer:
public FileContentResult GetFileContentResultParametro(ReportParameter[] parametro, string nombreReporte, dynamic query, string nombreDataSource, String format, String deviceInfo, String fileDownloadName)
{
LocalReport report = new LocalReport();
report.ReportPath = HttpContext.Current.Server.MapPath("~/Reportes/" + nombreReporte);
report.DataSources.Clear();
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Value = query;
reportDataSource.Name = nombreDataSource_DataSet;
report.DataSources.Add(reportDataSource);
report.SetParameters(parametro);
report.Refresh();
String mimeType;
String encoding;
String filenameExtension;
String[] streamIds;
Warning[] warnings;
FileContentResult fileContentResult = new FileContentResult(report.Render(format, deviceInfo, out mimeType, out encoding, out filenameExtension, out streamIds, out warnings), mimeType);
fileContentResult.FileDownloadName = Path.ChangeExtension(fileDownloadName, filenameExtension);
return fileContentResult;
}
I hope I can find some solution. Greetings