problem in calculating total

Markandey_PandeyMarkandey_Pandey Member Posts: 178
Hi all,

I have created a Report "Sales Register" using Sales "Invoice Header" and "Sales Invoice Line".
Here "Sales Invoice Line" is indented under "Sales Invoive Header"
Following are the properties of Line Table i have used.

DataItemTable->Sales Invoice Line
DataItemTableView->SORTING(Sell-to Customer No.)
DataItemLinkReference->Sales Invoice Header
DataItemLink->Document No.=FIELD(No.)
TotalFields->Quantity,Unit Price,Amount,Tax Base Amount,Amount To Customer

I am not able to print the total of the following fields:-
Quantity,Unit Price,Amount,Tax Base Amount,Amount To Customer

I had also tried with Integer table and had placed the total fields on Body Section of Integer

still i am not able to solve this issue.


Can anybody help me.
Markandey Pandey

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Under which section do you print the totals?
  • DenSterDenSter Member Posts: 8,304
    Put those fields into a footer section for the Sales Invoice Line dataitem, no code necessary.
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    kapamarou wrote:
    Under which section do you print the totals?

    i am printing the totals on footer section of Sales Invoice Line data item, but not getting the total, instead it is giving the same values for each lines.
    Markandey Pandey
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    DenSter wrote:
    Put those fields into a footer section for the Sales Invoice Line dataitem, no code necessary.


    I have already tried this but its giving the same value (i.e, QTY, RATE, etc) for each line but i want to display the total only at the bottom of the page.
    Markandey Pandey
  • kapamaroukapamarou Member Posts: 1,152
    Have you added any code? Can you show us exactly what you've done?
  • hemantOnehemantOne Member Posts: 98
    Actually if u want that total to print only at the bottom of page
    then use it in Sales header footer section.....
    because sale line footer is print after each record.....
    it is basically depend on where u get the values and where to put the total...........this is only flow problem.....
    Regards,
    Hemant
    They can conquer who believe they can
    .
  • Manish_AhlawatManish_Ahlawat Member Posts: 31
    Have you put these fields in the Total fields property..
    Rule from today: Never take others comment in a wrong way, these might help you to travel a long way in your carrier.
  • vijay_gvijay_g Member Posts: 884
    Have you put these fields in the Total fields property..

    First read qus. carefully and then reply.
  • DenSterDenSter Member Posts: 8,304
    I have already tried this but its giving the same value (i.e, QTY, RATE, etc) for each line but i want to display the total only at the bottom of the page.
    You need to give us more information about the design or we won't be able to help you. Of course you're going to see a footer under the line dataitem when it goes back to the 'parent' dataitem, or a groupfooter will print when the grouping field changes value, that is the nature of the report object. You're not telling us everything so tips that you get based on incomplete information is not going to solve your problem, because it is all connected.

    You can have footers, groupfooters, or transfooters. Depending on the property values and the dataitem that they belong to, you will see different behavior. Reports are not very easy but once you figure out how they work it is pretty straightforward to decide where what goes.

    Think about the flow of the report, how each dataitem loops, where you want the totals, and then decide where to put what type of total at which point in the report.

    If you want help from Mibuso, you need to give us a complete picture. What I would do though is walk to your senior and ask them for help. This is typically something seniors help juniors with, it is something that is easiest to explain while sitting side by side.
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    hemantOne wrote:
    Actually if u want that total to print only at the bottom of page
    then use it in Sales header footer section.....
    because sale line footer is print after each record.....
    it is basically depend on where u get the values and where to put the total...........this is only flow problem.....


    Hi thanx for the reply,

    I tried this but its giving "0.0" as total value.
    Markandey Pandey
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    DenSter wrote:
    I have already tried this but its giving the same value (i.e, QTY, RATE, etc) for each line but i want to display the total only at the bottom of the page.
    You need to give us more information about the design or we won't be able to help you. Of course you're going to see a footer under the line dataitem when it goes back to the 'parent' dataitem, or a groupfooter will print when the grouping field changes value, that is the nature of the report object. You're not telling us everything so tips that you get based on incomplete information is not going to solve your problem, because it is all connected.

    You can have footers, groupfooters, or transfooters. Depending on the property values and the dataitem that they belong to, you will see different behavior. Reports are not very easy but once you figure out how they work it is pretty straightforward to decide where what goes.

    Think about the flow of the report, how each dataitem loops, where you want the totals, and then decide where to put what type of total at which point in the report.
    If you want help from Mibuso, you need to give us a complete picture. What I would do though is walk to your senior and ask them for help. This is typically something seniors help juniors with, it is something that is easiest to explain while sitting side by side.



    hi thanx for the reply,

    i am sending the screenshot of the design of the report.
    I have used two data items , "Sales Invoice Header" and "Sales Invoice Line"

    What i want is, to sumup the numeric fields like Rate, Qty, Amount,etc at the bottom of the
    report.
    Markandey Pandey
  • kapamaroukapamarou Member Posts: 1,152
    You are printing the total on different dataitem's section.

    The principle is the following:

    If you declare the totals for the sales line table you can use them in the sales line sections.


    If you want to move them in the Header sections you will need to use the command

    CurrReport.CREATETOTALS on the onpredataitem trigger of the header...
  • hemantOnehemantOne Member Posts: 98
    you said that u fill the total field property of sale invoice header dataitem so total must be print on sale invoice header dataitem footer if the field exist in sale invoice header dataitem.
    Regards,
    Hemant
    They can conquer who believe they can
    .
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    kapamarou wrote:
    You are printing the total on different dataitem's section.

    The principle is the following:

    If you declare the totals for the sales line table you can use them in the sales line sections.


    If you want to move them in the Header sections you will need to use the command

    CurrReport.CREATETOTALS on the onpredataitem trigger of the header...


    But the header is not having those fields for which i want the sum to be displayed in the bottom
    can u explain me what u want t say in the line that i am hilighting
    f you declare the totals for the sales line table you can use them in the sales line sections.
    Markandey Pandey
  • kapamaroukapamarou Member Posts: 1,152
    If you want to use the salesinvoiceline.amount as a total for header sections you should try on th OnPreDataItem of the SalesInvoiceHeader putting:

    CurrReport.CREATETOTALS(SalesInvoiceLine.Amount);
  • DevendraSharmaDevendraSharma Member Posts: 23
    Hi All,

    Please don't confuse,if you create report for sales invoice then sales header alway's Print one time in report (if sales header Print more than one then report not run for a invoice) . now if want to print total amount field And other field for a invoice you can put these field in GroupTotalFields of sales invoice line table(Data item), And if want to calculate anyother calculation u can use or put on CurrReport.CREATETOTAL("field", "may be any veriable"); OnPreDataItem of sales invoice line (Data item/Table),

    Now if you want to show this Total on Bottom of Page(Report) you put this in footer sections

    Thank's !!!!

    Devendra
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    DenSter wrote:
    I have already tried this but its giving the same value (i.e, QTY, RATE, etc) for each line but i want to display the total only at the bottom of the page.
    You need to give us more information about the design or we won't be able to help you. Of course you're going to see a footer under the line dataitem when it goes back to the 'parent' dataitem, or a groupfooter will print when the grouping field changes value, that is the nature of the report object. You're not telling us everything so tips that you get based on incomplete information is not going to solve your problem, because it is all connected.

    You can have footers, groupfooters, or transfooters. Depending on the property values and the dataitem that they belong to, you will see different behavior. Reports are not very easy but once you figure out how they work it is pretty straightforward to decide where what goes.

    Think about the flow of the report, how each dataitem loops, where you want the totals, and then decide where to put what type of total at which point in the report.
    If you want help from Mibuso, you need to give us a complete picture. What I would do though is walk to your senior and ask them for help. This is typically something seniors help juniors with, it is something that is easiest to explain while sitting side by side.



    hi thanx for the reply,

    i am sending the screenshot of the design of the report.
    I have used two data items , "Sales Invoice Header" and "Sales Invoice Line"

    What i want is, to sumup the numeric fields like Rate, Qty, Amount,etc at the bottom of the
    report.

    plz help me how to calculate the total as i have explained earlier and have also sent the screenshot of the design of the report
    Markandey Pandey
  • kapamaroukapamarou Member Posts: 1,152
    The sales header footer has a place at bottom property.
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    kapamarou wrote:
    You are printing the total on different dataitem's section.

    The principle is the following:

    If you declare the totals for the sales line table you can use them in the sales line sections.


    If you want to move them in the Header sections you will need to use the command

    CurrReport.CREATETOTALS on the onpredataitem trigger of the header...


    But the header is not having those fields for which i want the sum to be displayed in the bottom
    can u explain me what u want t say in the line that i am hilighting
    f you declare the totals for the sales line table you can use them in the sales line sections.



    thanx all 4 the support

    the problem is resolved
    Markandey Pandey
Sign In or Register to comment.