public Dictionary <string, object> SaveStandartReport(int reportID, bool isTurnOffPageBreak, bool includeTitlePage, int formatTypeId, int reportLayoutStyleID, object parameters, string userReportName, bool saveAsNew, int userReportId)
        {
            Dictionary <string, object> resultDictionary = new Dictionary <string, object>();
            ReportBuilderService        svc  = new ReportBuilderService();
            List <RptParameter>         list = JavaScriptConvert.DeserializeObject <List <RptParameter> >(JavaScriptConvert.SerializeObject(parameters));

            if (saveAsNew)
            {
                int newUserReportId = svc.SaveStandardUserReport(UserContext.ID, reportID, reportLayoutStyleID, formatTypeId, userReportName, list, UserContext.AssociationNumber, false, isTurnOffPageBreak, includeTitlePage);
            }
            else
            {
                svc.UpdateUserReport(userReportId, reportLayoutStyleID, formatTypeId, userReportName, false, list, isTurnOffPageBreak, includeTitlePage);
            }
            return(resultDictionary);
        }
        public Dictionary <string, object> SaveCustomReport(int reportID, bool isTurnOffPageBreak, bool includeTitlePage, int formatTypeId, int reportLayoutStyleID, object parameters, string userReportName, bool saveAsNew, int userReportId, bool isSummaryOnly, object fields, object summarizeFields)
        {
            Dictionary <string, object> resultDictionary = new Dictionary <string, object>();
            ReportBuilderService        svc        = new ReportBuilderService();
            List <RptParameter>         list       = JavaScriptConvert.DeserializeObject <List <RptParameter> >(JavaScriptConvert.SerializeObject(parameters));
            List <RptFieldInfo>         listFields = JavaScriptConvert.DeserializeObject <List <RptFieldInfo> >(JavaScriptConvert.SerializeObject(fields));
            List <RptFieldInfo>         summFields = JavaScriptConvert.DeserializeObject <List <RptFieldInfo> >(JavaScriptConvert.SerializeObject(summarizeFields));

            if (saveAsNew)
            {
                svc.SaveCustomUserReport(UserContext.ID, reportID, formatTypeId, reportLayoutStyleID, userReportName, isSummaryOnly, getUserReportFieldList(saveAsNew, listFields), getSummarizeFieldList(summFields), list, UserContext.AssociationNumber, false, includeTitlePage);
            }
            else
            {
                svc.UpdateUserReport(userReportId, reportLayoutStyleID, formatTypeId, userReportName, isSummaryOnly, list, false, includeTitlePage);

                svc.UpdateCustomUserReport(userReportId, getUserReportFieldList(saveAsNew, listFields), UserContext.ID, getSummarizeFieldList(summFields));
            }
            return(resultDictionary);
        }