How I can represent stored procedure in devexpress report chart bar












1















I have this stored procedure



USE [SIM]
GO

CREATE PROCEDURE RepSumLigne
@Date DATE
AS
SELECT
SUM(AssemblyWeight) AS 'Ligne Assemblage',
SUM(WeldingWeight) AS 'Ligne Soudage',
SUM(PaintWeight) AS 'Ligne Peinture'
FROM
DailyProduction
WHERE
CreationDate = @Date


and I have created a report that that contain a table and chart bar, the table shows result correct, but the chart bar show nothing, for the chart bar I create three series (Ligne Assemblage, Ligne Soudage and Ligne Peinture) and in data section I set the value of each one. but when I run the report it is show empty



enter image description here



I open the repeort on a click of a button



private void btnLigneProduSumry_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
DateEdit ProducationDay = new DateEdit();
ProducationDay.Properties.HighlightHolidays = false;
ProducationDay.Properties.FirstDayOfWeek = DayOfWeek.Saturday;

XtraInputBoxArgs args = new XtraInputBoxArgs();
args.Caption = Resources.date;
args.Prompt = Resources.chooseDate;
args.DefaultButtonIndex = 0;
args.DefaultResponse = DateTime.Today;
args.Editor = ProducationDay;
var result = XtraInputBox.Show(args);

RepLigneProductionSumm report = new RepLigneProductionSumm();
report.DataSource = paint.LigneProductionSummRep(Convert.ToDateTime(ProducationDay.EditValue).ToString("MM/dd/yyyy"));
report.ShowRibbonPreviewDialog();
}


and the code behind the LigneProductionSummRep



public DataTable LigneProductionSummRep(string DateProduction)
{
DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
DataTable dt = new DataTable();
SqlParameter param = new SqlParameter[1];
param[0] = new SqlParameter("@Date", SqlDbType.NVarChar, 50);
param[0].Value = DateProduction;

dt = DAL.SelectData("LigneProductionSummRep", param);
DAL.Close();
return dt;

}


How can I solve this problem? Thanks in advance Update:I have put Ligne Assemblage on both Argument and Value



enter image description here



and tha DataSource to none
enter image description here



the chart bar look like this
enter image description here










share|improve this question

























  • and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

    – GuidoG
    Nov 23 '18 at 16:57













  • I have add some code to the question,please review it

    – M.Bouabdallah
    Nov 23 '18 at 17:22
















1















I have this stored procedure



USE [SIM]
GO

CREATE PROCEDURE RepSumLigne
@Date DATE
AS
SELECT
SUM(AssemblyWeight) AS 'Ligne Assemblage',
SUM(WeldingWeight) AS 'Ligne Soudage',
SUM(PaintWeight) AS 'Ligne Peinture'
FROM
DailyProduction
WHERE
CreationDate = @Date


and I have created a report that that contain a table and chart bar, the table shows result correct, but the chart bar show nothing, for the chart bar I create three series (Ligne Assemblage, Ligne Soudage and Ligne Peinture) and in data section I set the value of each one. but when I run the report it is show empty



enter image description here



I open the repeort on a click of a button



private void btnLigneProduSumry_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
DateEdit ProducationDay = new DateEdit();
ProducationDay.Properties.HighlightHolidays = false;
ProducationDay.Properties.FirstDayOfWeek = DayOfWeek.Saturday;

XtraInputBoxArgs args = new XtraInputBoxArgs();
args.Caption = Resources.date;
args.Prompt = Resources.chooseDate;
args.DefaultButtonIndex = 0;
args.DefaultResponse = DateTime.Today;
args.Editor = ProducationDay;
var result = XtraInputBox.Show(args);

RepLigneProductionSumm report = new RepLigneProductionSumm();
report.DataSource = paint.LigneProductionSummRep(Convert.ToDateTime(ProducationDay.EditValue).ToString("MM/dd/yyyy"));
report.ShowRibbonPreviewDialog();
}


and the code behind the LigneProductionSummRep



public DataTable LigneProductionSummRep(string DateProduction)
{
DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
DataTable dt = new DataTable();
SqlParameter param = new SqlParameter[1];
param[0] = new SqlParameter("@Date", SqlDbType.NVarChar, 50);
param[0].Value = DateProduction;

dt = DAL.SelectData("LigneProductionSummRep", param);
DAL.Close();
return dt;

}


