Telerik Forums
Reporting Forum
4 answers
302 views
I'm moving session state to "sql mode" but I've some problems with performance in asp.net.

When using "inproc mode" the ReportViewer shows the report after 2.8 secs, while in "sql mode" it takes more de 30 secs. Is this normal?
My report has only one page with some images.

Thanks!
Jorge
Top achievements
Rank 1
 answered on 29 Apr 2011
1 answer
75 views
On the page code file, where is my reporting viewer I use:

XOReportingLibrary.Company.TheCompanyReport CReport = new XOReportingLibrary.Company.TheCompanyReport();
Telerik.Reporting.Report theReport = (Telerik.Reporting.Report)this.ReportViewer1.Report;
theReport.ReportParameters["CompanyName"].Value = "SomeCompanyName";

On the report code file I'm using:

string strCName = this.ReportParameters["CompanyName"].Value.ToString();

but this.ReportParameters["CompanyName"].Value.ToString()... by some reasone is NULL and does not works...
XOReportingLibrary is the name of the library, and TheCompanyReport is the name of the report

P.S.
If you have some simple code please send me!
Steve
Telerik team
 answered on 29 Apr 2011
3 answers
208 views
Hi,

   I need to format the crosstab. I need to change the background of the entire row (row & value field) based on the value of a field. How can it be done?

Thanks in advance.
Steve
Telerik team
 answered on 29 Apr 2011
2 answers
645 views
Hello...

I am attempting to duplicate an Excel report that has a two row header with column spans within those two rows. All the header text is static.

In the detail, have have some rowspans and a few static text cells, the details ends up being 4 rows.

From reading through the docs, it looks as if I need to use a table to accomplish the two row header (I want this header to repeat at the top of each page as well).

I am also binding to an object data source. I have created a wrapper class to simplify binding. It is very similar to the docs using the Car and Cars classes. However, I just want bind my report to a System.Collections.Generic.List<Car> rather than making an unneeded Cars class. However, I run into problems getting my report and table to bind properly so that I can simply show the 4 row detail (remember 4 rows per bound item, this is due to horrible formatting in the original report, sort of a summary table approach for each item).

So, given that I have 8 items bound and lets say only one item fit on a page (due to the large multirow header), I would end up with 8 Pages. Table header on each page, followed by the bound report items (textboxes only) for the current item.

I hope that is a clear explanation of what Im trying to do... now for my questions. :-)

1. How do I set up DataBinding for the report and Table? I tried binding directly to the equivalent Car class and also setting that data source to the table, but that didn't work at all. It seems I have to create an equivalent Cars class to wrap the list only? Seems unneeded tho?

2. When I drag a table onto my report detail I get the standard 3 column table header and table detail. Once I started adding rows and columnns and then merging them, the table looked great but once I previewed, I started getting missing cells. Is there some sort of trick to getting cells added and merged so that they stay in the header? Things really started to get weird in the header when I added multiple rows, in the end, the only header cells that showed up were in the original header row, the row I added above refused to render. If I merged any cells to the top row of the header, the refused to render too.

I attached a screenshot of the report I am trying to make so you can see the messiness. The header is highlighted in Yellow and the bottom 4 rows are repeated *for each* bound item. In the photo, there are two bound items that would be shown in the 8 rows below the header. I had to blur it to protect the content somewhat, but it is still good for layout purposes.

thank you

ja

Im using Reporting Q3 2010 and winforms + ASP in .NET 3.5
Jess Askey
Top achievements
Rank 2
 answered on 28 Apr 2011
4 answers
281 views
When previewing a report I get the following error:

Unable to cast object of type 'SqldataObject' to type 'Telerik.Reporting.Processing.Expressions.IHierarchicalData'

I have narrowed down the problem to a textbox that has

=Sum(Exec("group4",Fields.Amount1))

Any help is appreciated
Steve
Telerik team
 answered on 28 Apr 2011
2 answers
259 views
Hello,

I'm using VS 2008 Q1 2010 Telerik Reporting

I'm attempting to set and bind a Telerik.Reporting.Processing.Table inside of the Detail's detail_ItemDataBound event and I'm running into some trouble.

I currently have a simple table inside my Report's detail. The table has a header and a detail row that repeats.

Originally I was binding the table to a DataTable inside of the DataBind() and having no issues.  After having some trouble getting the table's groupings correct I decided it would be a little more practical move the Telerik.Reporting.Processing.Table binding inside the detail_ItemDataBound event and bind it there with the correct data.  When I move the binding inside the detail_ItemDataBound event I get a blank table with no data.

