Calling the selection screen of report with data for the selection field

I have the selection screen with 2 fileds.
sales order and  payment terms.
My requirement is to update the payment terms into the ztable for the given order.
Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the program

Hi shiva,
when the user enters sales order number on screen, in parameter 1,
you want to show payment term, on selection screen itself, in parameter 2.
We can use the event
AT SELECTION-SCREEN.
Eg. PO Number <----
> User
Below is sample code for same.
If you enter PO Number, the system will show the corresponding user in parameter2.
Just copy paste.
REPORT  YAM_TEMPA09.
PARAMETERS : EBELN LIKE EKKO-EBELN.
PARAMETERS : ERNAM LIKE EKKO-ERNAM.
AT SELECTION-SCREEN.
ERNAM = ''.
SELECT SINGLE ERNAM
FROM EKKO
INTO ERNAM
WHERE EBELN = EBELN.
regards,
amit m.

Similar Messages

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • Crystal Report 2008 - Save Report with Data

    I saved a Crystal report with data in Dev Environment on BOE Server (Infoview Folder) and this is transported to Quality Environment. In the quality environment, when I try to view this report, initial screen comes up with data of Development, instead of Quality environment.
    I am expecting that it will load the default data from Quality environment for the stored selection.
    Is there any settings to be done in the report settings, so that i can view the saved report in Quality Environment with Quality Env data instead of Dev Env Data?

    Thanks Don for the reply.
    In case, If we save the report with data in Dev, we need to update DB configuration to point to Quality Env using "Use Custom databse Logon Information".
    But when it gets transported to production (From Quality), it will show up Quality Envdata. So should i have to update the BOE in Q Environment, to point to Production and transport it?
    Is there any automated way that the system will point to right systems appropriately based on transport landscape?
    Does the functionality of "Save the report with data" used mainly for user friendliness for analysis in one environment and this functionality is not supported to move between environments?
    rgds
    Karthi

  • Date when the cube was filled with data for the last time

    Hi!
    We are using a SAP BW System and on top of it BOBJ for reporting. Within BEx Web Application Designer, it's very simple to access the data, when the cube was filled with data for the last time. Is it possible to access this information within BOBJ, too?
    Thanks for your help!
    Greetings
    Stefan

    Hallo Ingo,
    thanks for your answer. That was exactly what we were looking for.
    We will have to think about a workaround now.
    Greetings
    Stefan

  • I installed elements 12, it won't open, a screen pops up with options for e-12 and 4 other language

    I installed elements 12, it won't open, a screen pops up with options for e-12 and 4 other languages.  When I click Elements 12 a screen pops up with a red install icon, I click it and it askes for the serial number. It won't let me type in letters only numbers. I already did the serial number once. How do I get this to work? I don't want to be a programer!  

    attach a screenshot of what pops up after clicking pse 12, http://forums.adobe.com/thread/963429

  • How to get the histoical data for newly added field in the cube?

    Hi Experts,
    I have small doubt on remodeling the infocube.
    After adding the characteristic or keyfigure  to a cube by using remodeling concept, how can I get the historical data for that particular field.
    I have searched in SDN also but I didn't get proper information.
    Please excuse me if I posted repeated question.
    helpful answer will be awarded with poitns.
    Thanks & regards,
    Venkat.

    hi
    depending on your customer need you could use the remodelling functionnality but sometimes you have no way to retrieve what you want so another option you should consider is the following:
    Advantages
    that will cost less effort and guarantee the result.
    Drawbacks
    data is redondant for a while
    space (depending on the volume of historical data)
    So here are the steps :
    step 1Adjust your extraction process according to the fields you need to add to populate the cube.
    step 2 Then create a dso next or even a cube, feed the dso with a full load with the enhanced extractor you adjusted with the new fields in step 1 only once in fact this should be one shot.
    step 3 Copy the query to the previous built  multi-provider on top of the new historical data from dso and the running live delta cube. Adjust the queries if necessary.
    optionnal Then if you want to get rid of the dso or new cube for historical data you could empty the actual one push the data from the new data provider and that's all.
    bye
    Boujema

  • How to set a default date for a custom field of Date type in project server 2010.

    hi,
    can somebody help  me.
    How Can i set the default date for a custom field of date type in project server 2010 ?

    Dear Rohan,
    You can set default value to custom field thru Lookup table. Assign lookup table to custom field and set default value to some lookup value (Note: check the “Choose a value to use as a default when adding new item” checkbox).
    Regards,
    Avinash kumar | Blog:http://avigr8.wordpress.com | If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.

  • PS:Copy of MBBS report with Date(GR) selection option in selection screen.

    Hi,
    We are developing a report, which is Copy of MBBS report, addition as Date(GR) selection option in selection screen to view historical data {i.e.Project Stock(Q) on back dates}.
    MBBS is showing Project Stock w.r.t. WBS. So pls suggest Table, which can fulfill the requirement to show the Project Stock from GR w.r.t. Purchase and Production order in back date w.r.t. that WBS.
    Pls do the needful.
    Thanks,
    Amit Jain.

    Hi Amit ,
    The Project Stock Table is MSPR , and the Project stock history table is MSPRH .
    Though not through with your actual requirement , There is a standard Report MB5B -- Stock on Posting Date . In the selection screen , we can have the Special Stock Q (Project Stock ) .
    If you can develop copying this report instead of MBBS , it would take care of receipts as well as issues ,and from the material Document you can build a relation to the account assignment  WBS/Network Activity through MSEG Table .
    Hope it helps .
    thanks and regards
    Kish

  • Stock report with date range

    Hi Experts.
    Material stock report (unrestricted, blocked, quality) with in date range.
    getting information in T-CODE:  MB52 but not in date range.
    In mard table i did't find the date for unrestricted, blocked and quality.
    from where can i get that information and how should i link all
    Need a psudo code for it.
    If any one worked on this kind of object plz send me the code.
    Points assured..
    Regards..
    Ravi Reddy.

    Hi
    Check this sample code hope it will helpfull for you
    *DATA: ED TYPE F.
    DATA : ED(15) TYPE N .
    TABLES: EKKO, EKBE, EKPO, KONH , KONV ,LFA1 ,ESLL.
    TYPE-POOLS: SLIS.
    DATA: val1  like konh-vakey.
    Data:GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
         G_REPID LIKE SY-REPID,
         G_GRID_TITLE TYPE LVC_TITLE.
    Data:G_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
    DATA:G_TABNAME TYPE SLIS_TABNAME VALUE 'ITAB1',
    G_SAVE .
    DATA:GS_VARIANT LIKE DISVARIANT.
    DATA:LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA:GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
         G_SAVE = 'A'.
    DATA: BEGIN OF ITAB OCCURS 10,
              EBELN LIKE EKKO-EBELN,
    *          LIFNR  like p_vendor,
              LIFNR LIKE EKKO-LIFNR,
              NAME1 LIKE LFA1-NAME1,
              NAME2 LIKE LFA1-NAME2,
    *          EBELP LIKE EKBE-EBELP,
              BELNR LIKE EKBE-BELNR,
              VGABE LIKE EKBE-VGABE,
              GJAHR LIKE EKBE-GJAHR,
              KNUMV LIKE EKKO-KNUMV,
              EKORG LIKE EKKO-EKORG,
              BEDAT LIKE EKKO-BEDAT,
    *          VAKEY LIKE KONH-VAKEY,
         END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 10,
              NAME1 LIKE LFA1-NAME1,
              NAME2 LIKE LFA1-NAME2,
              EBELN LIKE EKPO-EBELN,
              LIFNR LIKE EKKO-LIFNR,
              EBELP LIKE EKPO-EBELP,
    *          EBELP LIKE EKBE-EBELP,
              KNUMH LIKE KONH-KNUMH,
              BELNR LIKE EKBE-BELNR,
              MATNR LIKE EKPO-MATNR,
              TXZ01 LIKE EKPO-TXZ01,
              PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
              EXTROW LIKE ESLL-EXTROW,
              SRVPOS LIKE ESLL-SRVPOS,
              KTEXT1 LIKE ESLL-KTEXT1,
              KOSTL LIKE EKKN-KOSTL,
              NETPR LIKE EKPO-NETPR,
              NETWR LIKE EKPO-NETWR,
              ED1  TYPE p decimals 2,
              KBETR2 LIKE KONV-KBETR,
              KBETR1 LIKE KONV-KBETR,
              KBETR LIKE KONV-KBETR,
    *          KBETR3 LIKE KONV-KBETR,
              KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
              KWERT1 LIKE KONV-KWERT, " THIS IS FOR PBXX OR PB00
              KWERT2 LIKE KONV-KWERT, " THIS FOR OTHER CONDITION
              MENGE LIKE EKPO-MENGE,
    *          TOTAL(15) type  .
              TOTAL TYPE p decimals 2,
              VAKEY LIKE KONH-VAKEY,
              WERKS LIKE EKPO-WERKS,
              MWSKZ LIKE EKPO-MWSKZ,
              PACKNO LIKE EKPO-PACKNO,
              KNUMV LIKE KONV-KNUMV,
              SUB_PACKNO LIKE ESLL-SUB_PACKNO,
              GJAHR LIKE RSEG-GJAHR,
          END OF ITAB1.
    DATA: BEGIN OF ITAB2 OCCURS 10,
             EBELN LIKE EKKN-EBELN,
             EBELP LIKE EKKN-EBELP,
             PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
             KOSTL      LIKE EKKN-KOSTL,
          END OF ITAB2.
    data: begin of itab3 occurs 10,
            KNUMH LIKE KONH-KNUMH,
            KSCHL LIKE KONH-KSCHL,
         end of itab3.
    data: begin of itab4 occurs 10,
            KBETR LIKE KONP-KBETR,
          end of itab4.
    data: begin of itab5 occurs 10,
            KPOSN LIKE KONV-KPOSN,
            KNUMV LIKE KONV-KNUMV,
            KSCHL LIKE KONV-KSCHL,
            KBETR LIKE KONV-KBETR,
            KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
    *          KAWRT LIKE KONV-KAWRT,
         end of itab5.
    DATA: BEGIN OF ITAB6 OCCURS 10,
    *          PACKNO LIKE EKPO-PACKNO,
              SUB_PACKNO LIKE ESLL-SUB_PACKNO,
            END OF ITAB6.
    DATA: BEGIN OF ITAB7 OCCURS 10,
           BELNR LIKE RSEG-BELNR,
           GJAHR LIKE RSEG-GJAHR,
    END OF ITAB7.
    DATA: BEGIN OF ITAB8 OCCURS 10,
           SUB_PACKNO LIKE ESLL-SUB_PACKNO,
           SRVPOS LIKE ESLL-SRVPOS,
           EXTROW LIKE ESLL-EXTROW,
           KTEXT1 LIKE ESLL-KTEXT1,
    END OF ITAB8.
    *selection-screen
    *SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    *SELECTION-SCREEN SKIP 2.
    *SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 25(23) text-002.
    **SELECT-OPTIONS: s_lifnr FOR ekko-lifnr.
    *PARAMETERS:p_lifnr LIKE ekko-lifnr obligatory.
    *SELECTION-SCREEN END OF LINE.
    *SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_data.
    *  PERFORM field_catalog.
    *  PERFORM display_data.
    END-OF-SELECTION.
    **&      Form  display_data
    **       text
    *FORM display_data.
    *data: new(15) TYPE N.
    *  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    *    EXPORTING
    *      i_callback_program = sy-repid
    *      it_fieldcat        = int_cat[]
    *    TABLES
    *      t_outtab           = int_out
    *    EXCEPTIONS
    *      program_error      = 1
    *      OTHERS             = 2.
    *ENDFORM.                    "display_data
    PERFORM GET_DATA.
    PERFORM CALL_ALV_GRID.
    FORM CALL_ALV_GRID.
    PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM                = G_repid
          I_CALLBACK_USER_COMMAND           = G_USER_COMMAND
          I_GRID_TITLE                      = G_GRID_TITLE
          IT_FIELDCAT                       = GT_FIELDCAT[]
          I_DEFAULT                         = 'X'
          I_SAVE                            =  G_SAVE
          IS_VARIANT                        =  Gs_VARIANT
        TABLES
          T_OUTTAB                          = ITAB1.
    ENDFORM.
    FORM FIELDCAT_INIT
           USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-seltext_l     = 'Vendo No'.
      LS_FIELDCAT-FIELDNAME     = 'LIFNR'.
      LS_FIELDCAT-REF_FIELDNAME = 'LIFNR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKKO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L  = 'Vendor Name'.
      LS_FIELDCAT-FIELDNAME     = 'NAME1'.
      LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
      LS_FIELDCAT-REF_TABNAME   = 'LFA1'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    * CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'NAME2'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'NAME2'.
    *  LS_FIELDCAT-REF_TABNAME   = 'LFA1'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-seltext_l   = 'Purchase Document No'.
      LS_FIELDCAT-FIELDNAME     = 'EBELN'.
      LS_FIELDCAT-REF_FIELDNAME = 'EBELN'.
      LS_FIELDCAT-REF_TABNAME   = 'EKKO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'VGABE'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'VGABE'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKBE'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Item No'.
      LS_FIELDCAT-FIELDNAME     = 'EBELP'.
      LS_FIELDCAT-REF_FIELDNAME = 'EBELP'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'BELNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'BELNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKBE'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Document Con'.
      LS_FIELDCAT-FIELDNAME     = 'KNUMH'.
      LS_FIELDCAT-REF_FIELDNAME = 'KNUMH'.
      LS_FIELDCAT-REF_TABNAME   = 'KONH'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L = 'Service/Material No'.
    *  LS_FIELDCAT-FIELDNAME     = 'MATNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'MATNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L = 'Service / Material description' .
    *  LS_FIELDCAT-FIELDNAME     = 'TXZ01'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'TXZ01'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'WBS Element' .
    *  LS_FIELDCAT-FIELDNAME     = 'PS_PSP_PNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'PS_PSP_PNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Serial Number' .
    *  LS_FIELDCAT-FIELDNAME     = 'EXTROW'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'PACKNO'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Service Number' .
    *  LS_FIELDCAT-FIELDNAME     = 'SRVPOS'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'SRVPOS'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Dscription' .
    *  LS_FIELDCAT-FIELDNAME     = 'KTEXT1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KTEXT1'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *    LS_FIELDCAT-SELTEXT_L = 'Cost Center'.
    *  LS_FIELDCAT-FIELDNAME     = 'KOSTL'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KOSTL'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'NETWR'.
      LS_FIELDCAT-FIELDNAME     = 'NETPR'.
      LS_FIELDCAT-reptext_ddic = 'Basic'.
    *  LS_FIELDCAT-SELTEXT_L    = 'Basic'.
       LS_FIELDCAT-REF_FIELDNAME = 'NETPR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-FIELDNAME     = 'NETWR'.
    *  LS_FIELDCAT-FIELDNAME     = 'NETPR'.
    *  LS_FIELDCAT-reptext_ddic = ''.
    *  LS_FIELDCAT-SELTEXT_L    = 'Basic'.
       LS_FIELDCAT-REF_FIELDNAME = 'NETWR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
        LS_FIELDCAT-SELTEXT_L = 'Excise'.
      LS_FIELDCAT-FIELDNAME     = 'ED1'.
      LS_FIELDCAT-REF_FIELDNAME = 'ED1'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L = 'Insurance'.
      LS_FIELDCAT-FIELDNAME     = 'KBETR2'.
        LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Frieght'.
      LS_FIELDCAT-FIELDNAME     = 'KWERT'.
      LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    * CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L     = '' .
    *  LS_FIELDCAT-FIELDNAME     = 'KBETR1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'KONV'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L     = 'PBXX'.
    *  LS_FIELDCAT-FIELDNAME     = 'KWERT1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
    *  LS_FIELDCAT-REF_TABNAME   = 'KONV'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'VAT/ST '.
      LS_FIELDCAT-FIELDNAME     = 'KBETR'.
      LS_FIELDCAT-REF_FIELDNAME = "KBETR".
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'OTHER '.
      LS_FIELDCAT-FIELDNAME     = 'KWERT2'.
      LS_FIELDCAT-REF_FIELDNAME = "KWERT".
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L = 'TOTAL'.
      LS_FIELDCAT-FIELDNAME     = 'TOTAL'.
      LS_FIELDCAT-REF_FIELDNAME = 'TOTAL'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       ENDFORM.                    " FIELDCAT_INIT
       FORM GET_DATA.
       SELECT  A~EBELN A~LIFNR  A~EKORG A~KNUMV B~VGABE  B~GJAHR B~BELNR
               L~NAME1 L~NAME2
            FROM  EKKO AS A
                          INNER JOIN EKBE  AS B ON  B~EBELN = A~EBELN
                          INNER JOIN LFA1 AS L ON L~LIFNR = A~LIFNR
                          INTO  CORRESPONDING
                          FIELDS OF TABLE ITAB.
    *                      WHERE B~VGABE = '2'.
    SELECT EKPO~EBELN EKPO~EBELP EKPO~MATNR EKPO~TXZ01 EKPO~WERKS
              EKPO~NETWR EKPO~MENGE EKPO~MWSKZ  EKPO~NETPR EKPO~PACKNO
              FROM EKPO
                        INTO CORRESPONDING FIELDS OF TABLE ITAB1
                        FOR ALL ENTRIES IN ITAB
                        WHERE EKPO~EBELN = ITAB-EBELN and
                              EKPO~BUKRS = 'company code'.
       SELECT EKKN~EBELN EKKN~EBELP EKKN~KOSTL EKKN~PS_PSP_PNR
          FROM EKKN
                   INTO CORRESPONDING FIELDS OF TABLE ITAB2
                   FOR ALL ENTRIES IN ITAB1
                   WHERE EKKN~EBELN = ITAB1-EBELN  AND
                         EKKN~EBELP = ITAB1-EBELP.
       SELECT KONV~KNUMV KONV~KSCHL KONV~KBETR KONV~KWERT KONV~KWERT
                  KONV~KPOSN
          FROM KONV
              INTO CORRESPONDING FIELDS OF TABLE ITAB5
              WHERE KONV~KNUMV =   ITAB1-KNUMV AND
                    KONV~KPOSN = ITAB1-EBELP.
    *    SELECT LFA1~NAME1 LFA1~NAME2 FROM LFA1
    *    INTO CORRESPONDING FIELDS OF TABLE ITAB1
    *    WHERE  LFA1~LIFNR = ITAB-LIFNR.
    *  SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
    *           ESLL~EXTROW  ESLL~KTEXT1 FROM ESLL
    *       INTO CORRESPONDING FIELDS OF TABLE ITAB6
    *       FOR ALL ENTRIES IN ITAB1
    *       WHERE ESLL~PACKNO = ITAB1-PACKNO .
    **         SELECT ESLL~SUB_PACKNO FROM ESLL
    **       INTO CORRESPONDING FIELDS OF TABLE ITAB6
    **       FOR ALL ENTRIES IN ITAB1
    **       WHERE ESLL~PACKNO = ITAB1-PACKNO.
    *        SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
    *           ESLL~EXTROW  ESLL~KTEXT1 FROM ESLL
    *       INTO CORRESPONDING FIELDS OF TABLE ITAB8
    *       FOR ALL ENTRIES IN ITAB6
    *       WHERE ESLL~PACKNO = ITAB6-SUB_PACKNO .
    * SELECT RSEG~BELNR RSEG~GJAHR FROM RSEG
    *        INTO CORRESPONDING FIELDS OF TABLE  ITAB7
    *        FOR ALL ENTRIES IN ITAB
    *        WHERE RSEG~BELNR = ITAB-BELNR AND
    *              RSEG~GJAHR = ITAB-GJAHR.
    *LOOP AT ITAB1.
    LOOP AT ITAB.
                  READ TABLE ITAB1 WITH KEY EBELN = ITAB-EBELN.
    *         IF ITAB1-EBELN = ITAB-EBELN.
                    IF sy-subrc eq 0.
    *                          ITAB1-EBELN = ITAB-EBELN.
                              ITAB1-LIFNR = ITAB-LIFNR.
    *                          ITAB1-EBELP = ITAB-EBELP.
                              ITAB1-BELNR = ITAB-BELNR.
                              ITAB1-KNUMV = ITAB-KNUMV.
                              ITAB1-NAME1  = ITAB-NAME1.
                              ITAB-NAME2 = ITAB-NAME2.
                              ITAB1-GJAHR = ITAB-GJAHR.
                    modify itab1 index   sy-tabix.
            ENDIF.
    ENDLOOP.
    *LOOP AT ITAB2.
    *         READ TABLE ITAB1 WITH KEY EBELN = ITAB2-EBELN.
    *          IF sy-subrc eq 0.
    *              ITAB1-EBELN = ITAB2-EBELN.
    *              ITAB1-PS_PSP_PNR = ITAB2-PS_PSP_PNR.
    *              ITAB1-KOSTL = ITAB2-KOSTL.
    *               modify itab1 transporting ps_psp_pnr kostl
    *               where ebeln = Itab2-ebeln AND EBELP = ITAB2-EBELP.
    *          ENDIF.
    *ENDLOOP.
    LOOP AT ITAB1.
    **ON CHANGE OF   ITAB1-ebeln or itab1-ebelp.
    *     concatenate itab1-werks itab1-lifnr itab1-matnr
    *         into val1.
    *   MOVE VAL1 TO ITAB1-VAKEY.
    *   MODIFY ITAB1.
    *    SELECT KONH~KNUMH KONH~KSCHL FROM KONH
    *        INTO  CORRESPONDING FIELDS OF TABLE ITAB3
    *        FOR ALL ENTRIES IN ITAB1
    *        WHERE KONH~VAKEY = ITAB1-VAKEY.
    **endon.
    **        sort Itab3 by kschl descending.
    **        Select konp-kbetr  from konp into itab4 where
    **        KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL.
    **ON CHANGE OF  ITAB1-ebelp.
    **LOOP AT ITAB3
    **  ON CHANGE OF  ITAB1-ebelp.
    *              itab1-knumh = itab3-knumh.
    **              SELECT  KONP~KBETR FROM KONP INTO CORRESPONDING FIELDS
    **              OF  TABLE  ITAB4
    **              FOR ALL ENTRIES IN ITAB3   WHERE
    **              KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL .
    **              IF ITAB3-KSCHL = 'JMOP' .
    **               ED = ITAB4-KBETR / 1000 * ITAB1-NETWR .
    **              ENDIF.
    **             IF ITAB3-KSCHL = 'JEC1'.
    **              Itab1-ed1 = ITAB4-KBETR / 1000 * ED.
    **              ADD ED TO ITAB1-ED1.
    **             modify  ITAB1 transporting ed1.
    **             ENDIF.
    *              IF ITAB3-KSCHL = 'JMOP' .
    *               ED = 16 / 100 * ITAB1-NETWR .
    *              ENDIF.
    *             IF ITAB3-KSCHL = 'JEC1'.
    *              Itab1-ed1 = 2 / 100 * ED.
    *              ADD ED TO ITAB1-ED1.
    *             modify  ITAB1 transporting ed1.
    *             ENDIF.
    **        ENDLOOP.
    **endon.
    modify  ITAB1.
    *endon.
      LOOP AT ITAB5.
         IF ITAB5-KSCHL = 'NAVS' OR ITAB5-KSCHL = 'NAVM'.
                ITAB1-KBETR = ITAB5-KBETR.
                 modify  ITAB1 transporting KBETR
                 where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP .
               ELSEIF ITAB5-KSCHL = 'FRA1' OR ITAB5-KSCHL = 'FRC1' OR
                    ITAB5-KSCHL = 'FRB1'.
                       ITAB1-KWERT = ITAB5-KWERT .
                       modify  ITAB1 transporting KWERT
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *               IF ITAB5-KSCHL = 'FRA1'.
    *                    ITAB1-KBETR1 = ITAB5-KBETR / 1000 * ITAB1-NETWR .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *                 ELSEIF ITAB5-KSCHL = 'FRC1' .
    *                   ITAB1-KBETR1 = ITAB5-KBETR * ITAB1-MENGE .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *                 ELSEIF ITAB5-KSCHL = 'FRB1' .
    *                    ITAB1-KBETR1 = ITAB5-KBETR .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *              ENDIF.
    *           **THIS  CODE IS FOR iNSURANCE  CONDITION
               ELSEIF ITAB5-KSCHL = 'ZGIN' OR ITAB5-KSCHL = 'ZIN2'.
                       ITAB1-KBETR2 = ITAB5-KBETR.
                       modify  ITAB1 transporting KBETR2
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *           **THIS  CODE IS FOR PBXX OR PB00  CONDITION
    *          ELSEIF ITAB5-KSCHL = 'PBXX' OR ITAB5-KSCHL = 'PB00'.
    *                   ITAB1-KWERT1 = ITAB5-KWERT1.
    *                   modify  ITAB1 transporting KWERT1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    **          ELSEIF ITAB5-KSCHL = 'JOCM' OR ITAB5-KSCHL = 'RA00' OR
    **                 ITAB5-KSCHL = 'RA01' OR ITAB5-KSCHL = 'RB00' OR
    **                 ITAB5-KSCHL = 'RC00' OR
    **THIS  CODE IS FOR OTHER CONDITION
               ELSEIF ITAB5-KSCHL = 'RL01' OR ITAB5-KSCHL = 'ZA00' OR
                     ITAB5-KSCHL = 'ZA01' OR ITAB5-KSCHL = 'ZAE1' OR
                     ITAB5-KSCHL = 'ZAED' OR
                     ITAB5-KSCHL = 'ZAFR' OR ITAB5-KSCHL = 'ZB00' OR
                     ITAB5-KSCHL = 'ZBCH' OR ITAB5-KSCHL = 'ZBED' OR
                     ITAB5-KSCHL = 'ZC00' OR
                     ITAB5-KSCHL = 'ZCEX' OR ITAB5-KSCHL = 'ZCIF' OR
                     ITAB5-KSCHL = 'ZHC1' OR ITAB5-KSCHL = 'ZHC2' OR
                     ITAB5-KSCHL = 'ZHCT' OR
                     ITAB5-KSCHL = 'ZHCV' OR ITAB5-KSCHL = 'ZJOC' OR
                     ITAB5-KSCHL = 'ZOTH' OR ITAB5-KSCHL = 'ZOTP' OR
                     ITAB5-KSCHL = 'ZOTT' OR
                     ITAB5-KSCHL = 'ZPK1' OR ITAB5-KSCHL = 'ZPK2' OR
                     ITAB5-KSCHL = 'ZPK3' OR ITAB5-KSCHL = 'ZPK4' OR
                     ITAB5-KSCHL = 'ZRPO' OR
                     ITAB5-KSCHL = 'ZSE1' OR ITAB5-KSCHL = 'ZSED' OR
                     ITAB5-KSCHL = 'ZSFR' OR ITAB5-KSCHL = 'ZSTX' OR
                     ITAB5-KSCHL = 'ZTPI' OR
                     ITAB5-KSCHL = 'ZTPV' OR ITAB5-KSCHL = 'ZTRD' OR
                     ITAB5-KSCHL = 'ZWCT'.
                       ITAB1-KWERT2 = ITAB5-KWERT.
                       modify  ITAB1 transporting KWERT2
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
              modify itab1.
           ENDIF.
    ENDLOOP .
    ITAB1-TOTAL = ITAB1-NETWR + ITAB1-KWERT2 + ITAB1-KWERT + ITAB1-KBETR.
    *              ITAB1-TOTAL = ITAB1-NETWR + ITAB1-ED1 + ITAB1-KBETR2 +
    *                     ITAB1-KBETR1 + ITAB1-KBETR + ITAB1-KWERT   .
                     modify  ITAB1 transporting TOTAL.
    LOOP AT ITAB6.
              ITAB1-SUB_PACKNO = ITAB6-SUB_PACKNO.
    *           modify  ITAB1.
    ENDLOOP.
    LOOP AT ITAB7.
            ITAB1-BELNR = ITAB7-BELNR.
            ITAB1-GJAHR = ITAB7-GJAHR.
      ENDLOOP.
    LOOP AT ITAB8.
              ITAB1-SUB_PACKNO = ITAB8-SUB_PACKNO.
              ITAB1-SRVPOS  = ITAB8-SRVPOS.
              ITAB1-EXTROW = ITAB8-EXTROW.
              ITAB1-KTEXT1 = ITAB8-KTEXT1.
              modify  ITAB1.
    ENDLOOP.
    * SELECT ESLL~PACKNO ESLL~SUB_PACKNO ESLL~SRVPOS ESLL~KTEXT1
    *          FROM ESLL
    *          INTO CORRESPONDING FIELDS OF TABLE ITAB6
    *          WHERE ESLL~PACKNO = ITAB1-PACKNO.
    ** delete  adjacent  duplicates  from itab1 comparing EBELN .
    modify  ITAB1.
    endloop.
    sort Itab1 by EBELN Ascending.
            SELECT KONV~KBETR FROM KONV
            INTO ITAB1-KBETR
            WHERE KONV~KSCHL =  'NAVS' OR KONV~KSCHL = 'NAVM'.
            ENDSELECT.
            ITAB1-KBETR = ITAB5-KBETR.
    *ENDLOOP.
    *ENDLOOP.
    *ENDLOOP.
    ENDFORM.
    Reward all helpfull answers
    Regards
    Pavan

  • Matrix report with Date

    Hi All,
    How do I generate a report with colum is data and row is date like below, and then generate a chart that show the progress by each day. Thanks so much for your help.
    Date 03/17/2006 03/18/2006 03/19/2006 03/20/2006 .........
    My Data
    Data 1 2 20 3 28
    Data 2 3 35 0 0
    Data 3 6 88 9 7
    Data 4 8 123 100 88
    Best Regards,
    Andy Pham

    Hi Andy,
    In a matrix report, the usual problem with reporting by all the dates in a period is that they may be gaps in dates where there is no data for that day.
    Therefore, you will need to have a workaround by having a view with all the possible dates using something like the following SQL.
    eg
    CREATE VIEW MY_VIEW AS
    SELECT (TRUNC(sysdate) -30 + ROWNUM) DATES FROM user_objects WHERE rownum < 31;
    You can play around with this SQL to suit your requirements.
    In your query for the matrix report, include MY_VIEW to the query and outer join your date column to DATES. ie DATES = your_date_column(+)
    Use DATES as a MATRIX column field and it will give you 30 columns. The MATRX row field and MATRIX cell field will be your own data.
    One very important thing to note is your date column must be truncated to 0 hours and minutes otherwise you will not get matching records.
    Regards,
    John

  • Financial Reports with Date measures are showing data one day less

    Hello,
    I am running a financial report off of an ASO cube with type measures enabled. However, when i run the report in FR, that date data coming out is 1 day less...for eg 04/30/2012 comes out as 04/29/2012.
    however, when i run the same ad-hoc report via smart view, it is fine and the date comes out as expected. this is happening only in FR.
    Any help in this regard will be much appreciated.
    Thank you...

    I'm not sure what version you are running, but this was determined to be a bug that was fixed in 11.1.2.
    Although not pretty, you can add a similarly named dynamic member that will advance your date for you that you could use in FRS. You could use the DateRoll function: DateRoll ([Date Dimension], DP_DAY, 1 ). Just an idea.

  • PDF's I'm creating with Group 4 data report Insufficient Data for Image

    I am maintaining a software application, which creates PDF files from JPEG and TIFF (with Group 4 compression) image files, which typically come from scanners.  It has performed well for many years, but as of the release of Adobe Reader X, we are seeing "Insufficient Data for Image" on some images.
    I've read reports of this message on these forums, and I've tried shrinking the image, adjusting zoom, and upgrading to Adobe Reader XI -- none of these have worked.
    Our software creates these PDF files by wrapping the raw image data in an XObject, which looks like this:
    24 0 obj
    << /Type /XObject
    /Subtype /Image
    /Name /Im1
    /Filter /CCITTFaxDecode
    /Width 1704
    /Height 2200
    /BitsPerComponent 1
    /ColorSpace /DeviceGray
    /DecodeParms <</K -1 /Columns 1704 /Rows 2200 >>
    /Length 25 0 R >>
    stream
    <<BINARY DATA>>
    endstream
    endobj
    25 0 obj
    31512
    endobj
    Wherein, the <<BINARY DATA>> are 31,512 bytes of raw image data -- the same data which would appear in a Group 4 compressed TIFF file. 
    Indeed, when we do create a Group 4 TIFF file with the same binary data, it opens successfully in all common viewers.
    Any assistance, such as the precise meaning of this error message, could be helpful.

    Just a note that the bug appears to relate to JPXDecode, so far as all previous reports seem to suggest (no inside information). JPXDecode supports multiple image resolutions in the same image, so messing with zoom sometimes helps. If you can post a complete file somewhere it might interest someone who could analyse it.
    The message simply means that decompressing the filters does not yield enough bytes. This may either reflect that there really isn't enough data, or it could indicate any kind of data error (which causes the filter to silently return EOF).

  • How can I calculate the number of members with data for a given Dimension

    HiI want to be able to calculate the exact size of the data given the number of blocks in existence.I am trying to work out a way of estimating the effect of changing Dimensions from Spare to Dense and to see which Dimensions would be worth it.Currently I have Cost Centre and Reference Code dimensions. I know that roughly 90% of the Cost Centres are used against just one member of Reference Codes but the other 10% are against multiple Reference Codes.I also have a number of other dimensions and the problem I come up against is that when I change a Dimension from Sparse I really don't know how many blocks will be in existence at the end of it so I can't multiply this against the blocksize to predict the total datasize.Any thoughts (the artistic "suck it and see" solution is obvious but I'd like to cut down on experiments - they take too long)Thanks

    You can do it manually if you like with code in the Error Console.
    Copy and paste the code in the Code field in the Error Console and click the Evaluate button.
    *Firefox/Tools > Web Development > Error Console (Shift+CtrL+J)
    See http://kb.mozillazine.org/User:Dickvl/JavaScript_Error_Console#Expire_History_By_Days

  • Generate report with data from database package

    Hi
    Is it possible to generate a report where the values come from an oracle database package instead of from an sql query declared in the report itself?
    If yes, how is it done?
    Appreciate any help. Thx.

    Hi,
    You can use REF CURSORs to generate reports from a database package.
    For information about REF CURSORs, please see Chapter 40 'Building a Paper Report with REF CURSORs' of the Oracle Reports Building Reports manual.
    This chapter is at:
    http://download-uk.oracle.com/docs/html/B13895_01/orbr_refcur.htm#i1011693
    Hope this helps.
    Regards,
    Panna

  • Scheduling WEBI reports with formulas for parameters

    Post Author: David Gordon
    CA Forum: WebIntelligence Reporting
    Hi,
    I am new to this environment. I would like to try and schedule a report monthly with dates (that will change from month to month). ie first and last day of previous month. Is there an easy way of achieving this automatically?
    D Gordon

    Post Author: DebT
    CA Forum: WebIntelligence Reporting
    Needed to do the same thing, with lots of different date ranges - month to date, year to date, last month, last week, fiscal year, etc.  Came up with a solution that takes a bit to set-up but then is re-usable and flexible.  I'll do my best to try and explain. 1)  Within the universe, created a "CurrentDate" derived table that calculates various points in time (yesterday, first of the week, last of the week, first of last month, last of last month, etc.).  Because the product would not let me use an unlinked table in calculations, I used a common table as the "from" in the SQL and included a common identifier so I could link the derived table to an existing table in the universe - I selected a small one with only a few records.  Using Oracle here, not SQL, so you'd need to modify to use SQL date functions, and add/delete the calculations you need:select distinctcommonidentiferfield,trunc(sysdate) as CurrentDate,trunc(sysdate)-1 as Yesterday,trunc(sysdate)1 as Tomorrow,case  when to_char(sysdate,'D')=2 then trunc(sysdate)-3  when to_char(sysdate,'D')=1 then trunc(sysdate)-2  else trunc(sysdate)-1  end as PriorWorkDay,case  when to_char(sysdate,'D')=6 then trunc(sysdate)3  when to_char(sysdate,'D')=7 then trunc(sysdate)2  else trunc(sysdate)1  end as NextWorkDay,case  when to_char(sysdate,'D')=5 then trunc(sysdate)4  when to_char(sysdate,'D')=6 then trunc(sysdate)4  else trunc(sysdate)2  end as TwoWorkDaysFromToday,trunc(sysdate,'D') as StartThisWeek,trunc(sysdate,'D')6 as EndThisWeek,trunc(sysdate,'D')-7 as StartLastWeek,trunc(sysdate,'D')-1 as EndLastWeek,trunc(sysdate,'D')7 as StartNextWeek,trunc(sysdate,'D')13 as EndNextWeek,trunc(sysdate,'MM') as FirstOfThisMonth,trunc(last_day(sysdate)) as LastOfThisMonth,trunc(last_day(add_months(sysdate,-2))1) as FirstOfLastMonth,trunc(last_day(add_months(sysdate,-1))) as LastOfLastMonth,case  when extract(month from sysdate)>=07 then extract(year from sysdate)1  else extract(year from sysdate)  end as CurrentFiscalYear,to_date(concat('07/01/',case                          when extract(month from sysdate)>=07 then extract(year from sysdate)                          else extract(year from sysdate)-1                          end),'mm/dd/yyyy') as StartCurrentFiscalYear,to_date(concat('23:59:59 06/30/',case                                   when extract(month from sysdate)>=07 then extract(year from sysdate)+1                                   else extract(year from sysdate)                                   end), 'hh24:mi:ss mm/dd/yyyy') as EndCurrentFiscalYear,case  when extract(month from sysdate)>=07 then extract(year from sysdate)  else extract(year from sysdate)-1  end as LastFiscalYear,to_date(concat('07/01/',case                          when extract(month from sysdate)>=07 then extract(year from sysdate)-1                          else extract(year from sysdate)-2                          end),'mm/dd/yyyy') as StartLastFiscalYear,to_date(concat('23:59:59 06/30/',case                                   when extract(month from sysdate)>=07 then extract(year from sysdate)                                   else extract(year from sysdate)-1                                   end), 'hh24:mi:ss mm/dd/yyyy') as EndLastFiscalYearfromsmallexistingtable 1a)  Link the derived "CurrentDate" table to smallexistingtable using
    your commonidentiferfield (at least I had to do this, though everything
    parsed ok in designer, when used in a query unlinked, it screamed quite
    unhappily which is why I ended up basing the query on
    smallexistingtable and linking). 2)  Created a "Dates" class and objects for each date in the above table, ie. "Current Date", "Yesterday", "Tomorrow", "First of last month", "Last of last month"3)  Created an object called Prompt - Date Range - Start Date.  This prompts the user to select the date range type they want and also allows for "custom" date ranges for on-demand reports.  For scheduled reports, you just select your response as part of the scheduled instance.casewhen @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Today' then @Select(Dates\Current Date)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Yesterday' then @Select(Dates\Yesterday)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Tomorrow' then @Select(Dates\Tomorrow)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Prior Work Day' then @Select(Dates\Prior Work Day)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Next Work Day' then @Select(Dates\Next Work Day)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Today - Next Work Day' then @Select(Dates\Current Date)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Two Work Days from Today' then @Select(Dates\Two Work Days From Today)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='This Week' then @Select(Dates\Start This Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Last Week' then @Select(Dates\Start Last Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Next Week' then @Select(Dates\Start Next Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Month' then @Select(Dates\First of this month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Last Month' then @Select(Dates\First of last month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - EOFY' then @Select(Dates\Start of Current Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - Today' then @Select(Dates\Start of Current Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - Last Month' then @Select(Dates\Start of Current Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Prior Fiscal Year' then @Select(Dates\Start of Last Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Start - Current Month' then to_date(@Prompt('Begin Date (Enter any date if N/A)','D',,MONO,free,Persistent,{'01/01/1900'},User:0,))when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Start - Last Month' then to_date(@Prompt('Begin Date (Enter any date if N/A)','D',,MONO,free,Persistent,{'01/01/1900'},User:0,))when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Date Range' then to_date(@Prompt('Begin Date (Enter any date if N/A)','D',,MONO,free,Persistent,{'01/01/1900'},User:0,))end4)  To capture the end date, created a second object, Prompt - Date Range - End Date.  Just be really sure that the wording of all your @Prompts is consistent throughout all the statements so you'll only receive one of each prompt.casewhen @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Today' then @Select(Dates\Current Date)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Yesterday' then @Select(Dates\Yesterday)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Tomorrow' then @Select(Dates\Tomorrow)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Prior Work Day' then @Select(Dates\Prior Work Day)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Next Work Day' then @Select(Dates\Next Work Day)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Today - Next Work Day' then @Select(Dates\Next Work Day)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Two Work Days from Today' then @Select(Dates\Two Work Days From Today)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='This Week' then @Select(Dates\End This Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Last Week' then @Select(Dates\End Last Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Next Week' then @Select(Dates\End Next Week)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Month' then @Select(Dates\Last of this month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Last Month' then @Select(Dates\Last of last month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - EOFY' then @Select(Dates\End of Current Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - Today' then @Select(Dates\Current Date)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Current Fiscal Year - Last Month' then @Select(Dates\Last of last month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Prior Fiscal Year' then @Select(Dates\End of Last Fiscal Year)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Start - Current Month' then @Select(Dates\Last of this month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Start - Last Month' then @Select(Dates\Last of last month)when @Prompt('Select records for','A',{'Today','Yesterday','Tomorrow','Prior Work Day','Next Work Day','Today - Next Work Day','Two Work Days from Today','This Week','Last Week','Next Week','Current Month','Last Month','Current Fiscal Year - EOFY','Current Fiscal Year - Today','Current Fiscal Year - Last Month','Prior Fiscal Year','Custom Start - Current Month','Custom Start - Last Month','Custom Date Range'},MONO,CONSTRAINED)='Custom Date Range' then to_date(@Prompt('End Date (Enter any date if N/A)','D',,MONO,free,Persistent,{'01/01/1900'},User:0,))end 5)  Created a filter, Prompt - Date Selection that is used to select the appropriate records based on your record date being within the date range selected:@Select(My Date Field) between @Select(Prompt Fields\Prompt - Date Range - Start Date) and @Select(Prompt Fields\Prompt - Date Range - End Date)6)  When you create your query, just use the filter created in step 5.  I also usually include the Prompt - Date Range - Start Date and Prompt - Date Range - End Date objects so that I can use them min(Prompt - Date Range - Start Date) and max(Prompt - Date Range - End Date) in the report header to display the actual date range selected (all the value in Prompt - Date Range - Start Date are exactly the same, I use the min to avoid multiple value errors - same for Prompt - Date Range - End Date, I use max just because logically my brain likes that better).  When you refresh the query, it will ask what date range type you want, a start date and end date - used for custom ranges - you can enter any date if not selecting a custom date as it is ignored. Hope that makes sense and is helpful.  It's worked really well for me.  I also have an even more complicated version (imagine that!) for situations where there may be multiple dates a user can choose from, ie a posting date vs the date of service.  It will ask the user which they want and in the Prompt - Date Range - Start Date, a case statement is added to handle the selection/use of different date fields.Deb

Maybe you are looking for