How can I solve this problem? Thanks in advance Update:I have put Ligne Assemblage on both Argument and Value



enter image description here



and tha DataSource to none
enter image description here



the chart bar look like this
enter image description here










share|improve this question

























  • and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

    – GuidoG
    Nov 23 '18 at 16:57













  • I have add some code to the question,please review it

    – M.Bouabdallah
    Nov 23 '18 at 17:22














1












1








1








I have this stored procedure



USE [SIM]
GO

CREATE PROCEDURE RepSumLigne
@Date DATE
AS
SELECT
SUM(AssemblyWeight) AS 'Ligne Assemblage',
SUM(WeldingWeight) AS 'Ligne Soudage',
SUM(PaintWeight) AS 'Ligne Peinture'
FROM
DailyProduction
WHERE
CreationDate = @Date


and I have created a report that that contain a table and chart bar, the table shows result correct, but the chart bar show nothing, for the chart bar I create three series (Ligne Assemblage, Ligne Soudage and Ligne Peinture) and in data section I set the value of each one. but when I run the report it is show empty



enter image description here



I open the repeort on a click of a button



private void btnLigneProduSumry_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
DateEdit ProducationDay = new DateEdit();
ProducationDay.Properties.HighlightHolidays = false;
ProducationDay.Properties.FirstDayOfWeek = DayOfWeek.Saturday;

XtraInputBoxArgs args = new XtraInputBoxArgs();
args.Caption = Resources.date;
args.Prompt = Resources.chooseDate;
args.DefaultButtonIndex = 0;
args.DefaultResponse = DateTime.Today;
args.Editor = ProducationDay;
var result = XtraInputBox.Show(args);

RepLigneProductionSumm report = new RepLigneProductionSumm();
report.DataSource = paint.LigneProductionSummRep(Convert.ToDateTime(ProducationDay.EditValue).ToString("MM/dd/yyyy"));
report.ShowRibbonPreviewDialog();
}


and the code behind the LigneProductionSummRep



public DataTable LigneProductionSummRep(string DateProduction)
{
DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
DataTable dt = new DataTable();
SqlParameter param = new SqlParameter[1];
param[0] = new SqlParameter("@Date", SqlDbType.NVarChar, 50);
param[0].Value = DateProduction;

dt = DAL.SelectData("LigneProductionSummRep", param);
DAL.Close();
return dt;

}


How can I solve this problem? Thanks in advance Update:I have put Ligne Assemblage on both Argument and Value



enter image description here



and tha DataSource to none
enter image description here



the chart bar look like this
enter image description here










share|improve this question
















I have this stored procedure



USE [SIM]
GO

CREATE PROCEDURE RepSumLigne
@Date DATE
AS
SELECT
SUM(AssemblyWeight) AS 'Ligne Assemblage',
SUM(WeldingWeight) AS 'Ligne Soudage',
SUM(PaintWeight) AS 'Ligne Peinture'
FROM
DailyProduction
WHERE
CreationDate = @Date


and I have created a report that that contain a table and chart bar, the table shows result correct, but the chart bar show nothing, for the chart bar I create three series (Ligne Assemblage, Ligne Soudage and Ligne Peinture) and in data section I set the value of each one. but when I run the report it is show empty



enter image description here



I open the repeort on a click of a button



private void btnLigneProduSumry_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
DateEdit ProducationDay = new DateEdit();
ProducationDay.Properties.HighlightHolidays = false;
ProducationDay.Properties.FirstDayOfWeek = DayOfWeek.Saturday;

XtraInputBoxArgs args = new XtraInputBoxArgs();
args.Caption = Resources.date;
args.Prompt = Resources.chooseDate;
args.DefaultButtonIndex = 0;
args.DefaultResponse = DateTime.Today;
args.Editor = ProducationDay;
var result = XtraInputBox.Show(args);

RepLigneProductionSumm report = new RepLigneProductionSumm();
report.DataSource = paint.LigneProductionSummRep(Convert.ToDateTime(ProducationDay.EditValue).ToString("MM/dd/yyyy"));
report.ShowRibbonPreviewDialog();
}


and the code behind the LigneProductionSummRep



