Telerik Forums
Reporting Forum
5 answers
696 views
Hello,
how can I have a particular formatting on last row? I need to hide the bottom border.... I've tried with =Count(Fields.Descr) == =RowLines() but seems RowLines is 1 based...
thanks
Peter
Telerik team
 answered on 19 Oct 2011
1 answer
191 views
i have two datasources in my report one for main report and another one for table, in data explorer only the main report datasource is showing. how would i find the data explorer for table data source?
Peter
Telerik team
 answered on 19 Oct 2011
1 answer
194 views
Hi there, I need to access the value of a subreports parameter inside the NeedDataSource event. How is this best accomplished?

I have tried the following but the value never changes:
private void chart1_NeedDataSource(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
    Telerik.Reporting.Chart chart = (Telerik.Reporting.Chart)procChart.ItemDefinition;
 
    chart.ChartTitle.TextBlock.Text = chart.Report.ReportParameters["Branch"].Value.ToString();
}

When I have a Databind event for a textbox I can the following:
private void textBox3_ItemDataBinding(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.TextBox procTB = (Telerik.Reporting.Processing.TextBox)sender;
    Telerik.Reporting.TextBox tb = (Telerik.Reporting.TextBox)procTB.ItemDefinition;
 
    tb.Value = "= Parameters.Branch.Value";
}
This works but how can I get the parameter's value into string object?

Regards,
Christian
Peter
Telerik team
 answered on 19 Oct 2011
3 answers
343 views

Hi All,

I have a multi-tenant database based on Microsoft SQL Azure to store my client info and I am using Telerik Report to for my Report modules.

Since I have to pull info from different database for different client, how do i dynamically configure my connection at web.config in order to know which database am i pulling from?

Please advise
Thanks You.

Eg.

<connectionStrings>

    <add name="ReportClassLib.Properties.Settings.ClientDB" connectionString="**;Initial Catalog=DB_1;User ID=**;Password=**"

            providerName="System.Data.SqlClient" />

</connectionStrings>

Client 1 is DB_1, Client 2 is DB_2,……

IvanDT
Telerik team
 answered on 19 Oct 2011
3 answers
141 views
I am using version 2011 Q2.
I am trying to get some HTML outputs to work in the WebForms viewer, and am using the RadEditor as the means by which to collect this information.
I have stripped down the input to the HTMLTextBox to those tags that are supported such as :
<p><span style="font-size: 24px;"><strong>EXECUTIVE SUMMARY</strong></span></p>
<p>Overall, the audit process was a success, if not the results.<br />
<br />
</p>
<p><span style="font-size: 22px;"><strong>The Good</strong></span></p>
<p>We had positive outcomes in the areas of...<br />
<br />
</p>
<p><span style="font-size: 22px;"><strong>The Bad</strong></span></p>
<p>We need to address the following things :</p>
<ul>
    <li>this thing which needs fixing </li>
    <li>this other thing which needs to be looked at - important </li>
    <li>other stuff too </li>
</ul>
<p>Following are the detail results of this audit.</p>

The issue is that the <ul> items do not show the bullet points in the HTML view.
The items display correctly when exported to PDF.
Can you advise on a course of action?
Thanks,
Steele.

IvanDT
Telerik team
 answered on 18 Oct 2011
1 answer
192 views
I am programmatically building my bar chart, but I have been unable to set the colors for the bar chart bars. Any suggestions or ideas? I am using Q2 2011 Telerik Reporting.


