Generate a report with table three

Hi friends,

I have three table
1-
CREATE TABLE 'TRANSACTION_DETAILS '.
(NUMBER OF 'S_NO',
NUMBER OF "BILL_NO."
DATE OF THE "BILL_DATE."
VARCHAR2 (1000) "PARTY_NAME."
VARCHAR2 (20) "VEHICLE_NO."
'NOM_ELEMENT' VARCHAR2 (500),
VARCHAR2 (4000) "DESCRIPTION."
NUMBER OF "QUANTITY."
NUMBER OF 'RATE. '
NUMBER OF 'AMOUNT. '
ENABLE 'TRANSACTION_DETAILS_CON' CONSTRAINT PRIMARY KEY ('S_NO')
)
/

2-
CREATE TABLE 'LAB_WORK_DTL '.
(NUMBER OF 'ID',
NUMBER OF "BILL_NO."
DATE OF THE "BILL_DATE."
VARCHAR2 (1000) "PARTY_NAME."
VARCHAR2 (20) "VEHICLE_NO."
VARCHAR2 (4000) "WORK_DETAIL."
NUMBER OF "LABOUR_AMT."
ENABLE 'LAB_WORK_DTL_PK' CONSTRAINT PRIMARY KEY ('ID')
)
/
3-
CREATE TABLE 'JOB_CARD_DETAILS '.
("ID2" NUMBER,
NUMBER OF "BILL_NO."
DATE OF THE "BILL_DATE."
VARCHAR2 (1000) "PARTY_NAME."
VARCHAR2 (20) "VEHICLE_NO."
NUMBER OF 'AMOUNT. '
ENABLE 'JOB_CARD_DETAILS_CON' CONSTRAINT PRIMARY KEY ("ID2")
)
/


I want to generate a report of the total amount of the Bill as
BILL_NO, BILL_DATE, VEHICLE_NO, SUM (AMOUNT), SUM (LABOUR_AMT), SUM (AMOUNT)

I USE

Select a.BILL_NO, a.BILL_DATE, a.PARTY_NAME, a.VEHICLE_NO, SUM (a.AMOUNT), SUM (b.LABOUR_AMT), SUM (c.AMOUNT) of TRANSACTION_DETAILS a, LAB_WORK_DTL b, c JOB_CARD_DETAILS where a.PARTY_NAME = b.PARTY_NAME and a.PARTY_NAME = c.PARTY_NAME and a.PARTY_NAME =: Group P38_PARTY_NAME by a.bill_no, a.BILL_DATE a.PARTY_NAME, a.VEHICLE_NO, b.bill_no, b.BILL_DATE, b.PARTY_NAME, b.VEHICLE_NO, c.bill_no, c.BILL_DATE, c.PARTY_NAME, c.VEHICLE_NO

SUM (a.AMOUNT), SUM (b.LABOUR_AMT), SUM (c.AMOUNT) according to THIS amount CODE of these columns are not correct and there is one more problem if BILL_NO does not LAB_WORK_DTL JOB_CARD_DETAILS this table result shows NO DATA FOUND but BILL_NO is available in
TRANSACTION_DETAILS this table.

How can I generate this report.

Thank you
Ed
SQL> select a.BILL_NO,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO,
  2         SUM(a.AMOUNT),
  3         (select SUM(b.LABOUR_AMT) from LAB_WORK_DTL b
  4          where a.PARTY_NAME =b.PARTY_NAME
  5            and a.bill_no = b.bill_no
  6            and a.vehicle_no = b.vehicle_no) labour_amt,
  7         (select SUM(c.AMOUNT) from JOB_CARD_DETAILS c
  8          where a.PARTY_NAME = c.PARTY_NAME
  9            and a.bill_no = c.bill_no
 10            and a.vehicle_no = c.vehicle_no) job_card_amt
 11  from TRANSACTION_DETAILS a
 12  where a.PARTY_NAME ='A'
 13  group by a.bill_no,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO;

   BILL_NO BILL_DATE PARTY_NAME VEHICLE_NO SUM(A.AMOUNT) LABOUR_AMT JOB_CARD_AMT
---------- --------- ---------- ---------- ------------- ---------- ------------
         5 05-MAR-10 A          112                   62        400          700

Max
http://oracleitalia.WordPress.com

Tags: Database

