Telerik Forums
Reporting Forum
1 answer
310 views

I have a dataset that contains multiple tables in it. What I want to do is find a way to take the values(and when I say "values" I do mean the plural "values") from a column within one table of the dataset and display them in a  textbox. When I try to feed the values into an arraylist the values do not display correctly in design time. (Just shows the namespace object in the preview tab of VisualStudio) When I add the values to a string, I get the last value in the column which doesn't help me but it at least means I can iterate through the column values.  Any idea as to how to make this work? How to get all the values in the column and bind to a textbox value. Below is the code i'm trying to use.
-Jason

   SqlConnection connSomsys = new SqlConnection(@"Server=cmdivst004\Jason08;Integrated Security=false;Database=QuoteDB; Persist Security Info=True;User ID=cmdiapp;Password=adiadmin");  
            SqlCommand selectCommand;  
            connSomsys.Open();  
              
            selectCommand = new SqlCommand("sprocgetProductListQuoteTotals", connSomsys);  
            selectCommand.CommandType = CommandType.StoredProcedure;  
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);  
            DataSet dataSet = new DataSet();  
            adapter.Fill(dataSet);  
            ArrayList myAL = new ArrayList();  
             
            DataTable tbl = dataSet.Tables[1];  
            for (int i = 0; i < tbl.Rows.Count; i++)  
            {  
 
 
                DataRow myRow = tbl.Rows[i];  
                myAL.Add(myRow["ProductList"].ToString());  
 
 
            }  
 
              textBox4.Value = myAL.ToString();  
 
Steve
Telerik team
 answered on 15 Jul 2009
1 answer
343 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
592 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
203 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
166 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
177 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
154 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
242 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
108 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
163 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
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?