public DataTable LigneProductionSummRep(string DateProduction)
{
DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
DataTable dt = new DataTable();
SqlParameter param = new SqlParameter[1];
param[0] = new SqlParameter("@Date", SqlDbType.NVarChar, 50);
param[0].Value = DateProduction;

dt = DAL.SelectData("LigneProductionSummRep", param);
DAL.Close();
return dt;

}


How can I solve this problem? Thanks in advance Update:I have put Ligne Assemblage on both Argument and Value



enter image description here



and tha DataSource to none
enter image description here



the chart bar look like this
enter image description here







c# winforms devexpress






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 19:11







M.Bouabdallah

















asked Nov 23 '18 at 10:58









M.BouabdallahM.Bouabdallah

4816




4816













  • and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

    – GuidoG
    Nov 23 '18 at 16:57













  • I have add some code to the question,please review it

    – M.Bouabdallah
    Nov 23 '18 at 17:22



















  • and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

    – GuidoG
    Nov 23 '18 at 16:57













  • I have add some code to the question,please review it

    – M.Bouabdallah
    Nov 23 '18 at 17:22

















and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

– GuidoG
Nov 23 '18 at 16:57







and how do you retrieve the data ? maybe you have some code how you call the procedure and bind it to the chart ?

– GuidoG
Nov 23 '18 at 16:57















I have add some code to the question,please review it

– M.Bouabdallah
Nov 23 '18 at 17:22





I have add some code to the question,please review it

– M.Bouabdallah
Nov 23 '18 at 17:22












1 Answer
1






active

oldest

votes


















0














i found this soultion on youtube,i have create chart bar withoyt any datasource and int chart designer i add three bar series ,in my report i put this code



        private void xrChart1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrChart1.Series["Ligne Assemblage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Assemblage", txtAssembly.Text));
xrChart1.Series["Ligne Soudage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Soudage", txtWelding.Text));
xrChart1.Series["Ligne Peinture"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Peinture", txtPaint.Text));
}





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445392%2fhow-i-can-represent-stored-procedure-in-devexpress-report-chart-bar%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    i found this soultion on youtube,i have create chart bar withoyt any datasource and int chart designer i add three bar series ,in my report i put this code



            private void xrChart1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {
    xrChart1.Series["Ligne Assemblage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Assemblage", txtAssembly.Text));
    xrChart1.Series["Ligne Soudage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Soudage", txtWelding.Text));
    xrChart1.Series["Ligne Peinture"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Peinture", txtPaint.Text));
    }





    share|improve this answer




























      0














      i found this soultion on youtube,i have create chart bar withoyt any datasource and int chart designer i add three bar series ,in my report i put this code



              private void xrChart1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
      {
      xrChart1.Series["Ligne Assemblage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Assemblage", txtAssembly.Text));
      xrChart1.Series["Ligne Soudage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Soudage", txtWelding.Text));
      xrChart1.Series["Ligne Peinture"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Peinture", txtPaint.Text));
      }





      share|improve this answer


























        0












        0








        0







        i found this soultion on youtube,i have create chart bar withoyt any datasource and int chart designer i add three bar series ,in my report i put this code



                private void xrChart1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
        xrChart1.Series["Ligne Assemblage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Assemblage", txtAssembly.Text));
        xrChart1.Series["Ligne Soudage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Soudage", txtWelding.Text));
        xrChart1.Series["Ligne Peinture"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Peinture", txtPaint.Text));
        }





        share|improve this answer













        i found this soultion on youtube,i have create chart bar withoyt any datasource and int chart designer i add three bar series ,in my report i put this code



                private void xrChart1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
        xrChart1.Series["Ligne Assemblage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Assemblage", txtAssembly.Text));
        xrChart1.Series["Ligne Soudage"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Soudage", txtWelding.Text));
        xrChart1.Series["Ligne Peinture"].Points.Add(new DevExpress.XtraCharts.SeriesPoint("Ligne Peinture", txtPaint.Text));
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 18:17









        M.BouabdallahM.Bouabdallah

        4816




        4816
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445392%2fhow-i-can-represent-stored-procedure-in-devexpress-report-chart-bar%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Academy of Television Arts & Sciences

            L'Équipe

            1995 France bombings