Por ejemplo, tengo en reportviewer en un tabla que muestro los siguientes datos, agrupados por cuenta:
Pero resulta, que por cada cuenta(n cuentas), encima de la fila donde está el nombre de la cuenta n°, quiero agregar una fila con un dato del saldo anterior de la cuenta. Por ejemplo:
Tengo la query para obtener el saldo anterior, pero no se como pasárselo en la fila amarilla a la cuenta que le corresponde en reportviewer, me gustaría saber si alguien tiene alguna idea de cómo se podría hacer. No creo que se pueda hacer con grupos, o de alguna otra forma. Espero que alguien tenga alguna idea. Hasta el momento, asi genero el 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;
}
Espero poder encontrar alguna solución. Saludos