CFGRID dynamic PageSize

Hi all

I use CFGIRD with a pageSize parameter equal to 25. However, in some cases, the returned recordset is less than 25 records, and the grid will therefore empty space.

Anyone know if it is possible to dynamicaly change the size of a cfgrid that is based on the number of records returned?

Derrick_DC wrote:
> Hi all,
>
> I use CFGIRD with a pageSize parameter equal to 25. However, in some cases the Recordset
> returned is less than 25 records and the grid will therefore empty space.
>
> Does anyone know if it is possible to dynamicaly change the size of a cfgrid
> based on the number of records returned?
>

easy. in your cfc:
(1) add after the arguments
statements (assuming your argument which receives {cfgridpagesize}
value is named pagesize)
(2) assuming that you have a named myQuery query that retrieves data for grid
Since the database, add the following line AFTER the query:<>
myQuery.recordcount lt arguments.pagesize >
myQuery.recordcount >
(3) your cfreturn line should then be:<>
queryConvertForGrid (myQuery, arguments.page, ps)

HTH

--

Azadi Saryev
SABAI - Dee.com
http://www.SABAI-Dee.com

Tags: ColdFusion

Similar Questions

  • PageSize CFGRID not working not

    We are trying the new functionality in CF8, and I can't get it to work. CFGRID tags has a pagesize for grids of HTML attribute. This example uses Ajax pagination. I can't make it work. No matter what I do, all records appear on a single page.

    Here is a simple code. This works for anyone else?

    PageSize attribute does not work with the query attribute.

    Trevor

  • Is it possible to view the code on dynamic content rules?

    We have problems with a bug that does not allow to fill us dynamic data content in a custom data object, and I wanted to try to play with the code. Is access to the code in the rules anyway? We can access the code of the content itself.

    Thank you!

    Hi Brittany,

    We have not documented these end points, but you can search and retrieve dynamic content sections using the following endpoint:

    • GET: / assets/dynamicContents? depth = {depth} & count = {number} & page = {page} & search = {search} & orderBy = {orderBy} & lastUpdatedAt = {lastUpdatedAt}

    The response to this appeal is as follows:

    {

    "items":]

    {

    'type': "DynamicContent"

    « id » : « 1 »,

    'converted': '1219180658 ',.

    "depth':"full. "

    "description": ","

    "folderId": "1418",.

    "name': 'sample product Promotions."

    "updatedAt": "1321729405",

    "updatedBy": "310"

    'defaultContentSection': {}

    "type': 'ContentSection."

    'id': '21 ',.

    'converted': '1289253558 ',.

    "createdBy": "12."

    "depth':"full. "

    "folderId": "320"

    "name': 'rule by default."

    "updatedAt": "1343658302",

    "updatedBy": "234"

    ""contentHtml":"

    example of content<\>«»

    "contentText": "our sample seminars cover all of the United States...". »,

    'forms': [],.

    "links":]

    {

    'type': 'hyperlink ',.

    « id » : « -1",

    "name': 'check now."

    'href': "" http:///\/ www.eloqua.com?elq=recipientid<\ pan="">& elqCampaignId =".

    }

    ],

    "images": [],.

    "scope": "local."

    'size': {}

    'type': 'Size',

    'width': '0',

    'height': '0 '.

    }

    },

    'rules':]

    {

    'type': 'DynamicContentRule ',.

    « id » : « 1 »,

    'contentSection': {}

    "type': 'ContentSection."

    « id » : « 8 »,

    'converted': '1287346933 ',.

    "createdBy": "9."

    "depth':"full. "

    "folderId": "320"

    "name': 'sample content."

    "updatedAt": "1323263825",

    "updatedBy": "51",.

    ""contentHtml":"

    example of content<\>«»

    "contentText": "example text."

    'forms': [],.

    "links":]

    {

    'type': 'hyperlink ',.

    « id » : « -1",

    "name':"survey. "

    'href': ' "http:///\/app.en25.com\/e\/er.aspx?s=1002&lid=704&elq=recipientid<\ pan="">".

    }

    ],

    "images": [],.

    "scope": "local."

    'size': {}

    'type': 'Size',

    'width': '0',

    'height': '0 '.

    }

    },

    'criteria':]

    {

    'type': 'ContactFieldCriterion ',.

    « id » : « 1 »,

    'condition': {}

    'type': 'TextValueCondition ',.

    "operator':"equal. "

    'value ':

    },

    "fieldId": "100047"

    }

    ],

    "depth':"full. "

    'Déclaration': '1 '.

    },

    ...

    ]

    }

    ],

    "page": 1.

    "pageSize": 1.

    'total': 100

    }

    Please note that this endpoint can change and we will seek to have a more complete documentation about this.

    Thank you

    Fred

  • ColdFusion 8 to 11 CFGrid method

    Hello


    I have a CFGrid that worked correctly in ColdFusion 8 but after I upgraded my version of ColdFusion 11, CFGrid control does not update/rebinding data after that is button update is that is clicked. I have 4 inputs, a search button, and a grid that is looking for module.


    Here's the part of my code: -.

    <script type="text/javascript" >
       
        getID = function(){
           
           if(document.thisform.usrID){          
               var usrID = ColdFusion.getElementValue('usrID');   
               alert(usrID); 
                  return usrID;
               }
        }
    
        getName = function(){
            if(document.thisform.name){
           var name = ColdFusion.getElementValue('name');
           return name;
            }
        }
       
        getDepart = function(){
            if(document.thisform.depart){
           var depart = ColdFusion.getElementValue('depart');
           return depart;
            }
        }
       
        getStatus = function(){
            if(document.thisform.status){
           var status = ColdFusion.getElementValue('status');
           return status;
            }
        }           
       
    </script>
    


    <cfform name="thisform" method="post">
            <cfoutput>
            <table width="79%"  align="left" border="0" class="MainContent">
                <tr>
                    <td width="17%" ><cfoutput>#UsrID#</cfoutput> :</td>
                  <td width="30%"><cfinput class="parfontinput" type="Text" name="usrID" maxlength="30" autosuggest="#ValueList(data.adm_authid)#"></td>
                    <td width="18%" ><cfoutput>#UsrName#</cfoutput> :</td>            
                  <td width="35%"><cfinput class="parfontinput" type="Text" name="name" maxlength="250" autosuggest="#ValueList(data.aut_name)#"></td>
                </tr>
                <tr>
                    <td width="17%" ><cfoutput>#Depart#</cfoutput> :</td>
                    <td>
                        <cfselect class="parfontinput" name="depart">
                            <option value="-1" selected>-- #DrpDown# --</option>
                                <cfloop query="department">
                                    <option value="#cd_id#">#cd_desc#</option>
                                </cfloop> 
                        </cfselect></td>
                     <td width="18%" ><cfoutput>#Status#</cfoutput> :</td>            
                      <td width="35%">
                        <cfselect class="parfontinput" name="status">
                            <option value="-1" selected>-- #DrpDown# --</option>
                                <cfloop query="sts">
                                    <option value="#cd_id#">#cd_id# - #cd_desc#</option>
                                </cfloop> 
                  </cfselect></td>
                </tr>
                <tr>
                    <td colspan="4"><br>
                        <cfinput id="button" type="button" name="submitBtn" value="#BtnSrch#" onClick="ColdFusion.Grid.refresh('userGrid');"
                        class="button2" style="width:80px"> 
                               </td>
                </tr>    
                <tr>
                    <td colspan="4">                 </td>
                </tr>
            </table>
            </cfoutput>
        </cfform>
    
    <cfform name="myForm" method="post" action="userForm.cfm">    
                
                
                    <cfgrid name="userGrid" 
                            format="html" 
                            pagesize="10"
                            width="800"
                            preservePageOnSort="true"
                            bind="cfc:ipo.member.userCom.getAllUser({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},getID(),getName(),getDepart(),getStatus())" 
                            sort="true"
                            stripeRows="true" 
                            colheaderbold="yes" selectcolor="##CCCCCC" selectonload="false">
                            
                        <cfgridcolumn name="rownum"     header="#GridNo#"                 width="030">    
                        <cfgridcolumn name="adm_authid" header="#GridUserID#"             display="yes">
                        <cfgridcolumn name="aut_name"     header="#GridName#"                width="200"    display="yes">
                        <cfgridcolumn name="department" header="#GridDept#"             width="200"    display="yes">
                        <cfgridcolumn name="STATUS"     header="#GridStatus#"             width="150"    display="yes">
                        <cfgridcolumn name="See"         header="#GridView#"             width="050" display="yes">        
                    </cfgrid>
                 
                </cfform>
    

    The loading of the page (ColdFusion (11), the bind function works normally and it runs the function getID(), getName(), getDepart() and getStatus() . After that I filled one of the fields, let's deviate and clicked on the search button, it should seek the Department and post it on the grid. The problem is the function bind will work, but it has not executed the function getID(), getName(), getDepart() and getStatus() . In ColdFusion 8, the code works perfectly. There is no work around on this?

    I found the solution. I replaced the JavaScript functions with an appropriate parameters for the binding attributes.

    From there: -.

    link = ' cfc:ipo.member.userCom.getAllUser ({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgri dsortdirection}, getID () and getName (), getDepart (), getStatus ()) " ".


    To do this: -.

    link = ' cfc:ipo.member.userCom.getAllUser ({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgri dsortdirection},{usrID@submitBtn},{name@submitBtn}, {out@submitBtn}, {@submitBtnstatus}). »


    {[control ID][@event]}

    Where in this case, will get it the value of the entry usrID after submitBtn button has been clicked. It is the same for the others.

  • cfgrid toolbar at the bottom does not not in hidden div

    I have a cfgrid bound inside a hidden div when I do the controls visible cfgrid, div and data are there, but the toolbar at the bottom (with the navigation buttons, etc) is missing. This is a problem because it truncates all lines exceeding the pageSize value.

    I tried in js using ColdFusion.Grid.refresh ('mygrid', true); ColdFusion.Grid.getGridObject('MyGrid').render (); = > no effect

    help appreciated

    I finally have, was hide it well:

    ColdFusion.Grid.showBottomToolbar (gridName);

  • How wordWrap in cfgrid?

    Here is the code in my form

    < name cfform = "displayProjects" method = "post" preservedata = "Yes" format = "flash" action = "" id = "myformid" width = "800" height = "1000" wmode = "transparent" > "
    < cfformgroup type = "Control Panel" >
    < cfformgroup type = "vbox" width = "800" label = "Coastal projects" >
    < name cfgrid = format 'project' = colheaderbold 'flash' = 'Yes' query = "projectNames" height = "500" style = "padding-left: 150px" >
    < cfgridcolumn header = 'Project name' name = "txtProjectName" >
    < / controls cfgrid >
    < / cfformgroup >
    < / cfformgroup >
    < / cfform >

    How wordWrap column name of the project? or grow its width dynamically?

    In order to get the text in the cell, you must add this before the grid style:

  • Master cfgrid - detail form fields

    I have a cfgrid that uses data binding to display data (summarized) masters. I want the user is able to select one of the rows in the datagrid control and not only have the summary data show in form fields in the grid (which works well so far), but I want to spend the keyfield hidden in a cfc in order to run a single record to the detail data query and show that both on the fly. I used a cfinvoke to pass the field key of a cfc, returning a recordset of the query and display detailed in the form fields. Everything works if I hardcode the keyfield (diadocumentkey) integer and me can even display the keyfield in the form below, but I have tried many variations trying to get the selected value record keyfield to be used in the cfinvoke the EFA without success. Isn't this possible? Is there another way? I tried what all the fields to the data grid, but given the number of possible records is very large, there is a decline in great performance. Some users will read and some will be able to edit and delete the record. My JavaScript is low, then perhaps there is a way to use it. Following are excerpts from the code:

    ...
    < cfform name = "frmSearchGrid" id = "frmSearchGrid" format = "html" method = "post" >
    ...
    < name cfgrid = "searchGrid."
    bindOnLoad = 'true '.
    format = "html".
    PageSize = "" #intShowRows # ""
    preservePageOnSort = 'true '.
    bind = "cfc: #strcomponentpath" >
    < name cfgridcolumn = header "diadocumentkey" = "diadocumentkey" display = "false" / >
    < name cfgridcolumn = "diadocno" header = "docno" width = "70" / >
    < name cfgridcolumn = "diadeliverydate" header = "date doc" width = "75" / >
    < name cfgridcolumn = "diadocsubject" header = "subject" width = "238" / >
    < / controls cfgrid >
    ...
    "Key: < cfinput type ="text"name ="readdiadocumentkey"id ="readdiadocumentkey"readonly ="True"label =" "key:" required not = "' bind =" {searchGrid.diadocumentkey} "style =" width: 70px "disabled ="true"/ >
    ...
    < component cfinvoke = ' MwsComponents/DocumentImaging/diaDAO' = method "readdiadocumentdetail" returnvariable = "rstDetailRecord" >
    <!--> only it works
    < name cfinvokeargument = "intdiadocumentkey" value = "193" >
    < name cfinvokeargument = "strsearchdb" value = "DocumentImaging" / >
    <!-all these failed->
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "" #searchGrid.selectedItem.diadocumentkey # "/ >-->"
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "" #frmSearchGrid.searchGrid.selectedItem.diadocumentkey # "/ >-->"
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "" #frmSearchGrid.readdiadocumentkey # "/ >-->"
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "#ColdFusion.getElementValue ('searchGrid', 'frmSearchGrid', 'diadocumentkey')" # "/ >-->"
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "{frmSearchGrid:readdiadocumentkey}" / >-->
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "{diadocumentkey}" / >-->
    <!-< name cfinvokeargument = bind = "{searchGrid.diadocumentkey"intdiadocumentkey"}" > - >
    <!-< name cfinvokeargument = value = "{searchGrid.diadocumentkey"intdiadocumentkey"}" > - >
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "searchGrid.diadocumentkey" > - >
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "#searchGrid.diadocumentkey #" >-->
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "#readdiadocumentkey #" >-->
    <!-< cfinvokeargument name = "intdiadocumentkey" value = "#frmSearchGrid.readdiadocumentkey #" >-->
    < / cfinvoke >
    Doc. "sequence: cfinput type ="text"name ="editdiaseq"readonly ="True"disabled ="true"label =" "sequence of documents:" required not = "" value = "#rstDetailRecord.diaseq #" style = "width: 30px" / >
    < / cfform >

    You need to do some research on the cfgrid controls

    The next attribute (pagesize = "" #intShowRows # "") means that only that the number of records returned.
    The number of columns does not really affect the performance.

    Quote:
    as there should be a way to transmit the selected grid item id to bring detail data just for the record chosen without clicking another button for details

    There see the following code excerpt, but in your case, there no need you for this

    <>
    name = "dsMessage".
    Type = "xml".
    bind = "SWC:GridDataMessages.getMessageDetails(MessageID={messageform:messagegrid.ID})"
    XPath = "messages/message.
    Options = "{method: 'POST'} '"
    onBindError = 'errorHandler' >

    Ken

  • &lt; netui-data: pager &gt; action to extract lines dynamically

    Hello

    How can I configure a pager of DataGrid to dynamically extract lines when a user through the paging swap pages?
    I know that I can read all my lines to a collection / array before the rendering of the datagrid control and set the pager to iterate on it like this:

    [Controller]

    Private list < Ride > wrinkles;

    public list < Ride > getRides() {}
    return of the rides;
    }

    [Action]
    wrinkles = rideDBControl.getAllRides (); huge amount of data
    ...
    back to the front;
    }

    [JSP]

    "< div style =" "border-width: 2px;" > < netui-data: dataGrid name = "currentRidesGrid" dataSource = "pageFlow.rides" >
    < netui-data: configurePager pagerFormat = "prevNext" pageSize = "${pageSize}" / >
    < netui-data: header >
    < netui-data: headerCell headerText = "Name" / >
    < netui-data: headerCell headerText = "Description" / >
    < / netui-data: header >
    < netui-data lines: >
    < netui-data: spanCell value = "${container.item.name}" style = "background-color: #f0f0f0; do-size: 14pt; ">
    < / netui-data: spanCell >
    < netui-data: spanCell value = "${container.item.description}" >
    < / netui-data: spanCell >
    < / netui-data lines: >
    < / netui-data: dataGrid > < / div >

    But how can I make the pager call a method to update the content of the collection "wrinkles" according to the current selected page and the size of the page? And how do I get the current page and the size of the page inside this method?
    I want to be paginated queries that may return a huge amount of data (1 m + lines), so extract all lines at once is impossible. What I want to do, is spreading the current page and the page size of pager to a method that will update the current collection according to a query such as:

    Select X, Y, Z
    Table
    Where the...
    And ROWNUM BETWEEN page * pageSize AND (page + 1) * pageSize

    Can someone help a noob?

    For more information, I found the answer by myself.

    To retrieve the rows dynamically, you must change the tag , and include the attributes a pageAction and partialDataSet, for example:

    Within the action of pagination, you can get the current size of the line and page of a PagerModel object. You can then update the data source (don't forget to call the setDataSetSize providing the length of the entire data so that the pager shows the right amount of pages), for example:

    @Jpf.Action (forward = {@Jpf.Forward (name = "success", access = Jpf.NavigateTo.currentPage)})
    {public pagination() before
    DataGridStateFactory dataGridStateFactory = DataGridStateFactory
    .getInstance (getRequest ());
    Gets the pagerModel for the grid object
    PagerModel pagerModel = dataGridStateFactory.getDataGridState)
    "currentRidesGrid") .getPagerModel ();
    => Code to get the size of any data source<>
    pagerModel.setDataSetSize (dataSourceSize);
              
    Get the first line and the model page size
    int firstRow = pagerModel.getRow ();
    int pageSize = pagerModel.getPageSize ();
              
    => Code to extract the rows to display<>
    wrinkles = pageRides;
              
    Forward, forward = new Forward ("success");
    back to the front;
    }

    I hope this helps.

    See you soon

  • Dynamically generate instructions INDEX

    Hello

    I have a requirement for serving data 3 million lines by table for 4 tables. I intend to drop the index before you delete the data in each table and recreate them after the purge.

    I want to dynamically do this IE get the 'create' a few views of the dictionary index statement and then save the DDL in a file. Then, drag the index. Delete data. Run the above mentioned create index DDL.

    Please let me know if it works and if yes, how can I get the create index statement?

    Thank you
    PSES

    SAFRAN wrote:

    Now number one after another :-)...

    Create a script file and add

    THE VALUE 100000 LONG
    SET FEEDBACK OFF
    SET PAGESIZE 0
    SET TRIMSPOOL ON
    TERMOUT OFF SET
    SET LINESIZE 10000
    COIL spoolfile
    select statements
    SPOOL OFF
    OUTPUT

    SY.

    Published by: Solomon Yakobson, January 27, 2010 12:19

  • bind the cfgrid controls to an another cfgrid

    I have a cfgrid;

    < cfgrid name = "CompQry" format = "html" pagesize = "10" striperows = "Yes" height = "320" width = "580" font = "Verdana, Arial, Helvetica, sans" fontsize = "12" align = "left" bind="cfc:/components/tsiadmin.getCompanies ({cfgridpage}, {cfgridpagesize}, {cfgridsortcolu minutes}, {cfgridsortdirection}, cname # #)" selectmode = selectonload 'row' = "true" > "
    < name cfgridcolumn = "CompanyRecordNumber" header = "Number of Comp" select = "yes" >
    < cfgridcolumn name = 'Name' header 'Name' = >
    < name cfgridcolumn = 'City' header 'City' = >
    < name cfgridcolumn = 'State' header 'State' = >
    < / controls cfgrid >


    And I need to link the selected line to another grid;

    < cfgrid name = "IndivQry" format = "html" pagesize = "10" striperows = "Yes" height = "320" width = "580" do = "Verdana, Arial, Helvetica, sans-serif" fontsize = "12" align = "left" bind = "" selectmode = selectonload 'row' = "true" > "
    < name cfgridcolumn = "IndividualRecordNumber" header = "Number of single" select = "yes" >
    < name cfgridcolumn = "First name" header = "First name" >
    < cfgridcolumn name = "LastName" header = "Last Name" >

    < / controls cfgrid


    The first grid is a list of the companies and the grid secord is supposed to be a list of all the selected company. I see that I have a piece of code is missing. I don't see how I can bind to a cfc on the second grid which will be returen a query based on the selected line in the first grid.

    larksys wrote:
    > I don't see how I can bind to a cfc on the second grid which will be
    > returen a query based on the selected line in the first grid.
    >
    >
    >

    see if this helps:
    http://www.coldfusionjedi.com/index.cfm/2007/8/9/reacting-to-grid-row-selection

    --

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com

  • CFGRID: Attach an Add button

    I am running Coldfusion 8 and tried to use cfgrid controls to write a manipulator of the database. The problem that I am facing is that I use:

    Insert = 'yes '.
    insertButton = 'Add '.

    But when I run the code does not display the 'Add' button and I can't perform an insert into the database. Everything I saw online says it should work, but I am at a loss to why it is not. Any suggestion would be great!

    Here is an example of work for you.
    Note that I have a js variable called pageSize. I use a self-titled cfparam to hold a value for it and use it in the js and the controls cfgrid.

    Ken

    Note:
    If you really want the 'Add' button to insert directly in the grid, do a google search on ext grid insert or visit the web site of ext and look at the examples. There is one in there.

  • Dynamic cfgridcolumn name?

    Hello

    I have a query that will return different columns according to the entry. I'm trying to get the dynamic name of cfgridcolumn. For example, in code below column name ABC has been hard-coded.

    < bindonload cfgrid = "yes" bind = "cfc:xyz.entityList ({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdire ction})" >
    < name cfgridcolumn = 'ABC' header = 'ABC' / >
    < / controls cfgrid >

    Is there a way were, we can cite the columnname as a variable? Something similor to:

    < bindonload cfgrid = "yes" bind = "cfc:xyz.entityList ({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdire ction})" >
    < cfloop list = "" #entityList.ColumnList # "index 'index' = >"
    < name cfgridcolumn = 'ABC' header = 'ABC' / >
    < / cfloop >
    < / controls cfgrid >

    Any help would be greatly appeciated.

    Thank you very much

    Convert a table like, your columnlist

    Then you can assign it to a gridcolumn as,



    HTH

  • Dynamic display of columns in the pivot query

    I have a table called STUDENT_SCORE. I need to display the avarage score/month for 2 years and the monthly score until today "month.

    Then assume that it is April 2009. The report will look like

    Roll_id 2007avg 2008avg Jan09-Mar09 Feb 09
    101 80.9 70.9 89.7 90.9 56.8
    102 70.9 23.9 87.2 90.0 76.8


    I tried a bit, but can't fix the monthly score display dynamically.


    DDL/DML is as below


    create the table STUDENT_SCORE
    (number of roll_id,
    date of mth_id,
    The partition number);


    insert into STUDENT_SCORE values
    (101, to_date (January 1, 2006 ', ' dd/mm/yyyy'), 67.5);
    insert into STUDENT_SCORE values
    (101, to_date (February 1, 2006 ', ' dd/mm/yyyy'), 77.5);
    insert into STUDENT_SCORE values
    (101, to_date (March 1, 2006 ', ' dd/mm/yyyy'), 87.5).
    insert into STUDENT_SCORE values
    (101, to_date (April 1, 2006 ', ' dd/mm/yyyy'), 27.5);
    insert into STUDENT_SCORE values
    (101, to_date (May 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (June 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (July 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (August 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (September 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (October 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (November 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (December 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (January 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (February 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (March 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (April 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (May 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (June 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (July 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (August 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (September 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (October 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (November 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (December 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (1 January 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (February 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (March 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (April 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (May 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (June 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (July 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (August 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (September 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (October 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (November 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (December 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (101, to_date (January 1, 2009 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (January 1, 2006 ', ' dd/mm/yyyy'), 67.5);
    insert into STUDENT_SCORE values
    (102, to_date (February 1, 2006 ', ' dd/mm/yyyy'), 77.5);
    insert into STUDENT_SCORE values
    (102, to_date (March 1, 2006 ', ' dd/mm/yyyy'), 87.5).
    insert into STUDENT_SCORE values
    (102, to_date (April 1, 2006 ', ' dd/mm/yyyy'), 27.5);
    insert into STUDENT_SCORE values
    (102, to_date (May 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (June 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (July 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (August 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (September 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (October 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (November 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (December 1, 2006 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (January 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (February 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (March 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (April 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (May 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (June 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (July 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (August 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (September 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (October 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (November 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (December 1, 2007 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (1 January 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (February 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (March 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (April 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (May 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (June 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (July 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (August 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (September 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (October 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (November 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (December 1, 2008 ', ' dd/mm/yyyy'), 57.5);
    insert into STUDENT_SCORE values
    (102, to_date (January 1, 2009 ', ' dd/mm/yyyy'), 57.5);

    Hello

    The script below produces what you want (as far as I can tell, without your desired results).

    Student_score_smry subquery Gets the year and monthly averages of student_score.
    It is completely static: it always produces 11 monthly columns (from January to November) and the names of columns hardcoded (m01 through m11).
    For dynamic column names you need, I used SQL * COLUMN more orders.
    To get the variable number of monthly columns you need, SELECT from the main query clause uses a script under (dynamic_month.sql) to only show the correct number (which can be 0).

    The student_score_wk_smry of subquery retrieves the weekly averages of the student_score_wk.
    He, too, is completely static: it always produces 6 weekly columns with names hardcoded (w1 through w6).

    There are four preliminary motions, that write two scripts under:
    Prelimiary C1, C2 and C3 queries write orders of COLUMN for annual, monthly and weekly columns in dynamic_columns.sql
    Preliminary motion M written between 0 and 11 items in SELECT-clause in sub-script dynamic_month.sql

    The main script is:

    SET     FEEDBACK     OFF
    SET     LINESIZE     200
    SET     PAGESIZE     0
    SET     VERIFY          OFF
    
    SPOOL     dynamic_column.sql
    
    -- Preliminary query C1: Columns for last 2 years
    SELECT     'COLUMN     y'
         ||     LEVEL
         ||     '     HEADING     "'
         ||     TO_CHAR     ( ADD_MONTHS     ( &target_month
                             , 12 * (-3 + LEVEL)
                             )
                   , 'YYYY'
                   )
         ||     'avg"'
    FROM     dual
    CONNECT BY     LEVEL <= 2
    ;
    
    -- Preliminary query C2: 11 prior months in this year
    SELECT     'COLUMN     m'
         ||     TO_CHAR     (LEVEL, 'fm00')
         ||     '     HEADING     "'
         ||     TO_CHAR     ( ADD_MONTHS     ( TRUNC (&target_month, 'YYYY')
                             , LEVEL - 1
                             )
                   , 'MonYY'
                   )
         ||     '"'
    FROM     dual
    CONNECT BY     LEVEL <= 11
    ;
    
    -- Preliminary query C3: 6 weeks before target_month
    WITH     got_w_num     AS
    (
         SELECT     SUBSTR (week_desc, 1, 6)     AS mon_dd
         ,     ROW_NUMBER () OVER
                   (     ORDER BY     week_id     DESC
                   )     AS w_num
         FROM     week
         WHERE     TO_DATE (week_desc, 'Mon DD, YYYY')     < &target_month
    )
    SELECT     'COLUMN     w'
         ||     TO_CHAR (7 - w_num)
         ||     '     HEADING     "Week of '
         ||     mon_dd
         ||     '"'
    FROM     got_w_num
    WHERE     w_num     <= 6
    ORDER BY     w_num     DESC
    ;
    
    SPOOL     OFF
    
    -- Preliminary Query M: 0-11 months (in SELECT clause)
    SPOOL     dynamic_month.sql
    
    SELECT     ',     m'
         ||     TO_CHAR (LEVEL, 'fm00')
    FROM     dual
    WHERE     MONTHS_BETWEEN (&target_month, TRUNC (&target_month, 'YYYY')) >= 1
    CONNECT BY     LEVEL <= MONTHS_BETWEEN (&target_month, TRUNC (&target_month, 'YYYY'))
    ;
    
    SPOOL     OFF
    
    -- Restore SQL*Plus features suppressed earlier
    SET     FEEDBACK     ON
    SET     LINESIZE     80
    SET     PAGESIZE     50
    
    -- COLUMN Commands
    @dynamic_column.sql
    
    -- Main Query
    WITH     student_score_smry     AS
    (
         SELECT     roll_id
         ,     AVG (CASE WHEN TRUNC (mth_id, 'YYYY') = TRUNC (ADD_MONTHS (&target_month, -24), 'YYYY')     THEN score END)     AS y1
         ,     AVG (CASE WHEN TRUNC (mth_id, 'YYYY') = TRUNC (ADD_MONTHS (&target_month, -12), 'YYYY')     THEN score END)     AS y2
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') =             TRUNC (&target_month, 'YYYY')      THEN score END)     AS m01
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  1) THEN score END)     AS m02
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  2) THEN score END)     AS m03
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  3) THEN score END)     AS m04
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  4) THEN score END)     AS m05
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  5) THEN score END)     AS m06
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  6) THEN score END)     AS m07
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  7) THEN score END)     AS m08
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  8) THEN score END)     AS m09
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'),  9) THEN score END)     AS m10
         ,     AVG (CASE WHEN TRUNC (mth_id, 'MM') = ADD_MONTHS (TRUNC (&target_month, 'YYYY'), 10) THEN score END)     AS m11
         FROM     student_score
         GROUP BY     roll_id
    )
    ,     got_w_num     AS
    (
         SELECT     week_id
         ,     ROW_NUMBER () OVER
                   (     ORDER BY     week_id     DESC
                   )     AS w_num
         FROM     week
         WHERE     TO_DATE (week_desc, 'Mon DD, YYYY')     < &target_month
    )
    ,     student_score_wk_smry     AS
    (
         SELECT     roll_id
         ,     AVG (CASE WHEN W_NUM = 6 THEN score END)     AS w1
         ,     AVG (CASE WHEN W_NUM = 5 THEN score END)     AS w2
         ,     AVG (CASE WHEN W_NUM = 4 THEN score END)     AS w3
         ,     AVG (CASE WHEN W_NUM = 3 THEN score END)     AS w4
         ,     AVG (CASE WHEN W_NUM = 2 THEN score END)     AS w5
         ,     AVG (CASE WHEN W_NUM = 1 THEN score END)     AS w6
         FROM     student_score_wk     s
         JOIN     got_w_num          w     ON     s.wk_id     = w.week_id
         WHERE     w_num     <= 6
         GROUP BY     roll_id
    )
    SELECT     NVL (ss.roll_id, ssw.roll_id)     AS roll_id
    ,     y1, y2
    @dynamic_month.sql
    ,     w1, w2, w3, w4, w5, w6
    FROM          student_score_smry     ss
    FULL OUTER JOIN     student_score_wk_smry     ssw     ON     ss.roll_id     = ssw.roll_id
    ORDER BY     roll_id
    ;
    

    Sub-script dynamic_column.sql might look like this:

    COLUMN     y1     HEADING     "2007avg"
    COLUMN     y2     HEADING     "2008avg"
    COLUMN     m01     HEADING     "Jan09"
    COLUMN     m02     HEADING     "Feb09"
    COLUMN     m03     HEADING     "Mar09"
    COLUMN     m04     HEADING     "Apr09"
    COLUMN     m05     HEADING     "May09"
    COLUMN     m06     HEADING     "Jun09"
    COLUMN     m07     HEADING     "Jul09"
    COLUMN     m08     HEADING     "Aug09"
    COLUMN     m09     HEADING     "Sep09"
    COLUMN     m10     HEADING     "Oct09"
    COLUMN     m11     HEADING     "Nov09"
    COLUMN     w1     HEADING     "Week of Dec 21"
    COLUMN     w2     HEADING     "Week of Dec 28"
    COLUMN     w3     HEADING     "Week of Jan 04"
    COLUMN     w4     HEADING     "Week of Jan 11"
    COLUMN     w5     HEADING     "Week of Jan 18"
    COLUMN     w6     HEADING     "Week of Jan 25"
    

    Other sub-script, dynamic_month.sql, might look like this:

    ,     m01
    ,     m02
    ,     m03
    
  • error AVCFPlayerSetclientEnforcedExternalProjectionMethod is not found in the AVFoundationCF.dll dynamic link library

    I tried to update my iTunes this weekend.  Now, I can't open it I get this error: AVCFPlayerSetclientEnforcedExternalProjectionMethod is not found in the AVFoundationCF.dll dynamic link library is on a Windows 7 computer.  I tried to re - install outside of iTunes and repair.  But no luck.  Should I uninstall iTune and then re-install?  Help.

    These errors can usually be fixed by removing the offending dll, then fix the component it is programs and features Control Panel. AVFoundationCF.dll belongs to Apple Application Support and are normally in

    • C:\Program Files\Fichiers Files\Apple\Apple Application Support or
    • C:\Program Files (x 86) \Common Files\Apple\Apple Application Support

    where the name of the Program Files folder may vary depending on the region.

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach. Review other cases and a list of documents to support further down the page, in which case one of them applies.

    More information area has direct links with the current and recent if you have problems to download, must revert to a previous version or want to try the version of iTunes for Windows (64-bit-for old video cards) as a workaround for the problems of performance or compatibility with third-party software.

    Your library must be affected by these measures, but it is also related to backup and recovery advice if necessary.

    TT2

  • Bootcamp converted to dynamic disk, now no windows without OS Macbook!

    Hello

    I converted accidentally Bootcamp (Windows 7 64 bit) the dynamic disk while I was inside Windows.

    Now, after the start of the only option I get is 'Windows', but 'Macbook' and 'Value' disappeared!

    When I choose Windows, it won't start. Windows Recovery stands up and says can not solve the problem.

    That's happened? What should I do now?

    I'm finished * off

    Thank you

    I forgot to add that no combination of keys doesn't work.

Maybe you are looking for