0
I am developing a reporting system to control calls and need to take the result of a query and make a sum that brings me the total number of calls per sector of a certain number.
I’m using Stored Procedure
with Mysql database and the development is in ASP.Net.
I’m trying this way.
I declared the variables receiving zero:
Double TotalLigacoes, TotalSetor, TotalSac, TotalProjetos, TotalTI, TotalADMINISTRATIVO, TotalComercial, TotalDiretoria, TotalRecepcao, TotalOutros = 0;
protected void GvSetor_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.Cells.[0].text == "ADMINISTRATIVO")
{
TotalADM = TotalADM + Convert.ToDouble( TotalADM + e.Row.Cells[1].Text);
}
}
I have to do something like a looping to sum the minutes of `Sqldatasource (Separated by sector) and sum in one variable to display in the other grid.
But what’s your problem? There was some mistake?
– lionbtt
TotalADM
was not declared. WouldTotalADMINISTRATIVO
?– Andre Calil
Sorry. I changed but when I posted, I posted wrong.
– fabricio_wm
The problem is that I don’t know how to fix this and I’m giving an error. Indetifier expected. How do I put Print here? Thanks.
– fabricio_wm
@fabricio_wm http://answall.com/editing-help
– Leonel Sanches da Silva
It had a dot before the brackets in the if. But it’s returning zero.
– fabricio_wm