Telerik Forums
Reporting Forum
4 answers
463 views
Hi all,

  I am using telerik reporting tool.i am passing from date and todate from aspx page and displaying chart on the report viewer.

Chart is coming correctly but legend is showing as item1, item2,item3..I want to show the name in legends and show the  time in percentage in Y columns(ex:   series.DefaultLabelValue = "#%").I have the datacolumn as "name" and "usage_time".

"usage_time"  should be display as percentage and "name" should in the legend

please tell me how to do it?

i am putting my coding for your reference

in aspx page:



                DateTime dtFromDate = (DateTime)dpFromDate.SelectedDate;
                DateTime dtToDate = (DateTime)dpToDate.SelectedDate;


                ReportProperty oPro = new ReportProperty();
                oPro.FromDate = dtFromDate;
                oPro.ToDate = dtToDate;

                telerikReportGraph oReport = new telerikReportGraph();              
                oReport.GenerateReport(oPro);
                reportviewer.Report = oReport;


in reporting.cs

public void GenerateReport(ReportProperty pro)
        {

            DateTime fromDate = pro.FromDate;
            DateTime toDate = pro.ToDate;
           
            titleTextBox.Value = "User/Time Pie Chart";
            
            
            ds = DBMethods.GetDetailsForUserChart(1, fromDate, toDate);
            


            ChartSeries series = new ChartSeries();           
            series.DataYColumn = "usage_time";
            series.Type = ChartSeriesType.Pie;           
          
            series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
            series.Appearance.LabelAppearance.Visible = true;
            series.Appearance.ShowLabelConnectors = true;
            series.Appearance.ShowLabels = true;
            series.Appearance.DiameterScale = 0.6;
        
            chart1.ChartTitle.TextBlock.Visible = false;
            chart1.ChartTitle.Visible = true;
            chart1.Legend.Visible = true;
            series.DefaultLabelValue = "#%";
            chart1.Series.Add(series);



  foreach (DataRow row in ds.Tables[0].Rows)
            {
                


                ChartSeriesItem item = new ChartSeriesItem();
              
                item.Name = (string)row["name"];
                item.Appearance.Exploded = true;
                series.DefaultLabelValue = "#%";

            }


 this.chart1.NeedDataSource += new System.EventHandler(this.chart1_NeedDataSource_1);
}
 private void chart1_NeedDataSource_1(object sender, EventArgs e)
        {
    (sender as Telerik.Reporting.Processing.Chart).DataSource = ds;

}

Antonio Simoes
Top achievements
Rank 1
 answered on 19 May 2010
3 answers
156 views
Guys,
Is this for real? or am I missing big time?
the zoom selection is showing OK in IE, but where did it gone in FF...........................
I'm using Q3 2009
Please advise,
Mickey
Steve
Telerik team
 answered on 19 May 2010
6 answers
212 views
After i referenced my test report project dll in my window app, i can't see it displayed on the report property dropdown list of the ReportViewer. I also try to load it by codes and got this error: Unable to cast object of type 'TestReport.Report1' to type 'Telerik.Reporting.IReportDocument' with these codes:

Dim

 

a As New TestReport.Report1()

 

 

 

Me.ReportViewer1.Report = a    - this line got the above error

 

 

 

Me.ReportViewer1.RefreshReport()

 

 



Attached are some screenshots. It doesn't let me to attach my source codes here.

THanks
Quan
Quan Nguyen
Top achievements
Rank 1
 answered on 18 May 2010
1 answer
104 views
Hello, I'm thinking of migrating a desktop solution I have, silverlight, and the problem is that I have some reports in crystal, and I have not embedded, it is well to the changes do not have to compile the application. the question is, if I use the solution you have for the reports, I can not have them embedded, or is this not possible?
Thanks

Steve
Telerik team
 answered on 18 May 2010
1 answer
118 views
Hi,

I am trying to show a caculate result in a specific format in the group footer row.  If I only format a single aggregate value, it works fine but a double parameter does not work.  I get the error message "An error has occured while processing TextBox 'textBox5':
The expression contains undefined function call GetTimeString2()"

So basically if I do this
=GetTimeString1(Sum(Fields.Hours))
or I do this
=GetTimeString1(Sum(Fields.Minutes))
it works fine, but if I do this

=GetTimeString2(Sum(Fields.Hours), Sum(Fields.Minutes))
it does NOT work and I get the above error message and even if I try this
=GetTimeString2(Sum(Fields.Hours), 40)
it does NOT work, but this will work
=GetTimeString2(2, 40)

So basically if there is an aggregate, one or many doesn't matter, it will not work.

the static function signature are
=========================
public static string GetTimeString1(int hrs)
public static string GetTimeString2(int hrs, int mins)

Can someone point out why it won't take two aggregates in the function.  I looked at the limitations post and it does not look like this is a limitation.

Thanks for your assistance.
- Mans.
Peter
Telerik team
 answered on 18 May 2010
3 answers
113 views
hello, i have made a simple project like in the video to test and start with telerik reporting in silverlight.
The problem is that the reportservice.svc is not running or can not accesed when its hosted in IIS.
On local machine the project runs correctly including the svc file. I checked webconfig and all other
relevant thinks but i didn't found a difference. On IIS i get a inner exception error 500 and the report
dosn't start. I searched also here or in help but i don't found a solution. How can i slove this issue ..
Also when i set a theme to reportviewer i get a xml runtime error. I installed latest internal build from
radcontrols and report (SL3).
Steve
Telerik team
 answered on 18 May 2010
2 answers
298 views
It is easy for WinForms:

reportViewer1.ShowPrintButton = false;
reportViewer1.ShowExportButton = false;

But how the same can be accomplished in WPF?

Show...Button properties are not available in WPF ReportViewer?

Thanks
taras
Top achievements
Rank 1
 answered on 18 May 2010
1 answer
125 views
Hi,
I try to undestrand telerik Reporting
I install Telerik_Reporting_2010_1_10_423_dev in VS2010 and I try to follow "TelerikReporting-LearningGuide.pdf"
in 3° exaple: Displaying Reports in a Viewer, when I try to run the project, my winform that contain the report load the interface, search the record in db but when finish I get this error:
"An error has occured while processing Report.
Unable connect to database. please verify that your connection string is valid; in case you use a connection string from the application configuration file,make sure the name is correct and the connection string setting are presente in the configuration file of your application"
when I use the preview in telerik reporting after create the report with wizard I see the record of my db
somebody have some suggestions?
thanks

 

Peter
Telerik team
 answered on 18 May 2010
0 answers
163 views

Hi,


I want to change the visibility of a group section at runtime based on an 'if' condition. Once the visibility set to true/false at runtime, it is not changing the visibility status. So I tried to change the height of the group section to 0 to make it hide. But it is not changing the height. I have tried it after the 'InitializeComponent()' and also in itemdatabinding and itemdatabound events. So how can I do it??


Regeesh Joseph
Top achievements
Rank 1
 asked on 18 May 2010
3 answers
616 views
I have a report that looks as follows in the detail section, with the X's being the equivalent of a single line "bar chart".

Sales             XXXXXXXXXXXXXXXXX     75%
Research      XXXXXX                            20%
IT                   X                                      5%


The report is already done and in production except for the "x's", which the customer has now requested.  I looked at charting which I had used for something similar when it first came out and that solution no longer works, and the data binding seems quite inefficient using  needdatasource for each instance for numbers I already have in the detail section

Is there a way to use conditional formatting to control the width of a textbox based off something like txtBar.Width = Fields.Pct x 2 ?

Joel
Top achievements
Rank 2
 answered on 17 May 2010
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?