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

need to understand if report completed.

4 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
aykut
Top achievements
Rank 1
aykut asked on 30 Nov 2012, 09:48 PM
In report class, I make some calculations. like:

my variable is declared like:

Protected  runningPageValue As Double


Private Sub pageFooter_ItemDataBound(sender As Object, e As EventArgs) Handles pageFooter.ItemDataBound
 
    Dim processingPageFooter = TryCast(sender, Telerik.Reporting.Processing.PageSection)
    Dim processingPageExecTextBox = TryCast(processingPageFooter.ChildElements.Find("txtSayfaToplami", True)(0), Telerik.Reporting.Processing.TextBox)
    runningPageValue += Convert.ToDouble(processingPageExecTextBox.Value)
 
    Dim processingRunningPageExecTextBox = TryCast(processingPageFooter.ChildElements.Find("TextBox3", True)(0), Telerik.Reporting.Processing.TextBox)
    processingRunningPageExecTextBox.Value = runningPageValue
 
End Sub

as a result when I refresh report, export report to pdf, print report etc.. all report events run again (naturally) but my variable never sets to zero. I tried all disposed events but could not succeeded.

I need to understand if report ends, then set runningPageValue=0

how a report component does not have completed event ? how should I use variables here ? please help. everytime report prints, refreshes or esports, number are groving, bigger and bigger.

4 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 03 Dec 2012, 06:44 PM
I had the same problem - and posted a few days ago
the best solution I found is to handle the UpdateUI event of the ReportViewer
  private void crViewer_UpdateUI(object sender, EventArgs e)
  {
      var viewer = sender as Telerik.ReportViewer.WinForms.ReportViewer;
      switch (viewer.ProcessingState)
     {
//        case Telerik.ReportViewer.WinForms.ProcessingState.NoReport:
//            MessageBox.Show("NoReport");
//            break;
//        case Telerik.ReportViewer.WinForms.ProcessingState.Partial:
//            MessageBox.Show("Partial");
//            break;
          case Telerik.ReportViewer.WinForms.ProcessingState.Processing:
//            MessageBox.Show("Processing");
              break;
          case Telerik.ReportViewer.WinForms.ProcessingState.Success:
//            MessageBox.Show("Success");
              this.IdleStage();
              break;
//        case Telerik.ReportViewer.WinForms.ProcessingState.Failure:
//            MessageBox.Show("Failure");
//            break;
     }
 }

Telerik processes its reports asynchronously

I had originally had the report trigger an event which the calling program caught - but Telerik techs said that interfered with ViewState
0
aykut
Top achievements
Rank 1
answered on 03 Dec 2012, 07:26 PM
thanks. I solved problem by checking page number in ItemDataBound event. if it 1, I reset the variables. even getting page number was nightmare.  But I've to say,  me and all our s/w development team really disappointed about telerik reporting component. if I were developing something like that and my employees would show me a report component like this, I would say "go look other components in the market first, then we talk". 
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 04 Dec 2012, 12:28 PM
I have to disagree, Telerik's reporting solution has been a breeze since I migrated from crystal, evaluated DevX prior making final decision on Telerik. You just try one of these and then come talk to me about disappointment ...
I'm not sure what exactly you poke, but have you tried doing this without coding, there is a RunningValue function that can be used directly in expression with specific scope: http://www.telerik.com/help/reporting/expressions-data-functions.html.
0
Elliott
Top achievements
Rank 2
answered on 04 Dec 2012, 02:45 PM
I'm with you Massimiliano

the Reporting itself is a little awkward, what with having to create a separate class library and all, then pasting the production connection string into the data source before recompliing the calling program

all that agita is more than made up when it comes to deployment - and the nightmare that is Crystal versions
Tags
General Discussions
Asked by
aykut
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
aykut
Top achievements
Rank 1
Massimiliano Bassili
Top achievements
Rank 1
Share this question
or