private void chart1_NeedDataSource(object sender, EventArgs e)
    {
        /*
            Need to just do two things in the designer        
            1.) AutoLayout = True
            2.) Docking = Fill
         
        */
        DataTable dt = this.rptDt;

        this.chart1.DataSource = dt;
        chart1.Legend.Appearance.GroupNameFormat = "Qtr #VALUE";
        //return;

        //absolutely necessary these two lines of code:
        this.chart1.DataGroupColumn = "qtr";
        this.chart1.PlotArea.XAxis.DataLabelsColumn = "equipment";


        this.chart1.PlotArea.XAxis.AutoScale = true;
        this.chart1.Docking = DockingStyle.Fill;
        this.chart1.ChartTitle.TextBlock.Text = "Quarterly Equipment Failure";

        this.chart1.PlotArea.YAxis.Appearance.MajorGridLines.Visible = false;
        this.chart1.PlotArea.YAxis.Appearance.MinorGridLines.Visible = false;

        this.chart1.PlotArea.XAxis.Appearance.MajorGridLines.Visible = false;
        this.chart1.PlotArea.XAxis.Appearance.MinorGridLines.Visible = false;

        this.chart1.ClearSkin();
        this.chart1.Skin = string.Empty;
        this.chart1.SeriesPalette = string.Empty;

        this.chart1.Style.BackgroundColor = System.Drawing.Color.WhiteSmoke;
        this.chart1.PlotArea.Appearance.FillStyle.MainColor = Color.White;
        this.chart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
        //this.chart1.PlotArea.XAxis.Appearance.LabelAppearance.FillStyle.MainColor = System.Drawing.Color.Black;
        this.chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black;
        this.chart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black;

        //chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 180;

        chart1.DefaultType = ChartSeriesType.Bar;
        chart1.SeriesOrientation = ChartSeriesOrientation.Horizontal;
        //chart1.SeriesOrientation = ChartSeriesOrientation.Vertical;

        ChartSeries cs = new ChartSeries();
        ChartSeriesItem csi;// = new ChartSeriesItem();       

        //Make 4 Series that are the Quarters (1,2,3,4)
        for (int i = 1; i < 5; i++)
        {
            cs = new ChartSeries("Qtr " + i.ToString(), ChartSeriesType.Bar);
            //add the new series to the chart:
            switch (i)
            {
                case 1:
                    cs.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Blue;
                    cs.Appearance.FillStyle.MainColor = System.Drawing.Color.Blue;                    
                    break;
                case 2:
                    cs.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;
                    cs.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;
                    
                    break;
                case 3:
                    cs.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Yellow;
                    cs.Appearance.FillStyle.MainColor = System.Drawing.Color.Yellow;                    
                    break;
                case 4:
                    cs.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Green;
                    cs.Appearance.FillStyle.MainColor = System.Drawing.Color.Green;
                    break;
            }

            //make the bars solid instead of gradient
            cs.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
            cs.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;

            chart1.Series.Add(cs);
        }



        //now add each equipment fail count to the respective quarter:        
        //build the bars manually:
        foreach (DataRow r in dt.Rows)
        {
            //1.) Make a new series item for each new distinct Equipment item:
            csi = new ChartSeriesItem(Convert.ToDouble(r["failcount"]), r["failcount"].ToString());
            csi.Name = r["equipment"].ToString().Trim();

            csi.Appearance.FillStyle.MainColor = System.Drawing.Color.Purple;
            csi.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;

            chart1.Series[Convert.ToInt32(r["qtr"]) - 1].AddItem(csi);
            
        }

        //show the years we used for the data:
        string msg = string.Empty;
        if (this.ReportParameters["YearsUsedInQuery"].Value.ToString().IndexOf("-") > 0)
            msg = "Years ";
        else
            msg = "Year ";

        this.chart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = msg + this.ReportParameters["YearsUsedInQuery"].Value.ToString();
        this.chart1.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Black;
        this.chart1.PlotArea.YAxis.AxisLabel.Visible = true;

        //this.chart1.DataSource = dt;
        ///*
        foreach (ChartSeries cs1 in chart1.Series)
        {
            switch (cs1.Index + 1)
            {
                case 1:                     
                    cs1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Blue;
                    foreach (ChartSeriesItem ci in cs1.Items)
                    {
                        ci.Appearance.FillStyle.MainColor = System.Drawing.Color.Purple;
                        ci.Appearance.Border.Color = System.Drawing.Color.Purple;
                        ci.Appearance.Exploded = true;
                        ci.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
                    }
                    break;
                case 2:
                    cs1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Red;
                    break;
                case 3:
                    cs1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Yellow;
                    break;
                case 4:
                    cs1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Green;
                    break;
            }
        }
         //* */
    }
IvanDT
Telerik team
 answered on 18 Oct 2011
5 answers
1.3K+ views
Hi
 i want to show running total against each row . mydata is such as follows
A/C Debit Credit Balance
1 500 200 300
1 100 400
1 50 350
2 200 200
2 100 300
2 100 200

Here Balance is running total of Debit-Credit calculate w.r.t Acc No
where it is mentioned that running total support is not present in Q1 2009
is this already possible in Q1 2010 Version?
Please reply me s soon as possible

Peter
Telerik team
 answered on 18 Oct 2011
6 answers
648 views
Hi, 

I am new to Telerik Reporting and I am wondering how can I achieve the page break totals. I searched the forum but could not find any code snippet on how to use RunningValue function. When I converted the existing crystal report to Telerik report all the page running totals were not converted. Could you please guide me with some information.

Regards,
Suresh
Peter
Telerik team
 answered on 18 Oct 2011
1 answer
156 views
What I want to achieve is simple, but somehow I can't figure it out.
I want to create a product list that grouped by it's model.
But I want to put product model inline with details (see the picture attached).
Is it possible to do this?
Squall
Top achievements
Rank 1
 answered on 18 Oct 2011
2 answers
103 views
Hello.

I am using Telerik Reporting Q2 2011 and i am trying to STRIKEOUT some Telerik.Reporting.TextBox fields in the Telerik Silverlight Report - customer is very firm about striking fields (not underscoring, not bolding, not coloring....) but STRIKOEUT the field value.

  In the attachement there is a printscreen of how i set Strikeout property of the textBox and in the DESIGNER view TextBox field  has a visible line drawn across but when i RUN the Silverlight application text box field is NEVER striked out. (and styles for bold,italic,underscore etc works FINE only STRIKOEOUT style never shows in the field).

 Is this some SL or Telerik bug which is causing this effect? Maybe SL 5 will fix it? 

  Is there some workaround for this maybe? 

Setting Font-Strikeout

Thank you
Damir
john doe
Top achievements
Rank 1
 answered on 17 Oct 2011
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?