Telerik Forums
Reporting Forum
3 answers
235 views
Hello,

I am having a problem with my Telerik Report using Datasource on Postback even when I explicitly create and bind a new Datasource to the report in the code behind.

I have a Dropdownlist on my page that contains date ranges I can select to populate the report with.  Next to that I have a "Get Report" button that when clicked fetches the necessary rows from the database, processes them, manually builds a Dataset, and then binds the Dataset to the report.

This works great the first time I generate the report after visiting the page.  However, when I select a new date range from the dropdown and click the Get Timesheet button, the same data from before is displayed.  The Report or ReportViewer appears to be using cached data and I do not know how to refresh it.  The documentation shows a public RefreshReport method in the ReportViewer class that does not actually show up in Visual Studio for me.  Even when I click the refresh button on the ReportViewer, the data remains the same.  I realize that I am not using the standard method to set report parameters, but due to the way I have to build the DataSet I am unable to set the parameters directly on the report.

Any help is greatly appreciated.




Steve
Telerik team
 answered on 29 Sep 2009
12 answers
751 views
How do I uninstall Q1 2008 release ?

When I try to uninstall I get an error saying that it can not connect to the master database on SQL ....  and then it rolls back the uninstall !!

I have not changed my SQL configuration.
Steve
Telerik team
 answered on 29 Sep 2009