Below is my code from the detail_ItemDataBound event:
private void detail_ItemDataBound(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.DetailSection detail = (Telerik.Reporting.Processing.DetailSection)sender;
    Telerik.Reporting.Processing.TextBox txtHierarchicalEntityID = (Telerik.Reporting.Processing.TextBox)detail.ChildElements.Find("txtHierarchicalEntityID", true)[0];
    Telerik.Reporting.Processing.Table tblReport = (Telerik.Reporting.Processing.Table)detail.ChildElements.Find("tblReport", true)[0];
 
    int hierarchicalEntityID = Convert.ToInt32(txtHierarchicalEntityID.Text);
 
    dsReporting dsBindingData = new dsReporting();
 
    foreach (dsReporting.AssessmentResultsChartRow currRow in dsRaw.AssessmentResultsChart.Rows)
        if ((int)currRow["HierarchicalEntityID"] == hierarchicalEntityID)
            dsBindingData.AssessmentResultsChart.ImportRow(currRow);
 
    dsBindingData.AcceptChanges();
 
    tblReport.DataSource = dsBindingData.AssessmentResultsChart;
}

Am I missing anything simple that would keep the tblReport from binding correctly?

Thanks for the help and let me know if you need anything else,
Allen
Allen Smothers
Top achievements
Rank 2
 answered on 28 Apr 2011
1 answer
107 views
I have a bar report that is using the NeedDataSource event to set the datasource and labels. On the initial report load the data is correct but the labels are just 1,2,3,... If I refresh the report I get the correct text labels (AUS Approved, AUS Declined,etc...). I have stepped through the code to verify that the dataset is being populated correctly on the initial load. However, when I get to the line of code that sets any of the series elements I get the following error message:"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index". I am trapping for any errors so the report will load with the correct data but no text for the labels. On a refresh I do not get the error and the label appear correctly. Here is the code for my NeedDataSource event:

private void chart1_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Chart procChart = sender as Telerik.Reporting.Processing.Chart;
              
            string sql = @"SELECT COUNT(l.[LookupID]) as 'AUSStatusCnt',l.[ClientLookupValue] as 'AUSStatus' 
                            FROM [AUS] a 
                            INNER JOIN [Organization] o ON a.[OrganizationID]=o.[OrganizationID] 
                            INNER JOIN [Lookup] l ON l.[LookupID] = a.[AUSStatusID] 
                            where  a.[AUSID] in ([dbo].[udf_GetLastAUSStatus](a.[AUSParentID])) 
                            AND a.[OrganizationID]=@OrganizationID AND l.[LookupTypeID]=13 
                            and l.[Active]=1 
                            AND a.[UpdatedByDate] >= DATEADD(d,-90,GETDATE())
                            GROUP BY l.ClientLookupValue,l.LookupID";
             
              
            SqlConnection sqlCnn = new SqlConnection();
            sqlCnn.ConnectionString = ConfigurationManager.ConnectionStrings["appConnString"].ConnectionString;
            try
            {
                DataSet ds = new DataSet();
                SqlCommand sqlCmd = new SqlCommand(sql,sqlCnn);
                sqlCmd.Parameters.Add("@OrganizationID",SqlDbType.Int);
                sqlCmd.Parameters["@OrganizationID"].Value = int.Parse(Report.ReportParameters["OrganizationID"].Value.ToString());
                SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd);
                adapter.Fill(ds);
  
                procChart.DataSource = ds;
                chart1.Series[0].DataLabelsColumn = "AUSStatusCnt";
                chart1.Series[0].DataYColumn = "AUSStatusCnt";
                  
                chart1.Legend.Visible = false;
  
                chart1.PlotArea.XAxis.DataLabelsColumn = "AUSStatus";
                chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 0;
                chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.DarkSlateBlue;
                chart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Reporting.Charting.Styles.Unit.Percentage(20);
                chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 10,FontStyle.Bold);
  
                  
  
                adapter.Dispose();
                sqlCmd.Dispose();
                sqlCnn.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error loading report! ");
            }
  }
Steve
Telerik team
 answered on 28 Apr 2011
3 answers
112 views
Hello,

I know in a "detail" page of a report you can create a "loop". In my app I make each detail area show a ticket.
Right now my detail area fits 5 boxes- one on top of antoher.

Is it possible to make a detail area go both horizontal & verticle?
In .net webform this would like like setting a RadioGroup or TableView to repeat 2 columns wide and unlimited long.

Sample of what I'm trying to accomplish: http://img101.imageshack.us/img101/5752/10perpage.png

As you can see it loop 2 columns wide. If there's an odd number of rows the last column on the last row would be blank.
Massimiliano Bassili
Top achievements
Rank 1
 answered on 28 Apr 2011
6 answers
200 views
Hi I have a problem with Telerik Reporting or a challenge ;-)

I have a report of 3 records in a table as shown below and need to display based in value, and total up based upon value...
Field name is Fields.Amount

Description                            Debit                Credit
Product X                                120.00        
Product Y                                240.00
Payment A                                                    200.00
========================================
Totals                                    360.00            200.00
Balance                                160.00


Any help appreciated.

Desmond.
Desmond
Top achievements
Rank 1
 answered on 28 Apr 2011
3 answers
230 views

Friend I have query in Drillthrough Report I have two report Rone and Rtwo , I add report two as Drillthrough Report so when we open Rone we can go at Rtwo.
Now I want to know how I can come back again , when it open Drillthrough Report , Rtwo , how I can come back again on previous report , Rone.

I hope my question is clear.

Thanks

Steve
Telerik team
 answered on 28 Apr 2011
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?