Telerik Forums
Reporting Forum
1 answer
362 views
I have three textboxes(textbox1,textbox2,textbox4). Am trying to calculate the percentage of textbox1.value  to textbox3.value. Want to display the percentage in texbox4 on the fly. Is there an easy way to do this? it currently tells me the input string is not in correct format. Have tried numerous things. Any direction would be greatly appreciated. See code below.

Jason
 
            SqlConnection connSomsys = new SqlConnection(@"Server=cmdivst004\Jason08;Integrated Security=false;Database=QuoteDB; Persist Security Info=True;User ID=cmdiapp;Password=adiadmin");  
            SqlCommand selectCommand;  
            selectCommand = new SqlCommand("sprocgetQuoteProductTotals", connSomsys);  
            selectCommand.CommandType = CommandType.StoredProcedure;  
 
              
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);  
            DataSet dataSet = new DataSet();  
            adapter.Fill(dataSet);  
            this.DataSource = dataSet;  
            this.DataMember = "Table";  
            this.textBox3.Value = dataSet.Tables[1].Rows[0][0].ToString();  
 
 
 
            
            int textbox1val;  
            int textbox3val;  
            textbox1val = Convert.ToInt32(this.textBox1.Value);  
            textbox3val = Convert.ToInt32(this.textBox3.Value);  
            decimal percent = (textbox1val * 100) / textbox3val;  
            string textbox4val = Convert.ToString(percent);  
              
            this.textBox4.Value = textbox4val;  
 



 
Steve
Telerik team
 answered on 15 Jul 2009
3 answers
606 views
Hello,

I upgraded to Telerik Reporting Q2 2009 and my reports are encountering an issue. I have a button on the page that sets the parameters for the report and updates the ReportViewer. However, since I upgraded to Q2 the NeedDataSource event is not firing. If I use Q1 it works fine. I have to use Q2 because Q2 has a fix regarding the page count issue.

ASPX:
1) the aspx has checkboxes and dropdowns so the user can have different options when running the report.
2) View Report button that when clicked assigns the report parameters and sets the report to the reportviewer, just like the examples.

Report NeedDataSource:
Here I would dynamically get the data and show or hide sub reports based on the parameters that were passed. I would also be able to store the previous datatable/dataset by using a global variable so that I could reuse some data if there were no change, and only generate new data that is needed.

As with Q2 the NeedDataSource event is only fired the first time the button is pressed. The second time the button is pressed, I only get to :

Public Sub New()
        InitializeComponent()
End Sub

I have also tried : Me.DataSource = Nothing after InitializeComponent() but that didnt help.

Thanks for any assistance.
Charles
Top achievements
Rank 1
 answered on 15 Jul 2009
4 answers
210 views
Hi everyone,

i am trying to get a pie chart like those shown on this example  or this one with a legend or serie that would associate a colour with a name.

My problem is that those names are not fixed so i would like to attribute them during runtime. I already use NeedDataSource event for populating the datasource.
Do you have an example where that legend of a pie chart is populating depending of what is in the datasource at run time?

I get trought the documentation but i must have missed something (I am not even sure that it's legend or what and most of the example are with bar chart).

Thank you

regis
regis
Top achievements
Rank 1
 answered on 15 Jul 2009
1 answer
169 views
Hi,

I am trying to bind a grid from client-side. And it works fine, if it is a plain grid with GridBoundColumns. If my grid has grouping functionality, it does not work. The data is bound but grouping never works. Also, if I am using a template column, with a link button in it, the data is not bound to that column. Can you please help me on this?

Thanks.

Nikolay Rusev
Telerik team
 answered on 15 Jul 2009
1 answer
187 views
Hi,

In C# .Net 3.5, I have a DataSet that I would like to Bind to a horizontal Telerik Reporting Bar Chart.

The DataSet data essentially contains 2 column fields, NameOfGroup and NumberOfHits.

So for example, a name of a group could be "The Beatles" and the number of hits could be 43.

Another row in the DataSet could be "Led Zeplin" and the number of hits could be 22.

As my DataSet data comes from a Store Procedure which does a SUM of "Hits" and groups by group name I will be adding more groups and new hits to the database.

How do I build a Reporting Chart that will automatically represent dynamically the number of horizontal bars to the number of Groups I have in my DataSet.  My Hits column will be the length of the bars.

Any online examples would be most appreciated.

Thanks

David
Chavdar
Telerik team
 answered on 15 Jul 2009
1 answer
170 views
Hi,

I have huge recrods in the reports and one of the column i am using for grouping. I assigned a "pagebreak=After" for the customers groups(which i used for groupding). Everything works well but the last page is empty. I am getting a empty page at the end.

Moreover "GroupKeepTogether=None".

Thanks.

Regards
Arshad
Steve
Telerik team
 answered on 14 Jul 2009
7 answers
256 views
I´m have a problem
I can't add a datasource in a chart in order to appear on Data the combo box to choose the datasource.
anyone knows how to?
i've already read documentation but i can't find anything.
thank you
tica
Top achievements
Rank 1
 answered on 14 Jul 2009
1 answer
113 views
Hi,

I just installed the Q2 reporting package and it appears as if the reportviewer no longer refreshes when an ajax control causes a postback. 

I am using a drop down to pass in a parameter and before with the Q1 version when i selected an item from the dropdown it would pass in my parameter and refresh the reportviewer.  Now with Q2 it seems as if I have to hit the refresh button for this to work. 

My dropdown is set to autopostback = true  and is also set as a trigger in my update panel.

Any ideas? Did this change from Q1 to Q2?

Brian
Steve
Telerik team
 answered on 14 Jul 2009
1 answer
174 views
Hi I recently made a post regarding the cast that I needed to create if I wanted to assign a DataSource to my Telerik Report Q1 2009 during RunTime from my WebForm1 page which contains a ReportViewer.

((Telerik.Reporting.Report)this.ReportViewer1.Report).DataSource = ds;

Now I would like to from the same WebForm1 page access the Chart control that resides in my Report, Report1.

I also have a reporting Table as well that I would also like to hook up.

How would I attach a DataSource to both of these controls during RunTime in my WebForm1.cs code behind page?

Many thanks
Frédéric Martin
Top achievements
Rank 1
 answered on 14 Jul 2009
2 answers
236 views
Hi everyone,

I'm using MS Enterprise Library 4.1 DAAB and I'm trying to set the DataSource for my Report during Runtime in my WebApp.

I had found some old articles referencing

ReportViewer1.Report.DataSource = ...

However this does not seem to work with the latest release of Telerik Reports Q2 2009

Am I missing a reference or are there code examples of setting the DataSource during Runtime for a ReportViewer1.Report in my WebForm ?

Many thanks
Frédéric Martin
Top achievements
Rank 1
 answered on 13 Jul 2009
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?