3 answers
640 views
I keep seeing this red error box with a cryptic message and an instruction to "See innerException for details" (or something to that effect.

How does one check this innerException?

Thanks
Rick
Top achievements
Rank 1
 answered on 29 Sep 2009
2 answers
91 views
Hi

I am new to reporting and have looked at using either crystal and Telerik.  I have to say that as a newcomer TR is many times more intuitive than CR.  However i am a little stuck on how to approch a problem.

I want to produce a grid type layout based on a users request at runtime.  The layout is just header rows and detail rows.  However i do not know how many columns there will be.  Ther could be as few as three or as many as 8.  The data requested by the user contains the number of columns and the approprate widths of each coumn.  This was made to work by a progammer using vb6 and CR by creating a grid of 10 columns and hiding the unwanted ones at runtime.

However, i guess we could add the columns at runtime using code behind.  Unforrtunately there is very few examples for me to look at.  Can someone provide some examples of adding columns programmatically to simple header detail table.

Is it posible using the group structure to do this without code behind.  So that the table automatically adds the headers along the top creating as many columns as neccessary and then places the row data below?

My Table        
Header 1 Header 2 Header 3 Header x
Row 1 detail 1 Row 1 detail 2 Row 1 detail 3 Row 1 detail x
Row 2 detail 1 Row 2 detail 2 Row 2 detail 3 Row 2 detail x
Row 3 detail 1 Row 3 detail 2 Row 3 detail 3 Row 3 detail x
Row 4 detail 1 Row 4 detail 2 Row 4 detail 3 Row 4 detail x




Many thanks

Al
Al
Top achievements
Rank 1
Iron
 answered on 28 Sep 2009
1 answer
85 views
I'm getting my data for the chart from a linq query

            var reportData = from a in data  
                             group a by a.OrderType  
                                 into b  
                                 select new   
                                 {  
                                     OrderType = b.Key,  
                                     Orders = b.Count(),  
                                     OrderTotal = b.Sum(p => p.OrderTotal),  
                                     Tax = b.Sum(p => p.Tax),  
                                     Costs = b.Sum(p => p.ActualCost),  
                                     Profit = b.Sum(p => p.Profit)  
                                 }; 

And setting the data in NeedDataSource

            var procChart = (Telerik.Reporting.Processing.Chart)sender;  
            var defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition;  
            defChart.Series.Clear();  
            var series = new ChartSeries  
                             {  
                                 Type = ChartSeriesType.Pie,   
                                 DataYColumn = chartColumn,   
                                 DataLabelsColumn = "OrderType",   
                                 DefaultLabelValue = "#Y - #%" 
                             };  
            defChart.Series.Add(series);  
            procChart.DataSource = DataSource; 

where chartColumn is OrderTotal, Profit, Costs, or Orders depending on the chart.  The DefaultLabelValue I understand is getting ignored because of the DataLabelsColumn.  Is there a way to supply the "#Y - #%" to the chart along with the DataLabelsColumn as it would be needed for the label as well?
Steve
Telerik team
 answered on 28 Sep 2009
4 answers
89 views
Hi,

I would like to export a treeview in a report.
I have to do a page-break in some cases between my nodes.. I read that's not possible to do a page-break programmatically !

How can I solve this problem ?? Any idea ??

Thanks a lot

Cheers,
David
David Chételat
Top achievements
Rank 1
 answered on 28 Sep 2009
3 answers
954 views
I have a main report that contains quite a few subreports. The outline of the main report is below:

------------------------------------
SUBREPORT 1
SUBREPORT 2
SUBREPORT 3

When I generate the report, if SUBREPORT1 does not contain any data I expect the rendered report to look like:

--------------------------------------
SUBREPORT2 DATA
SUBREPORT3 DATA

However, what I am getting rendered is similar to below:
------------------------------------

SUBREPORT 2
SUBREPORT 3

I want SUBREPORT2 to move up closer to the line if SUBREPORT1 does not get rendered. How do I accomplish this? I've played around with the CanGrow and CanShrink properties but that does not seem to solve the issue? Can this be done? Thanks!
PJ Rodriguez
Top achievements
Rank 1
 answered on 27 Sep 2009
3 answers
284 views
Hi all

I am using DataSet as datasource and within each record it has ExtendedProperty. The only way to utilise this, I have to do in ItemDataBinding event doing some manipulatation.

In detail, I have DataTable that I pass to Telerik Reporting class. I believe I need to do the manipulation on the ItemDataBinding so I register that.
Here's my DataSet looks like:

KeyUser; Weight, 705; 707; 709; 711; 713; 715; 717; 721; 723     >> FieldName
User1; 10; A; B; C; D; A; B; C; D; A; B;                                            >> Record1 
User2; 20; B; C; D; A; B; C; D; A; B; C;                                            >> Record2
User3; 30; C; D; A; B; C; D; A; B; C; D;                                            >> Record3


705; 707; 709; 711; 713; 715; 717; 721; 723 are dynamics heading which is mapped to Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10. These field name could be different depending on the query.

We put this mapping under the ExtendedProperties within DataSet that we have.

In the report designer, I set in such a way in the detail section of the report, I put name the textbox as follow:

txtbxdtlKeyUserValue
txtbxdtlWeightValue
txtbxdtlAnswer1Value
txtbxdtlAnswer2Value
txtbxdtlAnswer3Value
txtbxdtlAnswer4Value
txtbxdtlAnswer5Value
txtbxdtlAnswer6Value
txtbxdtlAnswer7Value
txtbxdtlAnswer8Value
txtbxdtlAnswer9Value
txtbxdtlAnswer10Value

So my question is now how do I loop through recordset in my DataSet in order to fill in to these textboxes (in Telerik Reporting) ?

Heres my sample MostPreferredReport class report.

namespace EUCTVIReports   
{   
    using System;   
    using System.ComponentModel;   
    using System.Drawing;   
    using System.Windows.Forms;   
    using Telerik.Reporting;   
    using Telerik.Reporting.Drawing;   
   
    /// <summary>   
    /// Summary description for MostPreferredReport.   
    /// </summary>   
    public partial class MostPreferredReport : Telerik.Reporting.Report   
    {   
        public MostPreferredReport()   
        {   
            /// <summary>   
            /// Required for telerik Reporting designer support   
            /// </summary>   
            InitializeComponent();   
            ItemDataBinding += new System.EventHandler(MostPreferredReport_ItemDataBinding);   
        }   
   
        public DataTable Source   
        {   
            get   
            {   
                return this.Source;   
            }   
            set   
            {   
                this.DataSource = value;   
            }   
        }   
   
        void MostPreferredReport_ItemDataBinding(object sender, System.EventArgs e)   
        {   
            // SEE: http://www.telerik.com/help/reporting/faq-combine-values2.html   
   
   
            //Telerik.Reporting.Processing.DetailSection section = (Telerik.Reporting.Processing.DetailSection)sender;   
            //System.Data.DataRow row = (System.Data.DataRow)section.DataObject.RawData;   
            //if ((row["ProductName"] != null) && (row["ProductName"].ToString().Length != 0))   
            //{   
            //    Telerik.Reporting.Processing.TextBox procTextbox = (Telerik.Reporting.Processing.TextBox)section.ChildElements.Find("productNameDataTextBox", true)[0];   
            //    procTextbox.Value = row["ProductCategory"].ToString() + " " + row["ProductSubCategory"].ToString();   
            //}   
   
        }   
    }   
}  


I am appreciated your comment.

Steve
Telerik team
 answered on 25 Sep 2009
1 answer
253 views
I have a customer that reports that when they render a report, the CPU on the server spikes to 100%. They are not too worried about the CPU usage in itself (it is a big report and they know it will take some time to render). But they ARE concerned that the report generation is consuming so much CPU that other interactive requests to the server cannot be quickly serviced.

Is there a way to limit the amount of CPU used or to set the thread priority to lower than normal for the thread that is servicing the render request? In .NET, I know you can set a thread's priority before starting the thread, but can it be changed once the thread has started? I am thinking that in the NeedDataSource callback for my report I could set the current thread's priority to belowNormal, but I don't know if there will be unwanted side effects. I am assuming that the thread that services the render request is a normal IIS-provided thread and that when it is done servicing the rendering request it will exit (thus, the low priority setting of the thread won't affect any other requests since the thread won't be servicing any other requests).

Has anyone tried limiting the cpu usage of a rendering request?

Thanks,
-Eric

keywords: Telerik Reporting Performance
Svetoslav
Telerik team
 answered on 25 Sep 2009
1 answer
192 views
I'm making a SSCC barcode using EAN128 symbology and i'm having trouble inserting the end of field character for a concatenated barcode.

Example:   (01)12345678901234(37)20(10)09092559725

I need a FNC1 character which scans as "F1" after the quantity of 20. <GS> or Chr(29) does not conform to the customer's standards and Chr(200) is an invalid character. It seems the "StartC" and "F1" characters are inserted automatically to the start of the barcode. I just need to know what the ascii code or string representation for the "F1" character is, please.

Charlie
Ivan
Telerik team
 answered on 25 Sep 2009
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?