Display sub total Duration in Footer Band

mohanarajmohanaraj 600001
edited November 2009 in FastReport .NET
Dear all,

How to display the Total Duration in the footer band present in the Data band. In this i want to display the sub Total Duration
i want to pass the value to the function

private string SecondsToHHmmss(int seconds)
{
int hours = seconds / 3600;
seconds = seconds - (hours * 3600);
int minutes = seconds / 60;
seconds = seconds - (minutes * 60);
return String.Format("{0:00}:{1:00}:{2:00}", hours, minutes, seconds);
}

Previously i display the duration in this band by creating new total field and select " Print on the band" option and select this footer band i done it in design mode the display in total second i want to display it in HH:MM:SS so i want to pass this total duration to the above function how can i achieve this.

And also the report summary calculation goes wrong.

Thanks in advance.

Comments

  • edited 9:26AM
    Hello,

    Put this text in your Text object (where you want to print the total):

    [SecondsToHHmmss([TotalDuration])]

    where "TotalDuration" is the name of your total.
  • mohanarajmohanaraj 600001
    edited November 2009
    AlexTZ wrote: »
    Hello,

    Put this text in your Text object (where you want to print the total):

    [SecondsToHHmmss([TotalDuration])]

    where "TotalDuration" is the name of your total.

    Dear Alex,

    Thanks.

    I display the total Cost when the all the cost is 0.00 means the sum display as 0.
    how i make this 0 to 0.00 How i format?
  • edited 9:26AM
    Right-click the Text object which displays the total cost, and select "Format...". Choose appropriate format (Currency).
  • mohanarajmohanaraj 600001
    edited 9:26AM
    AlexTZ wrote: »
    Right-click the Text object which displays the total cost, and select "Format...". Choose appropriate format (Currency).

    Dear Alex,

    Thanks,

    But i don't want to display currency symbol "$". I cut down the code (Format.CurrencySymbol="$") in frx file but any way it display.

    How i remove the symbol.
  • edited 9:26AM
    Choose another format, "Number".

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.