Telerik Forums
Reporting Forum
2 answers
146 views
I have a report with four sub reports, when I export it to pdf or excel it all looks fine, but when I export it to CSV none of the data from the sub reports is exported. Is this expected behaviour or have I just missed something simple.

Thanks for any help

Patrick
PJB
Top achievements
Rank 1
 answered on 03 May 2011
4 answers
206 views
I have seen various threads on this issue, but have failed to find a solution.

Using Q3 2009, I am creating an invoice report as a master-detail report.  It prints on a pre-printed form.

There is a page header set to print on each page.  There is a page footer which (ideally) I would like printed on the last page only, and contains the totals.  At present it prints on each page, if there is more than one, and I can't find a way of suppressing print on all but last page in code.

I could perhaps delete the page footer, and put the totals in a report footer, which would obviously print on the last page, but then the footer appears immediately after the detail lines, whereas I am printing on a preprinted form, and the totals must be at the bottom of the page.

You have a demo on creating an invoice report, but it seems to me too simplistic.  Most invoices will want running totals (c/f and b/f) and many will want the final totals at the foot of the final page instead of at a random position.

Can anyone advise please?


Theodor
Top achievements
Rank 1
 answered on 02 May 2011
6 answers
248 views
I have a report like that
groupheader1
    groupheader2
        detail
    groupfooter2
groupfooter1

for some groupheader2, i need a page break page.
I write some code, like that :

 

        private void groupHeader2_ItemDataBinding(object sender, EventArgs e)  
        {  
            Telerik.Reporting.Processing.GroupSection headerAgent = (Telerik.Reporting.Processing.GroupSection)sender;  
            LinqEntityBaseLoan.ComAPayer com = headerAgent.DataObject.RawData as LinqEntityBaseLoan.ComAPayer;  
            headerAgent.Visible = com.Agent_ID != com.SuperAgent_ID;  
            if (headerAgent.Visible)  
                this.groupHeaderAgent.PageBreak = PageBreak.Before;  
            else 
                this.groupHeaderAgent.PageBreak = PageBreak.None;  
        } 

but the result is that in the next printed header, the page break will occur.
I try to change to headerAgent.PageBreak = PageBreak.Before but PageBreak is readonly. It seems that the ..Engine.ReportSection is created before Report.ReportSection (it is normal) and can not be changed (but visible can be !).

After a long search, i created a fake group :
groupheader1
    groupheader2fake
    groupheader2
        detail
    groupfooter2
    groupfooter2fake
groupfooter1

And write the event groupHeader2fake_ItemDataBinding.

Is it normal to proceed like this ? A settable Break Page or an event before the creation of Engine.ReportSection can be usefull !


 

danparker276
Top achievements
Rank 2
 answered on 29 Apr 2011
5 answers
150 views
I appreciate the help in advance!

I have some code here for a chart in my report which resides in the NeedDataSource for the chart.  Everything's working great "except one line" which should change the "stacked bar 100" chart Y labels to percentages (I have four databound series which show fine on the chart otherwise):

 

 

For ThisOne As Integer = 0 To 4

 

 

 

Me.Chart1.Series(ThisOne).Name = Me.ReportParameters("DataTitle" + (ThisOne + 1).ToString).Value

 

 

 

Me.Chart1.Series(ThisOne).Appearance.LabelAppearance.LabelLocation = Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside

 

 

 

Me.Chart1.Series(ThisOne).Appearance.LabelAppearance.Position.AlignedPosition = Charting.Styles.AlignedPositions.Center

 

 

 

Me.Chart1.Series(ThisOne).Appearance.TextAppearance.TextProperties.Color = Color.Black

 

 

 

Me.Chart1.Series(ThisOne).Appearance.Shadow.Blur = 4

 

 

 

Me.Chart1.Series(ThisOne).Appearance.Shadow.Distance = 2

 

 

 

Me.Chart1.Series(ThisOne).Appearance.Shadow.Position = Charting.Styles.ShadowPosition.BottomRight

 

 

 

Me.Chart1.Series(ThisOne).DefaultLabelValue = "#%"

 

 

 

Next

 


I expected from the documentation and forums that the "DefaultLabelValue" line would change the stacked bar labels to percentages but it does not for me.  I can set the DefaultLabelValue property at design time and all looks dandy, however, that property gets wiped out at the time of the NeedDataSource, hence my feeble attempt here to make things right...

Please point me to the errors of my ways so I can wrap up this chart!

Thanks,
Steve
Rose
Top achievements
Rank 1
 answered on 29 Apr 2011
4 answers
282 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
69 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
199 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
623 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
272 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
251 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
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?