Ledger display

edited June 2010 in FastReport .NET
Hi,

I have attached a sample report format I have to print.

I have declared a variable and populate it at the start of the report for (A).

My reports first page is ok.

But I cannot find a way to derive the values of (B ) and to carry it to the next page and the consecutive pages.

The value of (B ) may be either Debit or Credit.

Please advice in this regard as soon as possible.

Thanks in advance. >

Comments

  • edited 1:09PM
    Hello,

    Please send the report file (.frx) to tz@fast-report.com.
  • edited June 2010
    AlexTZ wrote: »
    Hello,

    Please send the report file (.frx) to tz@fast-report.com.

    Hai,

    I have not yet started with the report.

    Here is my DB structure.

    1. Date
    2. Code.(Foreign Key connecting to the account name)
    3. DebitBalance
    4. CreditBalance.
    5. Details.

    I wanted to know if this is possible as this is the standard format of ledger in our part of the world or is there any other way to accomplish this.

    My Idea:

    1. Declare two variables for the debit and credit balances.

    2. Do the processing for the Opening balance(from 01.04 till date of report) and if the value is debit, populate the debit balance variable and hide the credit balance variable and vise versa.

    3. At the page footer, total both the variable and the column values (This I have not tried yet) and add another field to get the value of credit minus debit or vise versa.

    Upto this, I am somewhat clear. But from the second page onwards,

    4. I have to bring the balance (credit minus debit or debit minus credit) as balance brought forward (it may be debit or credit). - This I have absolutely no idea as how to accomplish and then at the page footer, I have to do the same calculation (a. debit variable + debit column, b. credit variable + credit column and if a > b, a-b should be assigned to the balance column else b-a should be assigned.

    Is this possible:

    1. Data column is the same for all pages.
    2. The opening balance comes only in the first page as debit or credit.
    3. The closing balance of the first page should be carried over to the second page and so on.

    I think this is clear enough. I don't usually start working unless I get a clear picture of the situation. That is why I have not still started working with the report.

    Thanks for reading this long post and I hope there will be a way to accomplish this.
  • edited 1:09PM
    Sorry, I cannot provide the complete guide on how to make this report. Here are some (basic) suggestions:
    - use totals that never reset (running totals). http://fast-report.com/documentation/UserM...nningtotals.htm
    - or, use manual calculation using private variables (declared in the report code). In the band's BeforePrint event, you may increment the variable with the debit/credit value.
  • edited 1:09PM
    I will give this a try and if I get into any problem, I will mail back with a sample report.


    Thanks for your suggestion.
  • edited 1:09PM
    Hi Alex,

    Thanks for guiding me in the right direction. I am working on the report and shall send the same in a short while.

    In the mean time, how shall I print the page footer at the end of the data band ( It prints at the end of page ) since I am writing the script to calculate the balance at the page footer.


    Thanks in advance.
  • edited 1:09PM
    Hi Alex,

    I have to print the report footer after the databand ((not at the end of page if data is less than a page, but at the end of page if the data is more than one page) I cannot use the data summary).

    Is this possible ?
  • edited 1:09PM
    Hello,

    PageFooter is always printed at the very bottom of a page. You may use the ColumnFooter band or DataFooter band (in the latter case, you need to set its option RepeatOnEveryPage to true).
  • edited 1:09PM
    Hi Alex,

    Thanks for your guidance.

    Please find enclosed the pdf report.
  • edited 1:09PM
    Hello,

    ... and what is the question? >
  • edited 1:09PM
    AlexTZ wrote: »
    Hello,

    ... and what is the question? >

    Hi Alex,

    I just wanted to thank you.

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.