Joining report

hi
i need to design a report which delivers no.of joinees in that month.
i created res.key fig on head count based on action type.(to get join no)
now i want to diplay report month wise.
can i create anothe res.key fig on 0calmonth and join no.
i mean to say shall we use a res.key fig for the creation of anothe res.key fig.
and shall we keep variable entry in res.key fig.
thanks
latha

seems like a candidate for a master-detail form. You can use the Add Form- Master Detail wizard for this.
HTH

Similar Messages

  • Cannot Download Results of Multi-Join Report

    In my report, I "union" the Activity History subject area 10 times (it is a long story!).
    The results look okay on the screen but when I download the report to Excel, all I get is an Excel file containing the following error message
    Odbc driver returned an error (SQLExecDirectW).
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 26002] Near <">: End of input has been reached. Illegal syntax. (HY000)
    It also shows part of the SQL, which is very long and actually exceeds the limit for an Excel cell.
    Does anyone know why this error is happening?
    Does anyone know a way to get round this problem?
    Thanks.

    Alex - thanks for the suggestion but I need the 10 joins because I need to count how many activities there are for each Line of Business. The LOB field is a multiple picklist field so there could be more than one LOB against each activity.
    The output I need is
    Owner,LOB,Completed Month
    User1,LOB1,Jan09
    User1,LOB2,Jan09
    User1,LOB2,Jan09
    User1,LOB3,Jan09
    User2,LOB2,Jan09
    etc
    I have given up and hard-coded the Country (makes the SQL shorter) and downloaded to Excel to create the pivot table.
    But if anyone has any ideas I would still be interested to hear.

  • Crystal report 2008 for B1 Join report of open PO, good receipt, good retur

    Hi All,
    I am new to crystal report for B1. I am developing a report for showing all open purchase order, good receipt, good return, A/P Invoice and A/P credited memo   rows for selected project.
    This is similar to open item report, but I need to show detail rows (items) for each of those Document. I can easy do a select token with project code for only one type of those document e.g. open purchase order (link OPOR with POR1 and select records by project code).
    My question is how to do a report with those 5 types document together. I did try to include all those tables, but I canu2019t find a link between them.  Or Can I do something link sub reports to include all those report by using one selection token?  How can I do it?
    Any comment, ANTHING will be very much appreciated!!

    Hi Julian......
    yes you are correct use OLE DB connection and when it shows your PC Connection then just put the necessary information related to SQL server and DB for which you want to create this query.
    Once you put all these info then click on next and then finish.
    It will show you the Command option and one more option in expand and collapse format where all the tables and views of database are present.
    Just double click on command and paste your query report and add it......
    Now its set to design CR for your query as per requirement.....
    Regards,
    Rahul

  • How to join reports

    Hi Experts,
    If i have one report, I would like to result of it or one field values to insert in variable of other report.
    Suppose Report A has in customer and Invoice
    Report B has Invoice and Check info
    I would like to put customer name in report A and get all invoice info and insert these invoice info into Report B  to get result how it can possible.
    Thanks

    Hi,
    create a variable on the invoice no. with replacement path. As the replacement path you enter the name of report A. In report B use the variable on the invoice no. and run the report.
    kind regards
    Siggi

  • Joining report regions

    After I query a record from the personnel table(region), I then want to see the accesses(another region based on acesses table with a foreign key to personnel.

    seems like a candidate for a master-detail form. You can use the Add Form- Master Detail wizard for this.
    HTH

  • Adding new row to the reports list page

    How can I add a new report row in the reports list of the reports tab.
    Ex: a new row to the report "users by Date of Join report" is to be added
    How can we add Please help me out in this

    I am facing the same problem!
    camickr wrote:
    Try adding an empty row containing a null value for the String instead of the empty String.camickr, it will not help, the DefaultRowSorter in the "*+compare(int model1, int model2)+*" method return -1 if the first value is null and 1 if the sacond value is null. and incase of DESCENDING it mult by -1.
                    // Treat nulls as < then non-null
                    if (v1 == null) {
                        if (v2 == null) {
                            result = 0;
                        } else {
                            result = -1;
                    } else if (v2 == null) {
                        result = 1;
                    } else {
                        result = sortComparators[counter].compare(v1, v2);
                    if (sortOrder == SortOrder.DESCENDING) {
                        result *= -1;
                    }And this is the real problem!
    The empty line is sorted as the smallest value and incase of DESCENDING it will be the first line (because of the mult by -1).
    We could have overide it and incase of the empty row(usualy the last row) do not mult by -1 in DESCENDING mode.
    But the problem is that the "+*compare*+" method and it's caller "*+Row+*" inner class are private :-(
    It is not wise to do it but we can do like kmp83 wrote:
    kmp83  wrote:
    copy/duplicate "private" code from DefaultRowSorter into my extended class.Anyone have another suggestion?

  • New Field not Showing up in Report.

    I have a CR query that I am editing to add a column to my report.  When I make my edits, the query runs, but I do not see the new field in the field explorer.  The part in purple is what I added.  Do I need to add it elsewhere in the code?
    WITH SEL_ACCTS AS(
    SELECT
    CASE WHEN RMSCUSTTYP = 'I' THEN
    CASE WHEN Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM)) <> ',' THEN  Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM))
    ELSE ''
    END
    ELSE
    RMSCMPNAME
    END AS "DEBTOR NAME",
    RMSACCTNUM AS "CLIENT ACCOUNT#",
    case when RMSHOMEPHN = '' or RMSWORKPHN = '' or RMSFAXPHN = '' or RMSMOBLPHN = '' then  'Y' else 'N' end as skipplcmt,
    A.RMSBILENUM,
    RMSDATEASG AS PLC_DT,
    ATTRNYCODE,
    RMSGATECD As "Gate Code",
    RAND() AS RANDNUMGEN
    FROM
    REPORTING.RMASTER As A
    left join reporting.rcomker b
    on a.rmsbilenum = b.rmsBilenum
    WHERE
    RMSDATEASG > REPLACE(CHAR(CURRENT DATE - 90 DAYS, ISO),'-','')
    AND recordtype =  'D'
    and ATTRNYCODE IN ({?AGCY_CODE})),
    GET_ACCTS AS(
    SELECT
    "DEBTOR NAME",
    "CLIENT ACCOUNT#",
    Cast(Timestamp(plc_dt||'000000') As Date)  AS "PLACED DATE",randnumgen,skipplcmt,
    PLC_DT,
    ATTRNYCODE,
    A.RMSBILENUM
    FROM
    SEL_ACCTS AS A
    LEFT JOIN
    REPORTING.RPRDBAL AS B ON A.RMSBILENUM = B.RMSBILENUM
    ORDER BY RANDNUMGEN
    FETCH FIRST {?#_of_Accts} Rows Only),
    GET_ACTV AS(
    SELECT
    G.*,
    RMSTRANDTE,
    ACTION_CODE,rmstrantim,
    RESULT_CODE
    From GET_ACCTS AS G LEFT JOIN RPTINGDATA.ROACTREACC AS R ON G.RMSBILENUM = R.RMSBILENUM AND G.ATTRNYCODE = R.ATTRNYCODE AND RMSTRANCDE = '9R'
        AND (ACTION_CODE IN('1','2','3','4','5','7','14','16','22','25','26','27','29','36','44','66') OR RESULT_CODE IN ('2','14','56','58','59','60','61','62','66')) AND RMSTRANDTE >= PLC_DT )
    SELECT 
    "DEBTOR NAME",
    "CLIENT ACCOUNT#",
    "PLACED DATE",
    PLC_DT,
    ATTRNYCODE,
    RMSBILENUM,skipplcmt,
    MIN(CASE WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29')
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTATTEMPT,
    SUM(CASE WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29')
        THEN 1 END) AS ATTEMPT#,
    SUM(CASE WHEN RESULT_CODE IN ('2','56','58','59','60','61','62','66')
        THEN 1 END) AS CONTACT#,
    SUM(CASE WHEN RESULT_CODE = '14'
        THEN 1 END) AS PROMISE#,
    MIN(CASE WHEN ACTION_CODE = '44'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTMGRRVW,
    SUM(CASE WHEN ACTION_CODE = '44'
        THEN 1 END) as MANAGER#,
    MIN(CASE WHEN ACTION_CODE = '1'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTLETTER,
    MIN(CASE WHEN ACTION_CODE = '36'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTSCRUB,
    max(CASE WHEN ACTION_CODE in ('1','2','14','16','22','66')
        then 'Y' else 'N' end) as locateacct,
    sum(case WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29') and (rmstrantim between 80000 and 100000 or rmstrantim between 180000 and 210000) and (  DAYOFWEEK(DATE (
                        SUBSTR ( DIGITS (rmstrandte) , 1 , 4 ) || '-' ||
                        SUBSTR ( DIGITS (rmstrandte) , 5 , 2 ) || '-' ||
                        SUBSTR ( DIGITS (rmstrandte) , 7 , 2 ) )) in (1,7) ) then 1 else 0 end) as primecall,
    FROM GET_ACTV
    GROUP BY
    "DEBTOR NAME",
    "CLIENT ACCOUNT#",
    "PLACED DATE",
    PLC_DT,
    ATTRNYCODE,
    RMSBILENUM,skipplcmt

    It's not showing up because it's only in the first With Select - it hasn't been brought down all the way through to the final Select.  Here's how you need to change it;
    WITH SEL_ACCTS AS(
            SELECT
              CASE WHEN RMSCUSTTYP = 'I' THEN
                CASE WHEN Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM)) <> ',' THEN  Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM))
                ELSE ''
                END
              ELSE RMSCMPNAME
              END AS "DEBTOR NAME",
              RMSACCTNUM AS "CLIENT ACCOUNT#",
              case when RMSHOMEPHN = '' or RMSWORKPHN = '' or RMSFAXPHN = '' or RMSMOBLPHN = '' then  'Y' else 'N' end as skipplcmt,
              A.RMSBILENUM,
              RMSDATEASG AS PLC_DT,
              ATTRNYCODE,
              RMSGATECD as "Gate Code",
              RAND() AS RANDNUMGEN
            FROM REPORTING.RMASTER As A
              left join reporting.rcomker b on a.rmsbilenum = b.rmsBilenum
            WHERE RMSDATEASG > REPLACE(CHAR(CURRENT DATE - 90 DAYS, ISO),'-','')
              AND recordtype =  'D'
              and ATTRNYCODE IN ({?AGCY_CODE})),
    GET_ACCTS AS(
            SELECT
              "DEBTOR NAME",
              "CLIENT ACCOUNT#",
              Cast(Timestamp(plc_dt||'000000') As Date)  AS "PLACED DATE",randnumgen,skipplcmt,
              PLC_DT,
              ATTRNYCODE,
              A.RMSBILENUM,
             "Gate Code"
            FROM SEL_ACCTS AS A
              LEFT JOIN REPORTING.RPRDBAL AS B ON A.RMSBILENUM = B.RMSBILENUM
            ORDER BY RANDNUMGEN
            FETCH FIRST {?#_of_Accts} Rows Only),
    GET_ACTV AS(
            SELECT
              G.*,
              RMSTRANDTE,
              ACTION_CODE,rmstrantim,
              RESULT_CODE
            From GET_ACCTS AS G
              LEFT JOIN RPTINGDATA.ROACTREACC AS R ON G.RMSBILENUM = R.RMSBILENUM AND G.ATTRNYCODE = R.ATTRNYCODE AND RMSTRANCDE = '9R'
                AND (ACTION_CODE IN('1','2','3','4','5','7','14','16','22','25','26','27','29','36','44','66')
                OR RESULT_CODE IN ('2','14','56','58','59','60','61','62','66')) AND RMSTRANDTE >= PLC_DT )
    SELECT 
      "DEBTOR NAME",
      "CLIENT ACCOUNT#",
      "PLACED DATE",
      PLC_DT,
      ATTRNYCODE,
      RMSBILENUM,
      skipplcmt,
      "Gate Code"
      MIN(CASE WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29')
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTATTEMPT,
      SUM(CASE WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29')
        THEN 1 END) AS ATTEMPT#,
      SUM(CASE WHEN RESULT_CODE IN ('2','56','58','59','60','61','62','66')
        THEN 1 END) AS CONTACT#,
      SUM(CASE WHEN RESULT_CODE = '14'
        THEN 1 END) AS PROMISE#,
      MIN(CASE WHEN ACTION_CODE = '44'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTMGRRVW,
      SUM(CASE WHEN ACTION_CODE = '44'
        THEN 1 END) as MANAGER#,
      MIN(CASE WHEN ACTION_CODE = '1'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTLETTER,
      MIN(CASE WHEN ACTION_CODE = '36'
        THEN Cast(Timestamp(rmstrandte||'000000') As Date)
        ELSE NULL END) AS FIRSTSCRUB,
      max(CASE WHEN ACTION_CODE in ('1','2','14','16','22','66')
        then 'Y' else 'N' end) as locateacct,
      sum(case WHEN ACTION_CODE IN ('3','4','5','7','25','26','27','29') and (rmstrantim between 80000 and 100000 or rmstrantim between 180000 and 210000) and
         (  DAYOFWEEK(DATE (SUBSTR ( DIGITS (rmstrandte) , 1 , 4 ) || '-' || SUBSTR ( DIGITS (rmstrandte) , 5 , 2 ) || '-' || SUBSTR ( DIGITS (rmstrandte) , 7 , 2 ) )) in (1,7) )
         then 1 else 0 end) as primecall,
    FROM GET_ACTV
    GROUP BY
      "DEBTOR NAME",
      "CLIENT ACCOUNT#",
      "PLACED DATE",
      PLC_DT,
      ATTRNYCODE,
      RMSBILENUM,
      skipplcmt,
      "Gate Code"
    -Dell

  • SSRS 2012 Reports freeze after first run in IE 11

    Hello,
    We have just recently upgraded/migrated from SSRS 2008R2 to SSRS 2012 sp2 (Windows 2012 R1). 
    We have found one report so far when using IE 11 that after the first run from the client side Internet Explorer freezes.  The report normally takes 4-5 seconds to run.  I have waited an hour and the report has not resolved.
    The same report runs fine in Firefox or Chrome, even after multiple runs.  It also continues to run fine from our SSRS 2008R2 server from IE 11.
    I have tried private browsing and it still only runs once and will not run again.  I have tried compatability mode and it will not run either.  I have also noted that it will crash our ERP system (java based) when it is running at the same time
    in IE as when I run this report.  Other reports seem to work fine.
    The report is simple, it is just a report of subscriptions from ReportServer.  There is some XML parsing in there though.  It is the only difference that I can see in all the other reports on the system.  Oh, the report runs fine from
    Visual Studio 2012.  I have redeployed, and no luck yet.
    Here is my query
    WITH [EMAIL]([SubscriptionID], [EmailLine]) AS
     SELECT  I.[SubscriptionID],
             I1.rows.value('Value [1]', 'VARCHAR(MAX)') AS [EmailLine]
     FROM    (
              --if the Subscription is an e-mail, get the XML fragment which contains the Email line
              SELECT  S.[SubscriptionID],
                      --add a "root" element to create well-formed XML to the "ExtensionSettings"
                      --(in case it's NULL)
                      CONVERT(XML, N'<Root>' + CONVERT(NVARCHAR(MAX), S.[ExtensionSettings]) + N'</Root>') AS [ExtensionSettings]
              FROM    ReportServer.dbo.[Subscriptions] S WITH (NOLOCK)
              WHERE   --only get e-mail subscriptions
                      S.[DeliveryExtension] = 'Report Server Email'
             ) I CROSS APPLY
                 --pull out elements in the "ParameterValues/ParameterValue" hierarchy
                 I.ExtensionSettings.nodes('/Root/ParameterValues/ParameterValue') AS I1(rows)
     WHERE   --only get the Subject field
             --I1.rows.value('Name [1]', 'VARCHAR(100)') = 'Subject'
             I1.rows.value('Name [1]', 'VARCHAR(100)') IN ('TO', 'BCC','CC')
    --get subscription data for all users
    SELECT   replace([EMAIL].[EmailLine], '@plu.edu','') email_line,
            --internally put-together description of subscription
    --        S.[Description],
            --user-friendly message for what happened the last time the subscription ran
            --which may be "New Subscription"
            --report path and name
            C.[Path], C.[Name],
            --start date and end date for schedule
            SC.[StartDate], SC.[EndDate],
            --when the subscription was modified
            S.[ModifiedDate]
    FROM    --actual subscriptions
            ReportServer.dbo.[Subscriptions] S WITH (NOLOCK) LEFT OUTER JOIN
                --report details from Catalog
                ReportServer.dbo.[Catalog] C WITH (NOLOCK) ON
                    S.[Report_OID] = C.[ItemID] LEFT OUTER JOIN
                --Users (owner)
                ReportServer.dbo.[Users] [U1] WITH (NOLOCK) ON
                    S.[OwnerID] = [U1].[UserID] LEFT OUTER JOIN
                --Users (modified by)
                ReportServer.dbo.[Users] [U2] WITH (NOLOCK) ON
                    S.[ModifiedByID] = [U2].[UserID] LEFT OUTER JOIN
                --Subscription Schedules
                ReportServer.dbo.[ReportSchedule] RS WITH (NOLOCK) ON
                    S.[SubscriptionID] = RS.[SubscriptionID] LEFT OUTER JOIN
                --Schedules
                ReportServer.dbo.[Schedule] SC WITH (NOLOCK) ON
                    RS.[ScheduleID] = SC.[ScheduleID] LEFT OUTER JOIN
                --Subjects CTE from e-mail subscriptions
                [EMAIL] ON
                    S.[SubscriptionID] = [EMAIL].[SubscriptionID]
    WHERE EmailLine is not null
    and EmailLine like '%' + @Email + '%'
    and C.[Path] like '%' + @Path + '%'
    order by C.[Path]
    The other observation that I have is that my CPU utilization goes up from 25% to over 50% when I kick this off.  So, it is definitely getting confused about something...
    Thank you for your feedback,
    Chris

    Brad,
    I am not sure how to attach the rdl, so here it is inline. 
    The one thing that is strange is that my test SSRS 2012 SP2 server (Windows 2008R2) the report works.  However, their is a difference in the OS.  The production server is Windows 2012 
    The report works in Visual Studio, it works in Firefox, it works in Chrome.  Just not in SSRS 2012 SP2 on Windows 2012.
    Thanks
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Tablix Name="table1">
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>4.125in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>2.75in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>2.625in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>0.83333in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>0.83333in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>0.83333in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.18in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Email Addresses</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <ZIndex>11</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Path</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <ZIndex>10</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Name</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox3</rd:DefaultName>
    <ZIndex>9</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox4">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Start Date</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox4</rd:DefaultName>
    <ZIndex>8</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox10">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>End Date</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox10</rd:DefaultName>
    <ZIndex>7</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox13">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Modified Date</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>Underline</TextDecoration>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox13</rd:DefaultName>
    <ZIndex>6</ZIndex>
    <Style>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <BackgroundColor>White</BackgroundColor>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.18in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="email_line">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!email_line.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>email_line</rd:DefaultName>
    <ZIndex>5</ZIndex>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Path">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Path.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Path</rd:DefaultName>
    <ZIndex>4</ZIndex>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Name">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Name.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Name</rd:DefaultName>
    <ZIndex>3</ZIndex>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="StartDate">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!StartDate.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <Format>d</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>StartDate</rd:DefaultName>
    <ZIndex>2</ZIndex>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="EndDate">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!EndDate.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <Format>d</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>EndDate</rd:DefaultName>
    <ZIndex>1</ZIndex>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="ModifiedDate">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!ModifiedDate.Value</Value>
    <Style>
    <FontSize>8pt</FontSize>
    <Format>d</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>ModifiedDate</rd:DefaultName>
    <Style>
    <TopBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </TopBorder>
    <BottomBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </BottomBorder>
    <LeftBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </LeftBorder>
    <RightBorder>
    <Color>Black</Color>
    <Style>Solid</Style>
    <Width>1pt</Width>
    </RightBorder>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember />
    <TablixMember />
    <TablixMember />
    <TablixMember />
    <TablixMember />
    <TablixMember />
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <FixedData>true</FixedData>
    <KeepWithGroup>After</KeepWithGroup>
    <RepeatOnNewPage>true</RepeatOnNewPage>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    <TablixMember>
    <Group Name="table1_Details_Group">
    <DataElementName>Detail</DataElementName>
    </Group>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    <DataElementName>Detail_Collection</DataElementName>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>email</DataSetName>
    <Height>0.36in</Height>
    <Width>11.99999in</Width>
    <Style />
    </Tablix>
    </ReportItems>
    <Height>0.36in</Height>
    <Style />
    </Body>
    <Width>12in</Width>
    <Page>
    <PageFooter>
    <Height>0.25in</Height>
    <PrintOnFirstPage>true</PrintOnFirstPage>
    <PrintOnLastPage>true</PrintOnLastPage>
    <ReportItems>
    <Textbox Name="textbox8">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Globals!ReportFolder &amp; "/" &amp; Globals!ReportName &amp; "/" &amp; User!UserID</Value>
    <Style>
    <FontSize>8pt</FontSize>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <Left>8in</Left>
    <Height>0.25in</Height>
    <Width>4in</Width>
    <Style>
    <VerticalAlign>Bottom</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </ReportItems>
    <Style />
    </PageFooter>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="SQL_ReportServer">
    <DataSourceReference>SQL_ReportServer</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>77e94914-07c8-421a-b785-a126cad0d6ac</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="email">
    <Query>
    <DataSourceName>SQL_ReportServer</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@Email">
    <Value>=Parameters!Email.Value</Value>
    </QueryParameter>
    <QueryParameter Name="@Path">
    <Value>=Parameters!Path.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>WITH [EMAIL]([SubscriptionID], [EmailLine]) AS
    SELECT I.[SubscriptionID],
    I1.rows.value('Value [1]', 'VARCHAR(MAX)') AS [EmailLine]
    FROM (
    --if the Subscription is an e-mail, get the XML fragment which contains the Email line
    SELECT S.[SubscriptionID],
    --add a "root" element to create well-formed XML to the "ExtensionSettings"
    --(in case it's NULL)
    CONVERT(XML, N'&lt;Root&gt;' + CONVERT(NVARCHAR(MAX), S.[ExtensionSettings]) + N'&lt;/Root&gt;') AS [ExtensionSettings]
    FROM ReportServer.dbo.[Subscriptions] S WITH (NOLOCK)
    WHERE --only get e-mail subscriptions
    S.[DeliveryExtension] = 'Report Server Email'
    ) I CROSS APPLY
    --pull out elements in the "ParameterValues/ParameterValue" hierarchy
    I.ExtensionSettings.nodes('/Root/ParameterValues/ParameterValue') AS I1(rows)
    WHERE --only get the Subject field
    --I1.rows.value('Name [1]', 'VARCHAR(100)') = 'Subject'
    I1.rows.value('Name [1]', 'VARCHAR(100)') IN ('TO', 'BCC','CC')
    --get subscription data for all users
    SELECT replace([EMAIL].[EmailLine], '@plu.edu','') email_line,
    --internally put-together description of subscription
    -- S.[Description],
    --user-friendly message for what happened the last time the subscription ran
    --which may be "New Subscription"
    --report path and name
    C.[Path], C.[Name],
    --start date and end date for schedule
    SC.[StartDate], SC.[EndDate],
    --when the subscription was modified
    S.[ModifiedDate]
    FROM --actual subscriptions
    ReportServer.dbo.[Subscriptions] S WITH (NOLOCK) LEFT OUTER JOIN
    --report details from Catalog
    ReportServer.dbo.[Catalog] C WITH (NOLOCK) ON
    S.[Report_OID] = C.[ItemID] LEFT OUTER JOIN
    --Users (owner)
    ReportServer.dbo.[Users] [U1] WITH (NOLOCK) ON
    S.[OwnerID] = [U1].[UserID] LEFT OUTER JOIN
    --Users (modified by)
    ReportServer.dbo.[Users] [U2] WITH (NOLOCK) ON
    S.[ModifiedByID] = [U2].[UserID] LEFT OUTER JOIN
    --Subscription Schedules
    ReportServer.dbo.[ReportSchedule] RS WITH (NOLOCK) ON
    S.[SubscriptionID] = RS.[SubscriptionID] LEFT OUTER JOIN
    --Schedules
    ReportServer.dbo.[Schedule] SC WITH (NOLOCK) ON
    RS.[ScheduleID] = SC.[ScheduleID] LEFT OUTER JOIN
    --Subjects CTE from e-mail subscriptions
    [EMAIL] ON
    S.[SubscriptionID] = [EMAIL].[SubscriptionID]
    WHERE EmailLine is not null
    and EmailLine like '%' + @Email + '%'
    and C.[Path] like '%' + @Path + '%'
    order by C.[Path]</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="email_line">
    <DataField>email_line</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="Path">
    <DataField>Path</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="Name">
    <DataField>Name</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="StartDate">
    <DataField>StartDate</DataField>
    <rd:TypeName>System.DateTime</rd:TypeName>
    </Field>
    <Field Name="EndDate">
    <DataField>EndDate</DataField>
    <rd:TypeName>System.DateTime</rd:TypeName>
    </Field>
    <Field Name="ModifiedDate">
    <DataField>ModifiedDate</DataField>
    <rd:TypeName>System.DateTime</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <ReportParameters>
    <ReportParameter Name="Email">
    <DataType>String</DataType>
    <AllowBlank>true</AllowBlank>
    <Prompt>Email Like (e.g allen):</Prompt>
    </ReportParameter>
    <ReportParameter Name="Path">
    <DataType>String</DataType>
    <DefaultValue>
    <Values>
    <Value>%</Value>
    </Values>
    </DefaultValue>
    <Prompt>Path like (e.g Advancement):</Prompt>
    </ReportParameter>
    <ReportParameter Name="Report_Parameter_2">
    <DataType>Boolean</DataType>
    <AllowBlank>true</AllowBlank>
    <Prompt>Parameter OK?</Prompt>
    </ReportParameter>
    </ReportParameters>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>811078db-33dd-4670-9df4-be748e9ec2ef</rd:ReportID>
    </Report>

  • ABAP SQL join syntax

    Hi,
    I am wondering if anyone can provide me with examples on correct syntax for different join types such as inner join, left outer join, right outer join, outer full join, and cross join.
    Thank you in advance,
    Sunny

    In ABAP, there are only INNER JOINs and LEFT OUTER JOINs.
    report zrich_0004.
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of itab.
          select * into corresponding fields of table itab
                  from mara
                       inner join makt
                          on mara~matnr = makt~matnr
                                where mara~mtart = 'HALB'
                                  and makt~spras = sy-langu.
           select * into corresponding fields of table itab
                  from mara
                       left outer join makt
                          on mara~matnr = makt~matnr
                                where mara~mtart = 'HALB'.
    Regards,
    Rich HEilman

  • New Field not Showing up in Report, part II.

    I had this issue with another report, and I was told that I hadn't brought my new field down all the way through to the final Select.  With this report, I thought I had done just that, but the new field is still not showing up.  I have pasted the code below with my additions highlighted.  Can someone tell me what I am doing wrong?  Thanks.
    WITH SEL_ACCTS AS(
    SELECT
    CASE
    WHEN RMSCUSTTYP = 'I'
    THEN
    CASE
    WHEN
    Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM)) <> ','
    THEN
    Trim(TRIM(RMSLASTNM) || ', ' || TRIM(RMSFIRSTNM))
    ELSE
    END
    ELSE
    RMSCMPNAME
    END AS "DEBTOR NAME",
    RMSACCTNUM AS "CLIENT ACCOUNT#",
    rmslastpmt,rmsjdgdate,
    CASE WHEN RMSJDGDATE  = 0 THEN  (RMSCHGAMT+RMSASSCCST+RMSACRDINT+UDCCOSTS1+UDCCOSTS2)-(RMSRCVPCPL+      
        RMSXCSRCVS+RMSRCVDCST+RMSRCVDINT+UDCRECCS1+UDCRECCS2)  
        ELSE (RMSJDGCHOF+RMSJDGCSTS+RMSJDGINTS+JDGCOSTS1+JDGCOSTS2)-(JDGRECVRYS+     
        JDGXCSRCVS+JDGRCVCSTS+JDGRCVINTS+JDGRECCS1+JDGRECCS2)
        END AS BALANCE,
    A.RMSFILENUM,
    RMSDATEASG AS PLC_DT,
    ATTRNYCODE,
    RMSSTATECD As "State Code",
    RAND() AS RANDNUMGEN
    FROM
    REPORTING.RMASTER As A
    left join reporting.rcomker b
    on a.rmsfilenum = b.rmsfilenum
    left join reporting.rprdbal c
    on a.rmsfilenum = c.rmsfilenum
    WHERE
    RMSDATEASG < REPLACE(CHAR(CURRENT DATE - 180 DAYS, ISO),'-','')
    AND recordtype =  'D'
    and ATTRNYCODE IN ({?AGCY_CODE})),
    GET_ACCTS AS(
    SELECT
    "DEBTOR NAME",
    "CLIENT ACCOUNT#",plc_dt,
    case when plc_dt > 0 then  Cast(Timestamp(plc_dt||'000000') As Date)  end AS "PLACED DATE",
    ATTRNYCODE,
    "State Code",
    A.RMSFILENUM,case when rmslastpmt > 0 then Cast(Timestamp(rmslastpmt||'000000') As Date) end  as rmslastpmt, rmsjdgdate,balance
    FROM
    SEL_ACCTS AS A
    ORDER BY RANDNUMGEN
    FETCH FIRST {?#_of_Accts} Rows Only),
    financials as (
    select "DEBTOR NAME",
    "CLIENT ACCOUNT#",
    "PLACED DATE",
    a.ATTRNYCODE,
    A.RMSFILENUM,rmslastpmt,case when rmsjdgdate > 0 then Cast(Timestamp(rmsjdgdate||'000000') As Date) end  as rmsjdgdate,balance,
    sum(case when e.rmstrancde between '3A' and '39' or e.rmstrancde in ('1G','1U') then e.rmstranamt end) as costspent,
    sum(case when (e.rmstrancde between '5A' and '69' or e.rmstrancde = '1P') and postdate > rmsjdgdate then 
              e.rmstranamt                                                     
                                             end) as pmtamt,
    sum(case when e.rmstrancde = '5C'  then  e.rmstranamt      end) as costrecvd
    from get_accts a
    left join reporting.rfinanl e
    on a. rmsfilenum = e.rmsfilenum
    and   (e.rmstrancde between '3A' and '69'                                      
    or e.rmstrancde in ('1P','1G','1U'))                                          
    and postdate > plc_dt and a.attrnycode = e.attrnycode
    group by
    "DEBTOR NAME",
    "CLIENT ACCOUNT#", "PLACED DATE",
    a.ATTRNYCODE,
    A.RMSFILENUM,rmslastpmt,case when rmsjdgdate > 0 then Cast(Timestamp(rmsjdgdate||'000000') As Date) end  ,balance )
    select "DEBTOR NAME",
    "CLIENT ACCOUNT#",
    "PLACED DATE",
    "State Code",
    a.ATTRNYCODE,rmslastpmt, rmsjdgdate,balance,c.rmsbalance as plc_bal,costspent, pmtamt,costrecvd,
    Cast(Timestamp(max(case when b.hstnewvalu in ( 'L31')  then b.rmstrandte else  null end)||'000000') As Date)  as servicedate,
    Cast(Timestamp(max(case when b.hstnewvalu in ( 'L13','P13')  then b.rmstrandte else  null end)||'000000') As Date)  as garnishdate,
    Cast(Timestamp(max(case when b.hstnewvalu in ( 'L14','P14')  then b.rmstrandte else  null end)||'000000') As Date)  as levydate,
    Cast(Timestamp(max(case when b.hstnewvalu in ( 'L17','P17')  then b.rmstrandte else  null end)||'000000') As Date)  as suitfiledate,
    Cast(Timestamp(max(case when b.hstnewvalu in ( 'L12','P12')  then b.rmstrandte else  null end)||'000000') As Date)  as liendate
    from financials a
    left join reporting.rhistfl b
    on a.rmsfilenum = b.rmsfilenum
    and b.RMSTRANCDE = 'MT' And b.RMSFLDIMPL = 'RMSSTATUS'
    and b.hstnewvalu in ('L12','L13','L14','L17','P12','P13','P14','P17','L19','PJC','L31')
    left join reporting.rhistfl c
    on a.rmsfilenum = c.rmsfilenum
    and c.RMSTRANCDE = 'MR' AND c.RMSFLDIMPL = 'ATTRNYCODE' and c.hstnewvalu in ({?AGCY_CODE})
    group by
    "DEBTOR NAME",
    "CLIENT ACCOUNT#", "PLACED DATE",
    a.ATTRNYCODE,rmslastpmt,rmsjdgdate  ,balance,c.rmsbalance,costspent, pmtamt,costrecvd, "State Code"

    hi David,
    some questions:
    1) do you mean that statecode is not showing up in the Field Explorer?
    2) if you run this through your db query tool, what is the result?
    3) if you create a new report off of this syntax, what is the result?
    -jamie

  • Location of Hyperion Financial Reports on Server

    Hello,
    Are the Hyperion Financial Reports available as raw files on the web server somewhere? I'd like to restore one from backup and was hoping they'd be in the \Hyperion directory as .des files. Probably won't be this easy, but any info would be great.
    Thanks.

    For 7.2.5 Reports, they are in a SQL database table (i think something RPTS) and the binary data field has the text of the report. (I actually like this because if you wanted to check what reports made use of a account, entity, etc, you could just do a freetext search on the table.....)
    For 9.3.1 Reports, they are in a crazy file structure, with crazy names, and are compressed. You will find them under the RM service/web application folder. In order to X-REF the names properly, you'll need to look into the BI Plus database a bit. The table of interest is V8_CONTAINER.
    I put together a SQL 2005 script that will generate you a listing of all of the reports in a hierarchy format. This will will also help you tie out the folders / reports in the file structure......
    NOTE : WHERE d.PARENT_FOLDER_UUID = 'REPORTMART'
    ^ This will return a hierarchy of EVERYTHING in the table which will probably include stuff you don't want to look at. Simply change 'REPORTMART' to match a UUID specified in the results and then the query will show you all items at that point instead.
    Hope this helps
    Charles
    USE your DB name here;
    GO
    WITH Reports (PARENT_FOLDER_UUID, CONTAINER_UUID, NAME, DESCRIPTION, Level, Sort, CREATION_DATE, LAST_MODIFIED_DATE)
    AS
    -- Anchor member definition
    SELECT d.PARENT_FOLDER_UUID, d.CONTAINER_UUID, d.NAME, d.DESCRIPTION, 0 as level, cast(NAME as nvarchar(1024)) as sort, d.CREATION_DATE, d.LAST_MODIFIED_DATE
    FROM V8_CONTAINER as d
    WHERE d.PARENT_FOLDER_UUID = 'REPORTMART'
    UNION ALL
    -- Recursive member definition
    SELECT d1.PARENT_FOLDER_UUID, d1.CONTAINER_UUID, d1.NAME, d1.DESCRIPTION,
    Level + 1, cast(Sort + '|' + d1.Name as nvarchar(1024)), d1.CREATION_DATE, d1.LAST_MODIFIED_DATE
    FROM V8_CONTAINER as d1
    INNER JOIN Reports AS r
    ON d1.PARENT_FOLDER_UUID = r.CONTAINER_UUID
    -- Statement that executes the CTE
    SELECT replicate(' ',Level) + NAME, DESCRIPTION, CREATION_DATE, LAST_MODIFIED_DATE, Level, PARENT_FOLDER_UUID, CONTAINER_UUID
    FROM Reports
    order by sort
    GO

  • Does CFSQL Not Do Left Joins?

    Hello. The following syntax works fine inside a
    <CFQUERY> statement getting data from an ODBC database (where
    JobList and Reported are tables in the datasource named in the
    CFQUERY statement):
    select * from JobList j left join Reported r on j.job_no =
    r.jobno
    However, it does not work when embedded inside a
    <CFQUERY> statement trying to join two existing queries (i.e.
    dbtype = 'QUERY', where JobList and Reported are the names of the
    existing queries.
    Instead I receive the error message:
    Query Of Queries syntax error. Encountered "j.
    If I remove the j and r aliases and go with select * from
    JobList left join Reported on JobList.job_no = Reported.jobno, I
    receive the error message:
    Query Of Queries syntax error. Encountered "left
    It does not help matters to add the word 'outer' after the
    word 'left'.
    Should I be using a different syntax, or does CFSQL simply
    not do outer joins? The documentation says it does joins, but
    provided no examples.
    If CFSQL simply cannot to outer joins, am I stuck? The two
    tables to be joined ultimately reside in completely different DB's:
    FoxPro and SQL Server.
    Thanks for your help.

    Using
    joins - Q-of-Q
    Using joins
    A join operation uses a single SELECT statement to return a
    result set from multiple, related tables, typically those with a
    primary key - foreign key relationship. There are two SQL clauses
    that perform joins:
    WHERE clause ColdFusion supports joins through a WHERE
    clause.
    INNER JOIN and OUTER JOIN ColdFusion
    does not support joins through INNER JOIN or OUTER JOIN
    clauses.
    Note: Query of Queries supports joins between two tables
    only.
    FYI, you can sometimes accomplish your OUTER JOINs by using
    UNIONs as a work around.
    Phil

  • Multiple left outer join in single select query

    My client requires to apply multiple left outer join in single select query.
    Tell me how it is possible . tell me if we can use native sql query.

    HI vineet,
    Using multile left join is possible but it reduce performance as it takes a long time to retrieve data.
    The following code would help you in knowing how to use multiple left join
    REPORT  test.
    PARAMETERS:
      p_auart LIKE vbak-auart.
    DATA:
      BEGIN OF fs_sales,
        auart LIKE vbak-auart,
        vbeln LIKE vbak-vbeln,
        posnr LIKE vbap-posnr,
        matnr LIKE vbap-matnr,
        netwr LIKE vbap-netwr,
      END OF fs_sales,
      fs_temp LIKE fs_sales.
    DATA:
      t_sales LIKE STANDARD TABLE OF fs_sales.
    SELECT k~auart
           k~vbeln
           p~posnr
           p~matnr
           p~netwr
      INTO TABLE t_sales
      FROM vbak AS k
      OUTER JOIN vbap AS p
      ON k~vbeln = p~vbeln
    WHERE auart = p_auart
       AND p~netwr LT 1000.
    IF sy-subrc EQ 0.
      WRITE:/5 'Sales Document'(001),/,
            15 'Sales Document Item'(002),
            40 'Material Number'(003).
      sort t_sales by netwr ascending.
      LOOP AT t_sales INTO fs_sales.
        WRITE:/ fs_sales-vbeln under text-001.
        LOOP AT t_sales INTO fs_temp WHERE vbeln = fs_sales-vbeln.
          WRITE:/ fs_temp-posnr under text-002,
                  fs_temp-matnr under text-003.
        ENDLOOP.
      ENDLOOP.
    ELSE.
      MESSAGE 'No Record Found' TYPE 'I'.
    ENDIF.
    But i would suggest you to go with views instead of using multiple joins..
    Best of luck,
    Bhumika

  • Inner join command

    Hi Forum,
    How to use Inner join command?
    Please explain with an example.
    Thanks,
    Mahathi

    Inner Join and Outer Join
    The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
    The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
    Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
    Specifying Database Tables
    The FROM clause determines the database tables from which the data specified in the SELECT clause is read. You can specify either a single table or more than one table, linked using inner or outer joins. The names of database tables may be specified statically or dynamically, and you can use alias names. You can also use the FROM clause to bypass the SAP buffer and restrict the number of lines to be read from the database.
    "Database table" can equally mean an ABAP Dictionary view. A view links two or more database tables in the ABAP Dictionary, providing a static join that is available systemwide. You can specify the name of a view wherever the name of a database table may occur in the FROM clause.
    The FROM clause has two parts - one for specifying database tables, and one for other additions:
    SELECT... FROM <tables> <options>...
    In <tables>, you specify the names of database tables and define joins. <options> allows you to specify further additions that control the database access.
    Specifying Database Tables Statically
    To specify the name of a database table statically, use the following:
    SELECT... FROM <dbtab> [AS <alias>] <options> . ..
    The database table <dbtab> must exist in the ABAP Dictionary. The AS addition allows you to specify an alternative name <alias> that you can then use in the SELECT; FROM, WHERE, and GROUP BY clauses. This can eliminate ambiguity when you use more than one database table, especially when you use a single database table more than once in a join. Once you have defined an alias, you may no longer use the real name of the database table
    Specifying Database Tables Dynamically
    To specify the name of a database table dynamically, use the following:
    SELECT... FROM (<name>) <options> . ..
    The field <name> must contain the name of a database table in the ABAP Dictionary. The table name must be written in uppercase. When you specify the name of a database table dynamically, you cannot use an empty INTO clause to read all of the columns into the work area <dbtab>. It is also not possible to use alternative table names.
    Specifying Two or More Database Tables as an Inner Join
    In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
    SELECT...
      FROM <tab> [INNER] JOIN <dbtab> [AS <alias>] ON <cond> <options>
    where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
    A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
    The syntax of the <cond> condition is like that of the WHERE clause, although individual comparisons can only be linked using AND. Furthermore, each comparison must contain a column from the right-hand table <dbtab>. It does not matter on which side of the comparison it occurs. For the column names in the comparison, you can use the same names that occur in the SELECT clause, to differentiate columns from different database tables that have the same names.
    The comparisons in the condition <cond> can appear in the WHERE clause instead of the ON clause, since both clauses are applied equally to the temporary table containing all of the lines resulting from the join. However, each join must contain at least one comparison in the condition <cond>.
    Specifying Two or More Database Tables as a Left Outer Join
    In an inner join, a line from the left-hand database table or join is only included in the selection if there is one or more lines in the right-hand database table that meet the ON condition <cond>. The left outer join, on the other hand, reads lines from the left-hand database table or join even if there is no corresponding line in the right-hand table.
    SELECT...
      FROM <tab> LEFT [OUTER] JOIN <dbtab> [AS <alias>] ON <cond>
           <options>
    <tab> and <dbtab> are subject to the same rules and conditions as in an inner join. The OUTER addition is optional. The tables are linked in the same way as the inner join with the one exception that all lines selected from <tab> are included in the final selection. If <dbtab> does not contain any lines that meet the condition <cond>, the system includes a single line in the selection whose columns from <dbtab> are filled with null values.
    In the left outer join, more restrictions apply to the condition <cond> than in the inner join. In addition to the above restrictions:
    EQ or = is the only permitted relational operator.
    There must be at least one comparison between columns from <tab> and <dbtab>.
    The WHERE clause may not contain any comparisons with columns from <dbtab>. All comparisons using columns from <dbtab> must appear in the condition <cond>.
    Client Handling
    As already mentioned, you can switch off the automatic client handling in Open SQL statements using a special addition. In the SELECT statement, the addition comes after the options in the FROM clause:
    SELECT... FROM <tables> CLIENT SPECIFIED. ..
    If you use this addition, you can then address the client fields in the individual clauses of the SELECT statement.
    Disabling Data Buffering
    If buffering is allowed for a table in the ABAP Dictionary, the SELECT statement always reads the data from the buffer in the database interface of the current application server. To read data directly from the database table instead of from the buffer, use the following:
    SELECT... FROM <tables> BYPASSING BUFFER. ..
    This addition guarantees that the data you read is the most up to date. However, as a rule, only data that does not change frequently should be buffered, and using the buffer where appropriate improves performance. You should therefore only use this option where really necessary.
    Restricting the Number of Lines
    To restrict the absolute number of lines included in the selection, use the following:
    SELECT... FROM <tables> UP TO <n> ROWS. ..
    If <n> is a positive integer, the system reads a maximum of <n> lines. If <n> is zero, the system reads all lines that meet the selection criteria. If you use the ORDER BY clause as well, the system reads all lines belonging to the selection, sorts them, and then places the first <n> lines in the selection set.
    Examples
    Specifying a database table statically:
    REPORT demo_select_static_database.
    DATA wa TYPE scarr.
    SELECT *
      INTO wa
      FROM scarr UP TO 4 ROWS.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    The output is:
    The system reads four lines from the database table SCARR.
    Specifying a database table dynamically:
    REPORT demo_select_dynamic_database.
    DATA wa TYPE scarr.
    DATA name(10) TYPE c VALUE 'SCARR'.
    SELECT  *
      INTO  wa
      FROM  (name) CLIENT SPECIFIED
      WHERE mandt = '000'.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    A condition for the MANDT field is allowed, since the example uses the CLIENT SPECIFIED option. If NAME had contained the value ‘scarr’ instead of ‘SCARR’, a runtime error would have occurred.
    Inner join:
    REPORT demo_select_inner_join.
    DATA: BEGIN OF wa,
            carrid TYPE spfli-carrid,
            connid TYPE spfli-connid,
            fldate TYPE sflight-fldate,
            bookid TYPE sbook-bookid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH UNIQUE KEY carrid connid fldate bookid.
    SELECT  pcarrid pconnid ffldate bbookid
      INTO  CORRESPONDING FIELDS OF TABLE itab
      FROM  ( ( spfli AS p
                INNER JOIN sflight AS f ON pcarrid = fcarrid AND
                                           pconnid = fconnid    )
                INNER JOIN sbook   AS b ON bcarrid = fcarrid AND
                                           bconnid = fconnid AND
                                           bfldate = ffldate     )
      WHERE p~cityfrom = 'FRANKFURT' AND
            p~cityto   = 'NEW YORK'  AND
            fseatsmax > fseatsocc.
    LOOP AT itab INTO wa.
      AT NEW fldate.
        WRITE: / wa-carrid, wa-connid, wa-fldate.
    ENDAT.
      WRITE / wa-bookid.
    ENDLOOP.
    This example links the columns CARRID, CONNID, FLDATE, and BOOKID of the table SPFLI, SFLIGHT, and SBOOK, and creates a list of booking numbers for all flights from Frankfurt to New York that are not fully booked. An alias name is assigned to each table.
    Left outer join:
    REPORT demo_select_left_outer_join.
    DATA: BEGIN OF wa,
            carrid   TYPE scarr-carrid,
            carrname TYPE scarr-carrname,
            connid   TYPE spfli-connid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH NON-UNIQUE KEY carrid.
    SELECT scarrid scarrname p~connid
      INTO CORRESPONDING FIELDS OF TABLE itab
      FROM scarr AS s
           LEFT OUTER JOIN spfli AS p ON scarrid   =  pcarrid AND
                                         p~cityfrom = 'FRANKFURT'.
    LOOP AT itab INTO wa.
      WRITE: / wa-carrid, wa-carrname, wa-connid.
    ENDLOOP.
    The output might look like this:
    The example links the columns CARRID, CARRNAME, and CONNID of the tables SCARR and SPFLI using the condition in the left outer join that the airline must fly from Frankfurt. All other airlines have a null value in the CONNID column in the selection.
    If the left outer join is replaced with an inner join, the list looks like this:
    Only lines that fulfill the ON condition are included in the selection.

  • New Join Changes.

    I have a table, RMASTER, that other tables are joined to.  The statement is below.
    FROM
    REPORTING/RMASTER As A
    left join reporting/rsasrecv b
    on a.attrnycode = b.rmsrecvrcd
    left join reporting/rcomker c
    on a.rmsfilenum = c.rmsfilenum
    left join reporting/rusrdef d
    on a.rmsfilenum = d.rmsfilenum
    Now, however, I want to get data from RHISTFL instead of
    RMASTER.  My question is about the join statements.  The table,
    RHISTFL, has the field rmsfilenum but not the field called attrnycode (RMASTER has both fields).  Will the statement below work?  If not, how can I change my original join statements to make it work?
    FROM
    REPORTING/RHISTFL As A
    left join reporting/rcomker c
    on a.rmsfilenum = c.rmsfilenum
    left join reporting/rusrdef d
    on a.rmsfilenum = d.rmsfilenum
    left join reporting/rmaster e
    on a.rmsfilenum = e.rmsfilenum
    left join reporting/rsasrecv b
    on e.attrnycode = b.rmsrecvrcd /*changed this line*/
    DM

    We can't answer that for you, as we have no idea if that relationship is valid.
    If you have a known good, its best to stick with it.
    You can use RMASTER as a lookup, of sorts. Pull the Data you want to see from the RHISTFL instead, but maintain the join to RMASTER.
    Also, I'm curious as to which dialect allows you to use / in an object name?

Maybe you are looking for