This is a migrated thread and some comments may be shown as answers.

about brought forward and carry over

13 Answers 224 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suriya
Top achievements
Rank 1
Suriya asked on 14 Mar 2009, 12:43 PM
Dear Sir,

Thanks a lot for your help. Now We are in need of some methodology for putting the 'brought forward' and 'carried over' in the reports page front and bottom respectively if the records under a group extend a page. How is it possible to achieve this?
For example,

page 1
Group 1  --

1                        15  
2                        10
3                        25

carried over        50
.................................................
page 2
group 1 -

brought forward -- 50

4      ....            10
... and so on.

reply as soon as possible.,

By Suriya

13 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 17 Mar 2009, 12:36 PM
Hello Suriya,

Whether a group would be carried over to a new page is "decided" when the report is being rendered and you cannot know that on before hand, unless of course it is obvious that the group is too big to fit on a single page in general, but then there is no way to position the notice to be the last text on the current page, so this cannot be achieved.

Best wishes,
Steve
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
CHRISTIAN
Top achievements
Rank 1
answered on 06 Jan 2012, 11:18 AM
is a "carry over" to the next page possible since a new release?
0
Steve
Telerik team
answered on 11 Jan 2012, 11:00 AM
Hi guys,

I've attached a sample report that shows the requested functionality. In the report we use the PageExec Function which was added after our last reply.

Greetings,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
CHRISTIAN
Top achievements
Rank 1
answered on 12 Jan 2012, 02:04 PM
Hi Steve,

thx for your support.
I´ve implemented your suggestion in my application and it nearly works.
But after clicking the "Print-Preview" button the carryover variable isn´t reset to 0.
So if u repeatedly click "Print-Preview" the carryover value is summed up over and over again with the value from the last iteration.

I´ve commented your code to highlight the sections.

public partial class Report15 : Telerik.Reporting.Report
    {
        long x = 0;
 
        public Report15()
        {
            InitializeComponent();
 
//After clicking the "Print-Preview" button this point is passed trough and "x" is seemingly set to 0.
 
            this.x = 0;
        }
 
        private void pageTotal_ItemDataBound(object sender, EventArgs e)
        {
            Processing.TextBox pageTotal = sender as Processing.TextBox;
            Processing.TextBox previousPageTotal = pageTotal.Report.ChildElements.Find("previousPageTotal", true)[0] as     Processing.TextBox;
 
//But here "x" still has the value from the last iteration and is summed up again.
 
            previousPageTotal.Value = this.x;
            this.x += (long)pageTotal.Value;
        }
    }
 
    }
0
CHRISTIAN
Top achievements
Rank 1
answered on 16 Jan 2012, 03:56 PM
Any suggestion/solution?
0
Steve
Telerik team
answered on 17 Jan 2012, 02:55 PM
Hello CHRISTIAN,

I used Q2 2011 when making that report and it worked, however in the Q3 2011 version we made several optimizations one of which is to process the report only once i.e. the report constructor is invoked only once. Thus the zero-ing of the x variable is simply not happening on subsequent refreshes of the report. To make it work, you should zero it in some other event that is fired everytime e.g. Report_ItemDataBinding.

Kind regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
CHRISTIAN
Top achievements
Rank 1
answered on 18 Jan 2012, 01:29 PM
Hi Steve,

sorry but you´re totally wrong. The constructor is invoked every time hitting the print-preview button and the ItemDataBinding and ItemDataBound events aren´t. Why are you working with a older version?
0
CHRISTIAN
Top achievements
Rank 1
answered on 09 Feb 2012, 08:46 AM
Hey what´s up steve? My boss still wants this in the report...
0
Steve
Telerik team
answered on 11 Feb 2012, 03:24 PM
Hello CHRISTIAN,

I've already pointed you to a solution to your inquiry in my previous post by using the Report_ItemDataBinding event. I've attached a short video that shows the correct behavior with the latest official Q3 SP1 release version.

Kind regards,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
CHRISTIAN
Top achievements
Rank 1
answered on 13 Feb 2012, 10:43 AM
Hi Steve,

Thanks for the Video.
Please try the print-preview button. The value won´t be reset to 0.
0
Steve
Telerik team
answered on 13 Feb 2012, 01:39 PM
Hi CHRISTIAN,

That is expected because when you switch views, the report is not processed again, only re-paged i.e that is the reason why only events of the items in page sections are triggered. I've attached modified version of the sample where I've removed all event handlers and use functions instead. In order to avoid any concurrent issues I persist the page total in the current report instance and for this purpose I use instance function instead of the globally scoped static User Functions. The expression I use in the TextBox is

= ReportItem.Report.ItemDefinition.PreviousPageTotal(PageNumber, PageExec("textBox1", Sum(Fields.A)), ReportItem)

where ReportItem.Report.ItemDefinition.PreviousPageTotal is the instance function we’ve defined in the report definition.

Kind regards,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
CHRISTIAN
Top achievements
Rank 1
answered on 16 Feb 2012, 01:29 PM
Hi Steve,

i can´t open your attached files. The designer throws an exception telling the type "Telerik.Reporting.Examples.CSharp.Report15Data" can´t be found.
Do i need the designer to see any function e.g. conditional formatings!?
0
Steve
Telerik team
answered on 16 Feb 2012, 03:33 PM
Hello CHRISTIAN,

This is the same report I've sent originally, I only modified the logic not to use report events. Please drop this report inside the CSharp.ReportLibrary, run the Upgrade Wizard, rebuild your project and run the report again.

Greetings,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Suriya
Top achievements
Rank 1
Answers by
Steve
Telerik team
CHRISTIAN
Top achievements
Rank 1
Share this question
or