Similar Questions

  • Generate HTML reports with cell colors

    I'm trying to generate an HTML report, which will be a red line if a threshold has been reached.  Here is what I have and I'm not sure how to evaluate each line to a value of say (FreespaceGB - the 60.00) then do red line.

    $File = "Default.htm".

    # Check if the file exists
    If (Test-Path $File)
    {
    Remove-Item $File
    }

    $Collection = @)
    Get-Cluster | {ForEach-Object
    $Cluster = $_
    $Cluster | Get-VMHost | {ForEach-Object
    $VMHost = $_
    $VMHost | Get-DataStore. Where-Object {$_.} {Name - notlike ' * local * "} | {ForEach-Object
    $out = "" | Select-Object clusters, DSName, FreespaceGB, CapacityGB, PercentFree
    $out. Cluster = $Cluster.Name
    $out. DSName = $_. Name
    $out. FreespaceGB = $($_.) FreespaceMB / 1024) m:System.NET.SocketAddress.ToString ("F02")
    $out. CapacityGB = $($_.) CapacityMB / 1024) m:System.NET.SocketAddress.ToString ("F02")
    $out. PercentFree = (($_.)) FreespaceMB) / ($_.) (CapacityMB) * 100) m:System.NET.SocketAddress.ToString ("F02") + '% '.
    $Collection += $out
    }
    }
    }

    $a = '< style >.
    $a = $a + "BODY {background-color: white ;}}.
    $a = $a + "TABLE {border-width: 1px;}. border-style: solid; border-color: black; border-collapse: collapse ;} »
    $a = $a + "TH {border-width: 1px;}. padding: 0px; border-style: solid; border-color: black ;} »
    $a = $a + "TD {border-width: 1px;}. padding: 0px; border-style: solid; border-color: black ;} »
    $a = $a + ' < / style >.

    $Collection | DSName-single Cluster Tri-objet | ConvertTo-HTML-head $a | Out-file $File

    There was amissing after copy/paste, which is corrected now.

    It could also mean that the value in the FreeSpaceGB column is less than 60 for all lines.

    Just tried in my test environment and it works wthout a problem.

  • Generate a report

    Hi friends,

    I have three table
    1-
    CREATE TABLE 'TRANSACTION_DETAILS '.
    (NUMBER OF 'S_NO',
    NUMBER OF "BILL_NO."
    DATE OF THE "BILL_DATE."
    VARCHAR2 (1000) "PARTY_NAME."
    VARCHAR2 (20) "VEHICLE_NO."
    'NOM_ELEMENT' VARCHAR2 (500),
    VARCHAR2 (4000) "DESCRIPTION."
    NUMBER OF "QUANTITY."
    NUMBER OF 'RATE. '
    NUMBER OF 'AMOUNT. '
    ENABLE 'TRANSACTION_DETAILS_CON' CONSTRAINT PRIMARY KEY ('S_NO')
    )
    /

    2-
    CREATE TABLE 'LAB_WORK_DTL '.
    (NUMBER OF 'ID',
    NUMBER OF "BILL_NO."
    DATE OF THE "BILL_DATE."
    VARCHAR2 (1000) "PARTY_NAME."
    VARCHAR2 (20) "VEHICLE_NO."
    VARCHAR2 (4000) "WORK_DETAIL."
    NUMBER OF "LABOUR_AMT."
    ENABLE 'LAB_WORK_DTL_PK' CONSTRAINT PRIMARY KEY ('ID')
    )
    /
    3-
    CREATE TABLE 'JOB_CARD_DETAILS '.
    ("ID2" NUMBER,
    NUMBER OF "BILL_NO."
    DATE OF THE "BILL_DATE."
    VARCHAR2 (1000) "PARTY_NAME."
    VARCHAR2 (20) "VEHICLE_NO."
    NUMBER OF 'AMOUNT. '
    ENABLE 'JOB_CARD_DETAILS_CON' CONSTRAINT PRIMARY KEY ("ID2")
    )
    /

    I want to generate a report with these three table of the total amount of the Bill as
    BILL_NO, BILL_DATE, VEHICLE_NO, SUM (AMOUNT), SUM (LABOUR_AMT), SUM (AMOUNT)

    I USE

    Select a.BILL_NO, a.BILL_DATE, a.PARTY_NAME, a.VEHICLE_NO, SUM (a.AMOUNT), SUM (b.LABOUR_AMT), SUM (c.AMOUNT) of TRANSACTION_DETAILS a, LAB_WORK_DTL b, c JOB_CARD_DETAILS where a.PARTY_NAME = b.PARTY_NAME and a.PARTY_NAME = c.PARTY_NAME and a.PARTY_NAME =: Group P38_PARTY_NAME by a.bill_no, a.BILL_DATE a.PARTY_NAME, a.VEHICLE_NO, b.bill_no, b.BILL_DATE, b.PARTY_NAME, b.VEHICLE_NO, c.bill_no, c.BILL_DATE, c.PARTY_NAME, c.VEHICLE_NO


    I have two entry corresponding to PARTY_NAME is 'A' TRANSACTION_DETAILS

    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, VEHICLE_NO = 112, NOM_ELEMENT = C, AMOUNT = 12
    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, VEHICLE_NO = 112, NOM_ELEMENT = D, AMOUNT = 50

    I have two entry corresponding to PARTY_NAME is 'A' LAB_WORK_DTL

    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, VEHICLE_NO = 112, WORK_DETAIL = REPAIR CLUTCH, LABOUR_AMT = 250
    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, 112, WHEEL BALANCING, LABOUR_AMT = WORK_DETAIL = VEHICLE_NO = 150

    I have two entry corresponding to PARTY_NAME is 'A' JOB_CARD_DETAILS
    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, VEHICLE_NO IS 112, DESCRIPTION = ENGINE REPAIR, AMOUNT = 200
    BILL_NO = 5 BILL_DATE = 5 MARCH 10, PARTY_NAME = A, VEHICLE_NO IS 112, DESCRIPTION = PATROL, AMOUNT = 500

    When I run my code, then the result is

    Sum (a.amount) = 248
    Sum (b.LABOUR_AMT) = 1600
    Sum (c.amount) = 2800

    But the result should be

    Sum (a.amount) = 62
    Sum (b.LABOUR_AMT) = 400
    Sum (c.amount) = 700

    How can I get the correct value.

    Manoj Kauhsik

    1. I guess that there is more data associated with the PARTY_NAME 'A', so you showed us, because there is no average numbers you presented could add up to 248... (maybe another billno, date, vehicle?)

    2. you can delete ", b.bill_no, b.BILL_DATE, b.PARTY_NAME, b.VEHICLE_NO, c.bill_no, c.BILL_DATE, c.PARTY_NAME, c.VEHICLE_NO ' group BY

    3. you can also rewrite your query into something like:

    select a.BILL_NO,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO,SUM(a.AMOUNT) suma
    , (select sum(b.LABOUR_AMT) from LAB_WORK_DTL b where a.PARTY_NAME =b.PARTY_NAME) sumb
    , ...same for the third table...
    from TRANSACTION_DETAILS a
    where a.PARTY_NAME =:P38_PARTY_NAME
    group by a.BILL_NO,a.BILL_DATE,a.PARTY_NAME,a.VEHICLE_NO
    
  • How creat a summary report with txt.

    Hi all

    I want to create a summary of the report with .txt, and I disabled the feature of report generation in teststand.

    I created a complex sequence, includes some sub-sequences, example: the UUT is tested on three different temperatures and four different voltages conditon. So I creat three subsequences (different temperatures) there are four steps (different voltages), then mainsequence invoke three subsequences to excute test.

    I only want to get the fail-no summary, include: name of the step-fail, status

    How do I? Thank you very much

    You can use Parameters.Step.Name to get the name of the step failed. You can also use something like Parameters.Step.StepType.Name is 'NI_MultipleNumericLimitTest' to the different types of filter steps.

    To the extent where the string any failure...

    You can check RunState.CallStackDepth to see callers how you deep. Based on this information, you can use RunState.Caller.Caller. (in sequence but of many appellants deep, you are). RunState.Step.Name or. Sequence.Name

    So if the CallStackDepth is 1, you can only use a caller. If it was 2, need to recursively would you use 1 caller and then 2 appellants and so on.

  • Generate the report for the custom period

    I did experiment with Foglight NMS for the past few weeks. I have search in the forums and hunts around the tool, but I've not found a way to generate a report on a custom period. For example, I would like to run a report, see use of bandwidth during opening hours. The only options I see is "last hour", "Last day", "Last week", etc. "." Is this possible? Any help or ideas would be appreciated.

    Hi Michael,

    While we do not have a report which shows the range you're looking for, you can see the use of bandwidth via NetFlow. I know it is not a report, but could be able to show the amount of data sent over the network for a period of time. Lies and must have the feature seen on the road map.

    Mario

  • How to generate the report on rules

    How to generate the report on rules with id recipient and with a few keyoword in a rule.

    The rule management dashboard has an integrated 'report rules', you can configure properties and input parameters.

    For rule management dashboard, click homes > Administration > rules. In the upper right, next to the date and time, click reports.

    You can also find these helpful videos: http://edocs.quest.com/foglight/5610/Foglight_Reports_videos.php

    Hope this helps,

    Shay

  • Simple report with parameter requirement does not

    I have a simple report, select rows from a table when the date is earlier than a date variable. I have a page with a switch of date and a button element. The button links to the report page and assigns to P3_AS_OF_DATE P2_SELECT_DATE. Page 3 includes & P3_AS_OF_DATE. in the title of the region, as an element of display, and in which paragraph of the report. However, when I click on the Run_Report button on page 2, the date selected on page 2 does not appear on page 3. I can't understand what Miss me.

    I've reproduced my code at https://apex.oracle.com/pls/apex/f?p=4550 & ws = Larimer using assistance/Viewer to connect. The application is called report with Date setting.

    Thank you!

    (There is more to the condition that, so obvious alternatives as an interactive report are not a solution).

    mdwyer wrote:

    I have a simple report, select rows from a table when the date is earlier than a date variable. I have a page with a switch of date and a button element. The button links to the report page and assigns to P3_AS_OF_DATE P2_SELECT_DATE. Page 3 includes & P3_AS_OF_DATE. in the title of the region, as an element of display, and in which paragraph of the report. However, when I click on the Run_Report button on page 2, the date selected on page 2 does not appear on page 3. I can't understand what Miss me.

    I've reproduced my code to https://apex.oracle.com/pls/apex/f?p=4550&ws=Larimer with assistance/Viewer to connect. The application is called report with Date setting.

    The button performs a redirect. This means that the page is not filed and the value of P2_SELECT_DATE is therefore not saved in session state. When the form values should be stored in the database or used in the treatment later, you must enter them in session state using a button that submits the page. Next navigation should be performed using a direction rather than a redirect. The example has been changed to make it.

  • Search page based on query with Table on Layershift ADF Panel does not work correctly

    Hello

    I'm on 11.1.2.4 jdev and deployed my application on glassfish 3.1.2. I've hosted this application on Layershift externally.

    I created a search page based on query ADF with table Panel. All fields of research are working fine on weblogic Server integrated and my deployment local glassfish.

    However, on Layershift, when I enter some criteria of research in certain fields, it does not record.

    UPDATE, it seems that the problem is with the fields which are of the "String" ie. Name. Fields of data type Integer and Date seems fine.

    any ideas please?

    Thank you

    kdario, you're right, ViewCriteria does not use the correct syntax for mysql for the concatenation.

    The generated sql statement looks like this.

    SELECT * FROM (select student_id, student_name, from  student) QRSLT WHERE ( ( (UPPER(student_name) LIKE UPPER('%' || 'Per' || '%') ) ) )
    

    as DB MySql does not support | (double pipe sign), its sql causing failure.

    in order to support |, mysql requires to change the sql mode setting in the file my.cnf (on linux) in the

    # Set the SQL mode to strict
    sql-mode="PIPES_AS_CONCAT,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    

    After setting this parameter, its working fine now.

  • Lack of 'Generate size report' lively cc

    Hi all

    I can't find the option "Generate size report" to understand what is bloating my banner size, I checked the publication settings window, and where it is usually according to my research, but he isn't here for me at all.

    I use Adobe Animate CC 15.2.0.66.

    Thanks in advance!

    If you work in ActionScript, it is the third option under "Advanced" in the publication settings.

    If you work in HTML5 Canvas, it is not an option because it is not really necessary... with HTML5, you can just look in the folder where your banner is published and display all images/assets and their file sizes here.

  • Creating reports with JasperReports

    Hello guys,.

    I need to generate different reports (PDF format) in my apex application. I read about the use of reports jasper in different forums, so I tried to use it for my reports.

    I created the Group 6.1 of jasperreports-Server tomcat version and installation of postrge. Everything worked well and I can connect to the web interface of my reportsserver. I have also created a test with the iReportDesigner report.

    But now I don't know what is the next step.

    How do I load/put the file on my server? What im needing file, .jasper or .jrxml?

    And how to call the apex/Oracle report? Do I have to install some packages, or something?

    IM using the oracle database 11g 2 with EPG and apex version 4.2.6 on 13.2 openSUSe.

    Kind regards

    pleNn

    Hi guys,.

    I'm sorry about the broken links. I already wanted to update the site, but never got around that.

    Please use this version here: Index of /downloads/free_tools/JasperReportsIntegration/2.1.0

    Already working on a new version to support JasperReports 6.0.3... but takes a bit.

    Thank you

    ~ Dietmar.

  • There are ADF query Panel with table - table separator column of thousands

    Hi all

    can I put a column in adf table a separator of thousands, because some of the column is the value of money.
    the table is automatically generated and linked to research compass (query with table)
    try to use the converter to entering text, but it is not working.
    I work in a 11.1.1.1.6 with a human taskflow Oracle BPM.


    Thanks before

    Hello

    You have groupingUsed "Converter" property with the value 3 minIntegerDigits.

    Jean Lou

  • Generation of reports with short

    Hello

    We strive to implement the short Logging and reporting in our application. I followed the LogServerReportGen.pdf provided by short.

    1. we have implemented of the logging API calls in our code.
    2 created a component logserver in Workbench and specified details
    3. has created a generation of report Workbech componentin

    When I am trying to start the component reporting the failure, I'm not able to determine what is the problem here.

    Also we need to develop and new script and it made available in workbech to generate the report? Works of this generation of report.

    Then some a list on what Miss me?

    Thank you
    DEV

    You get a report generated, but it is empty, is that correct? If Yes, then this is probably there is no recording of data for the period of the report. In your example, the log data are all for now - if you run the GenerateDailyReport script, it will pull in data logging for yesterday. Try to copy the logserver_output file, by renaming the stamp of date / hour yesterday, by modifying the file do a search/replace 12_12_17 with 12_12_16, and then run the GenerateDailyReport script again.

    Michael

  • Error: Could not find the validation report with ID: 87

    I wrote a validation rule in FDM as below, attached this rule to the place. Once I have import data, validate, export and click Check, the system throws an error message stating "error: found no validation report with ID: 87. Not sure what needs to be done.

    The rule I wrote is 520000 ~ ~ > = 0
    This rule says that if the amount 520000 account is greater than zero, then only load it. otherwise, generate a report.

    Any suggestions?

    You must ensure that you have imported the Reports.xml file in the application of FDM. In addition, you want to connect to the application using the established customer and click on the reports tab and expand the English > reports check and do a right-click on the control of report and choose "set as Validation report.

  • Report with the items on the page

    Hi all

    I use APEX 4.0.3 and I would create a report where I could have editable page elements it contains. My goal was to have for example a variable number with its features displayed in the report and the power column choose a second from a selection list to associate with the first.

    In summary, I need to have a selection list in the report, and I need to know how to access the value of this element in each of the train.

    Thank you
    Mike

    You will need to loop.

    Find out "paintings of SEO, SEO of the values in a sequence to process" sections in the following documents.
    This should give you a fair idea.

    http://download.Oracle.com/docs/CD/E10513_01/doc/apirefs.310/e12855/apex_app.htm

    For example, if you have a report with the following query

    SELECT APEX_ITEM. Text(1,column_name) FROM myTable;

    and if you have 10 rows in the table, then 10 items of text will appear on your page.
    Given that we gave the ID (p_idx) as a 1, we can refer these elements of text using G_F01 picture. (If its 2 then G_F02 etc. we can have up to 50 dynamic element on one page)

    G_F01. COUNTY gives us "number of items".
    G_F01 (i) gives us the value of i ^ e ^ text value of the element.

    It may be useful

    Kind regards
    Hari

  • Hide number (or number format) on the Oracle report with bar code

    Hi al!
    I made an example of printing barcodes on the Oracle report
    with the link for help:
    [http://download-west.oracle.com/docs/html/B10602_01/orbr_barcode.htm | http://download-west.oracle.com/docs/html/B10602_01/orbr_barcode.htm]

    However
    I want to hide under barcode images or Format number!
    Ex:
    |||||||||||||| -> barcode images
    1234567 > barcode number

    I want to: hide: "123456" or format: "123.456".

    Thank you!

    Hello

    The Image is generated by the java code in oraclebarcode.jar
    It is possible to 'hide' a part of the image by putting an object ("rectangle" for example) on the part of the image that you want to hide.

    Concerning

Maybe you are looking for

  • I did a clean install, but firefox crashes a few seconds of its opening

    I tried to download the latest version and now done a clean install, but firefox hangs for a few seconds. I have this problem on m mobile computer (windows 7), not on my desk and not at work I use IE to post this but want to go back to firefox - plea

  • Satellite C850-19Z - internet connectivity problem

    Hello I bought this laptop about 14 months ago and have had fairly consistent problems with internet connectivity. Initially, the problem occurred when the prompt "Choose your browser" would appear. After selecting IE or chrome, in a day or two, we w

  • No valid guarantee in India

    Dear Sir/Madam, I bought a laptop Toshiba R630-14 t of one of your authorized dealers of Gulf, Achiever computers LLC, Ak Ain Centre, Dubai on 20 February, 2011 empty no. Bill R-5876 paying AED 3 350. At the time of the purchase, I was informed by th

  • my screen suddenly nour on the side. How can I restore it?

    my laptop screen went sideways. How to do it right to the top?

  • Disassembly of the

    Does anyone know of a set of instructions for disassembly on the Connect? I droped and it still works, but the problem now is that the volume buttons are out in position, I need to open it to get back them in place.