Example #1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            //if(IsPostBack) return;
            Response.Write("CurDir: " + Server.MapPath("/ChartFX6"));
            btnShow.Attributes.Add("onclick", "x()");
            string query = txtQuery.Text;

            if (String.Empty.Equals(query))
            {
                query = txtQuery.Text = "select filter({{[Measures].[Ta Units]},{[Measures].[Ta Wrkload]}},[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000 ) on rows," +
                                        "{filter(toggledrillstate({[AgeRange].[All AgeRange]},{[AgeRange].[All AgeRange]}),[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000)} on columns" +
                                        " from [Claims cube]";
            }
            //Chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.AllData);
            SoftwareFX.ChartFX.Olap.Server.OlapExtension           Olap1  = new SoftwareFX.ChartFX.Olap.Server.OlapExtension();
            SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData AdoMD1 = new SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData();
            try
            {
                AdoMD1.Connect("Provider=MSOLAP; Datasource=localhost; Initial Catalog=FoodMart 2000;", query);
                Olap1.DataSource = AdoMD1;
                Chart1.Extensions.Clear();
                Chart1.Extensions.Add(Olap1);
                //Chart1.PersonalizedFlags=SoftwareFX.ChartFX.PersonalizedFlags.AutoLoad & SoftwareFX.ChartFX.PersonalizedFlags.AutoSave & SoftwareFX.ChartFX.PersonalizedFlags.EnableRestore;
            }
            catch
            {
                ;
            }
            //Chart1.Palette="Default.ModernBusiness";
            Chart1.Export(SoftwareFX.ChartFX.Internet.Server.FileFormat.Jpeg, @"c:\xxx.jpg");
        }
Example #2
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
       //if(IsPostBack) return;
        Response.Write("CurDir: " +Server.MapPath("/ChartFX6"));
       btnShow.Attributes.Add("onclick","x()");
       string query = txtQuery.Text;
       if(String.Empty.Equals(query))
       {
     query=txtQuery.Text="select filter({{[Measures].[Ta Units]},{[Measures].[Ta Wrkload]}},[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000 ) on rows," +
                                       "{filter(toggledrillstate({[AgeRange].[All AgeRange]},{[AgeRange].[All AgeRange]}),[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000)} on columns" +
                                       " from [Claims cube]";
       }
       //Chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.AllData);
       SoftwareFX.ChartFX.Olap.Server.OlapExtension Olap1=new SoftwareFX.ChartFX.Olap.Server.OlapExtension();
       SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData AdoMD1=new SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData();
       try
       {
     AdoMD1.Connect("Provider=MSOLAP; Datasource=localhost; Initial Catalog=FoodMart 2000;", query);
     Olap1.DataSource = AdoMD1;
     Chart1.Extensions.Clear();
     Chart1.Extensions.Add(Olap1);
     //Chart1.PersonalizedFlags=SoftwareFX.ChartFX.PersonalizedFlags.AutoLoad & SoftwareFX.ChartFX.PersonalizedFlags.AutoSave & SoftwareFX.ChartFX.PersonalizedFlags.EnableRestore;
       }
       catch
       {
     ;
       }
       //Chart1.Palette="Default.ModernBusiness";
       Chart1.Export(SoftwareFX.ChartFX.Internet.Server.FileFormat.Jpeg,@"c:\xxx.jpg");
 }
Example #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            Chart Chart1 = new Chart();

            Chart1.Import(FileFormat.BinaryTemplate, @"c:\xxx.xml");
            if (IsPostBack)
            {
                Chart1.Palette = Chart1.Palette;
                return;
            }
            btnShow.Attributes.Add("onclick", "x()");
            string query = txtQuery.Text;

            if (String.Empty.Equals(query))
            {
                query = txtQuery.Text = "select filter({{[Measures].[Ta Units]},{[Measures].[Ta Wrkload]}},[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000 ) on rows," +
                                        "{filter(toggledrillstate({[AgeRange].[All AgeRange]},{[AgeRange].[All AgeRange]}),[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000)} on columns" +
                                        " from [Claims cube]";
            }
            //Chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.AllData);
            SoftwareFX.ChartFX.Olap.Server.OlapExtension           Olap1  = new SoftwareFX.ChartFX.Olap.Server.OlapExtension();
            SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData AdoMD1 = new SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData();
            try
            {
                AdoMD1.Connect("Provider=MSOLAP; Datasource=localhost; Initial Catalog=FoodMart 2000;", query);
                Olap1.DataSource = AdoMD1;
                Chart1.Extensions.Clear();
                Chart1.Extensions.Add(Olap1);
                Chart1.PersonalizedFlags = SoftwareFX.ChartFX.PersonalizedFlags.AutoLoad;// & SoftwareFX.ChartFX.PersonalizedFlags.AutoSave;
            }
            catch
            {
                ;
            }
            Chart1.Palette = "Default.ModernBusiness";
            outstr         = Chart1.GetHtmlTag(400, 400, ".NET", "Chart1");
            Chart1.Export(FileFormat.Jpeg, @"c:\xxx.jpg");
        }
Example #4
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
       Chart Chart1 = new Chart();
       Chart1.Import(FileFormat.BinaryTemplate,@"c:\xxx.xml");
       if(IsPostBack)
       {
     Chart1.Palette=Chart1.Palette;
     return;
       }
       btnShow.Attributes.Add("onclick","x()");
       string query = txtQuery.Text;
       if(String.Empty.Equals(query))
       {
     query=txtQuery.Text="select filter({{[Measures].[Ta Units]},{[Measures].[Ta Wrkload]}},[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000 ) on rows," +
                                       "{filter(toggledrillstate({[AgeRange].[All AgeRange]},{[AgeRange].[All AgeRange]}),[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000)} on columns" +
                                       " from [Claims cube]";
       }
       //Chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.AllData);
       SoftwareFX.ChartFX.Olap.Server.OlapExtension Olap1=new SoftwareFX.ChartFX.Olap.Server.OlapExtension();
       SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData AdoMD1=new SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData();
       try
       {
     AdoMD1.Connect("Provider=MSOLAP; Datasource=localhost; Initial Catalog=FoodMart 2000;", query);
     Olap1.DataSource = AdoMD1;
     Chart1.Extensions.Clear();
     Chart1.Extensions.Add(Olap1);
     Chart1.PersonalizedFlags=SoftwareFX.ChartFX.PersonalizedFlags.AutoLoad;// & SoftwareFX.ChartFX.PersonalizedFlags.AutoSave;
       }
       catch
       {
     ;
       }
       Chart1.Palette="Default.ModernBusiness";
       outstr = Chart1.GetHtmlTag(400,400,".NET","Chart1");
       Chart1.Export(FileFormat.Jpeg,@"c:\xxx.jpg");
 }