I have an html report. I am to remove a string coming two times in this report. Please help. My code is as follows.
- private void ShowEarnCard(string GrdNo, int Year)
- {
- PAY_REPORTSs objPAY_REPORTSs = new PAY_REPORTSs();
- objPAY_REPORTSs.EarnCard_Pension(GrdNo, Year);
- if (objPAY_REPORTSs.Count == 0)
- {
- Util.ShowNotification(this, "No Data Found");
- return;
- }
- Table tt = new Table();
- tt.Width = Unit.Percentage(100);
- tt.BorderWidth = Unit.Point(1);
- tt.CellSpacing = 0;
- tt.CellPadding = 0;
-
- double[] Basic = new double[12];
- double[] DA = new double[12];
- double[] AddlPension = new double[12];
- double[] SplPension = new double[12];
- double[] DP = new double[12];
- double[] PensionArr = new double[12];
- double[] DAArr = new double[12];
- double[] IRArr = new double[12];
- double[] GRA = new double[12];
- double[] ProvGRA = new double[12];
- double[] ProvPension = new double[12];
- double[] TotalAllowance = new double[12];
- double[] Gross = new double[12];
- double[] Commutation = new double[12];
- double[] MedAllow = new double[12];
- double[] DisAllow = new double[12];
-
- double[] ComutationRec = new double[12];
- double[] IncomeTax = new double[12];
- double[] OtherDed = new double[12];
- double[] PensionRec = new double[12];
- double[] DARec = new double[12];
- double[] TotalDed = new double[12];
- double[] NetAmount = new double[12];
- string[] VNo = new string[12];
- string[] VDate = new string[12];
- string[] TreaName = new string[12];
- for (int i = 0; i < 12;i++ )
- {
- VNo[i] = "";
- VDate[i] = "";
- TreaName[i] = "";
- }
- for (int i = 0; i < objPAY_REPORTSs.Count; i++)
- {
- int MM = int.Parse(objPAY_REPORTSs[i].SAL_MONTH.ToString().Substring(4, 2));
- int MonthIdx = 0;
- if (MM > 2)
- MonthIdx = MM - 3;
- else
- MonthIdx = MM + 9;
- Basic[MonthIdx] += objPAY_REPORTSs[i].BASIC;
- DA[MonthIdx] += objPAY_REPORTSs[i].DA_AMT;
- AddlPension[MonthIdx] += objPAY_REPORTSs[i].ADDL_PENSION;
- SplPension[MonthIdx] += objPAY_REPORTSs[i].SPECIAL_PENSION;
- DAArr[MonthIdx] += objPAY_REPORTSs[i].DA_ARR;
- GRA[MonthIdx] += objPAY_REPORTSs[i].GRA_AMT;
- ProvGRA[MonthIdx] += objPAY_REPORTSs[i].PRO_GRAV;
- ProvPension[MonthIdx] += objPAY_REPORTSs[i].PRO_PEN;
- MedAllow[MonthIdx] += objPAY_REPORTSs[i].MED_ALL;
- DisAllow[MonthIdx] += objPAY_REPORTSs[i].DIS_AMT;
- Gross[MonthIdx] += objPAY_REPORTSs[i].GROSS_AMT;
- Commutation[MonthIdx] += objPAY_REPORTSs[i].TOT_COMAMT;
-
- ComutationRec[MonthIdx] += objPAY_REPORTSs[i].TOT_COMAMT_DED;
- IncomeTax[MonthIdx] += objPAY_REPORTSs[i].INCOME_TAX;
- OtherDed[MonthIdx] += objPAY_REPORTSs[i].OTH_DED;
- PensionRec[MonthIdx] += objPAY_REPORTSs[i].PENSION_REC;
- DARec[MonthIdx] += objPAY_REPORTSs[i].DA_REC;
- TotalDed[MonthIdx] += objPAY_REPORTSs[i].TOT_DED;
- NetAmount[MonthIdx] += objPAY_REPORTSs[i].NET_AMT;
- VNo[MonthIdx] += objPAY_REPORTSs[i].V_NO;
- VDate[MonthIdx] += objPAY_REPORTSs[i].V_DATE + "
"; -
-
-
-
-
-
-
- TreaName[MonthIdx] += objPAY_REPORTSs[i].TREA_NAME;
-
- if (i == objPAY_REPORTSs.Count - 1 || objPAY_REPORTSs[i].GRDNO != objPAY_REPORTSs[i + 1].GRDNO)
- {
- EarnCard_Penson_Header(tt, objPAY_REPORTSs[i], int.Parse(ddlFinYear.SelectedValue));
- EarnCard_Pension_Data(tt, Basic, DA, AddlPension, SplPension, DP,
- PensionArr, DAArr, IRArr, GRA, ProvGRA, ProvPension,
- TotalAllowance, MedAllow, DisAllow, Gross, Commutation, ComutationRec, IncomeTax,
- OtherDed, PensionRec, DARec, TotalDed, NetAmount, VNo, VDate, TreaName);
- }
- }
- tblData.Controls.Add(tt);
- }