Click here to Skip to main content
15,905,504 members
Home / Discussions / C#
   

C#

 
GeneralRe: Screensaver denied access to process/window list ? Pin
andymo225-Apr-17 6:30
andymo225-Apr-17 6:30 
GeneralRe: Screensaver denied access to process/window list ? Pin
Gerry Schmitz25-Apr-17 6:51
mveGerry Schmitz25-Apr-17 6:51 
GeneralRe: Screensaver denied access to process/window list ? Pin
andymo228-Apr-17 9:16
andymo228-Apr-17 9:16 
QuestionPausing Reception of Data Pin
Liagapi21-Apr-17 5:00
Liagapi21-Apr-17 5:00 
AnswerRe: Pausing Reception of Data Pin
Dave Kreskowiak21-Apr-17 5:06
mveDave Kreskowiak21-Apr-17 5:06 
AnswerRe: Pausing Reception of Data Pin
Gerry Schmitz21-Apr-17 9:05
mveGerry Schmitz21-Apr-17 9:05 
QuestionC# Is there a way to start my windows service on windows startup? Pin
Member 1090131720-Apr-17 22:20
Member 1090131720-Apr-17 22:20 
SuggestionRe: C# Is there a way to start my windows service on windows startup? Pin
Richard MacCutchan20-Apr-17 22:36
mveRichard MacCutchan20-Apr-17 22:36 
GeneralRe: C# Is there a way to start my windows service on windows startup? Pin
Member 1090131726-Apr-17 16:32
Member 1090131726-Apr-17 16:32 
AnswerRe: C# Is there a way to start my windows service on windows startup? Pin
Eddy Vluggen21-Apr-17 0:13
professionalEddy Vluggen21-Apr-17 0:13 
AnswerRe: C# Is there a way to start my windows service on windows startup? Pin
theoldfool21-Apr-17 1:23
professionaltheoldfool21-Apr-17 1:23 
GeneralRe: C# Is there a way to start my windows service on windows startup? Pin
Member 1090131726-Apr-17 16:34
Member 1090131726-Apr-17 16:34 
AnswerRe: C# Is there a way to start my windows service on windows startup? Pin
Rob Philpott21-Apr-17 5:01
Rob Philpott21-Apr-17 5:01 
QuestionWhen one Client starts a game it will automatically starts in all other connected clients in a network in windows form Pin
Member 1298752620-Apr-17 3:54
Member 1298752620-Apr-17 3:54 
GeneralRe: When one Client starts a game it will automatically starts in all other connected clients in a network in windows form Pin
PIEBALDconsult20-Apr-17 3:59
mvePIEBALDconsult20-Apr-17 3:59 
AnswerRe: When one Client starts a game it will automatically starts in all other connected clients in a network in windows form Pin
Gerry Schmitz20-Apr-17 7:46
mveGerry Schmitz20-Apr-17 7:46 
QuestionHelp with XML to datagridview Pin
cajsoft19-Apr-17 0:34
cajsoft19-Apr-17 0:34 
QuestionRe: Help with XML to datagridview Pin
CHill6019-Apr-17 1:01
mveCHill6019-Apr-17 1:01 
AnswerRe: Help with XML to datagridview Pin
Gerry Schmitz19-Apr-17 10:11
mveGerry Schmitz19-Apr-17 10:11 
QuestionNot binding data's in Rdlc Report Pin
Member 1305063918-Apr-17 4:10
Member 1305063918-Apr-17 4:10 
QuestionRe: Not binding data's in Rdlc Report Pin
CHill6018-Apr-17 4:15
mveCHill6018-Apr-17 4:15 
AnswerRe: Not binding data's in Rdlc Report Pin
Member 1305063918-Apr-17 4:35
Member 1305063918-Apr-17 4:35 
Hi here is my code, i want to show data in the report for selected accno in the dropdown list


thank you for ur reply




protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CurUserID = Convert.ToInt64(Session["UserID"]);
                CurrLocID = Convert.ToInt64(HttpContext.Current.Session["LocID"]);
                CurrCompID = Convert.ToInt64(HttpContext.Current.Session["CompID"]);
                if (CurUserID == 0)
                {
                    Response.Redirect("~/Logout.aspx");
                }
                else
                {
                    BindAccounDetails();
                    GetMonthWiseReports();
                   
                }
            }
        }

        private void BindAccounDetails()
        {
            CurrLocID = Convert.ToInt64(HttpContext.Current.Session["LocID"]);
            CurrCompID = Convert.ToInt64(HttpContext.Current.Session["CompID"]);
            try
            {
               
                DataTable dt = new DataTable();
                SerChequePaymentDetails SerObjChq = new SerChequePaymentDetails();
             
                dt = SerObjChq.BindAccounDetails(CurrLocID, CurrCompID);
                ddlAccname.DataSource = dt;
                ddlAccname.DataTextField = "Acc_Name";
                ddlAccname.DataValueField = "Acc_No";
                ddlAccname.DataBind();
                RadComboBoxItem item = new RadComboBoxItem("Select", "0");
                ddlAccname.Items.Insert(0, item);
            }
            catch (Exception ex)
            {
            }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            DivReport.Visible = true;
            GetMonthWiseReports();
            
        }

        private void GetMonthWiseReports()
        {
            string LocationName = string.Empty, CompanyName = string.Empty;
            try
            {
                rptvw.Reset();
                rptvw.ProcessingMode = ProcessingMode.Local;
                rptvw.LocalReport.ReportPath = Server.MapPath("~/Reports/RDLC/MonthWiseLedger.rdlc");
                string accname = string.Empty;
                Int64 AccNo = 0;
                
                
                
                DataTable dt_PurchaseData = SerLedgerMaster.GetMonthwiseledgerReport(AccNo).Tables[0];
                dt_PurchaseData.Columns.Add("Serial_No");
                Int32 RowCount = 0;
                foreach (DataRow dr in dt_PurchaseData.Rows)
                {
                    RowCount++;
                    dr["Serial_No"] = RowCount;
                }
                ReportDataSource rptSource = new ReportDataSource("MonthWiseLedger", dt_PurchaseData);
                rptvw.LocalReport.DataSources.Add(rptSource);
                rptvw.LocalReport.Refresh();
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }






public static DataSet GetMonthwiseledgerReport(Int64 accname)
        {
            try
            {
                MySqlConnection mySQLConnection = new MySqlConnection(ConfigurationManager.ConnectionStrings["MMDBConn"].ToString());

                DataSet objDataSet = new DataSet();
                MySqlCommand command = new MySqlCommand();
                command.Connection = mySQLConnection;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandTimeout = 600;

                command.CommandText = "USP_GetMonthWiseLedger";
                //command.Parameters.AddWithValue("@frmdate", frmdate);
                //command.Parameters.Add("@frmdate", MySqlDbType.String).Value = frmdate;
                //command.Parameters.AddWithValue("@todate", todate);
                //command.Parameters.Add("@todate", MySqlDbType.String).Value = todate;
                //command.Parameters.AddWithValue("@AccNo", accname);
                command.Parameters.Add("@AccNo", MySqlDbType.Int64).Value = accname;
                mySQLConnection.Open();
                MySqlDataAdapter SqlDa = new MySqlDataAdapter(command);
                SqlDa.Fill(objDataSet);
                int count = objDataSet.Tables[0].Rows.Count;
                return objDataSet;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }

GeneralRe: Not binding data's in Rdlc Report Pin
CHill6018-Apr-17 10:20
mveCHill6018-Apr-17 10:20 
GeneralRe: Not binding data's in Rdlc Report Pin
Member 1305063918-Apr-17 23:46
Member 1305063918-Apr-17 23:46 
GeneralRe: Not binding data's in Rdlc Report Pin
CHill6018-Apr-17 23:48
mveCHill6018-Apr-17 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.