Different pages output

for example:
<?php
create table testtable (
company varchar2(6),
order_number number(4),
item_id number(4),
quantity number(8),
item_desc varchar2(16)
insert into testtable values ('A',1001,1,10,'apple');
insert into testtable values ('A',1001,2,20,'banana');
insert into testtable values ('A',1002,2,50,'banana');
insert into testtable values ('B',1002,1,30,'apple');
insert into testtable values ('B',1003,3,60,'orange');
insert into testtable values ('B',1004,3,50,'orange');
commit;
Table Test DATA
company order_number item_id quantity item_desc
A 1001 1 10 apple
A 1001 2 20 banana
A 1002 2 50 banana
B 1002 1 30 apple
B 1003 3 60 orange
B 1004 3 50 orange
$con = oci_connect("apps","apps","prod") or die("Unable to connect oracledatabase");
$sql = "select * from testtable";
$result = oci_parse($con,$sql);
oci_execute($result);
echo "<table border = 1>";
echo "<td>COMPANY</td>";
echo "<td>ORDER_NUMBER</td>";
echo "<td>ITEM_ID</td>";
echo "<td>QUANTITY</td>";
echo "<td>ITEM_DESC</td>";
$totalcomany = 0;
while ($rows = oci_fetch_array($result,OCI_BOTH)) {
if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($result)) {
echo "<tr bgcolor='#CCFFCC'>";
echo "<td colspan= 3 align='center'>".$l_company."</td>";
echo "<td >".$totalcomany." </td>";
$totalcomany = 0;
echo "<td > </td>";
echo "</tr>";
$l_company = $rows['COMPANY'];
echo "<tr>";
echo "<td>".$rows['COMPANY']."</td>";
echo "<td>".$rows['ORDER_NUMBER']."</td>";
echo "<td>".$rows['ITEM_ID']."</td>";
echo "<td>".$rows['QUANTITY']."</td>";
echo "<td>".$rows['ITEM_DESC']."</td>";
$totalcomany = $totalcomany + $rows['QUANTITY'];
echo "</tr>";
echo "</table>";
?>
how to make above example output in different pages ?
thanks!

Hi,
I cannot believe that.
If you really want to get good answers, you should:
1. Do not ask the same questions in different threads.
2. Omit those nasty answers with only "thanks a lot" as content.
3. Avoid double postings.
4. Do not expect ready solution.
5. Do expect hints to work with, while working on an own solution and learn.
6. Do not expect that everyone is reading your postings around the clock.
Remember that it is really hard to follow a discussion, if it is fragmented into many threads, instead of having only one clear discussion thread.
Greetings from Hamburg
Thorsten Körner

Similar Messages

  • Redirect user to a different Page based on number of  Liquid output result

    I want to redirect the user to a different page based on the number of results. I have some multi-account users and single account user in my secure zone. I want single account users to be sent to a different page, while multiple account user should be shown their accounts and they user can now click the account he/she wants to access. This is my code:
    {module_data resource="customers" fields="company, email1"  where="\{'company':\{'$contains':'{{this.globals.user.email}}'\}\}" skip="0" limit="500"  version="v3" collection="companyXtra" template=""}
    {module_webapps id="21927" filter="all" collection="companyAccess" template=""}
    {% for item in companyAccess.items -%}
    {% assign counter = {{forloop.length}} -%}
    {% if globals.user.email = item.email and counter = 1 -%}
    <script>
    window.location.replace("/single-account-user.html");
    </script>
    <a class="w-inline-block szone-navlinks multiplecoy" href="{{item.url}}">
        <div class="szone-holder">
          <div class="szone-narrate addenrolee">{{item.name}}</div>
        </div>
      </a>
    {% else %}
    <p><a href="{{item.url}}">{{item.name}}</a></p>
    {% endif %}
    {% endfor %}
    </div>
    Please what I'm doing wrongly. Can someone kindly assist. Thanks.

    Hi Liam I have since been reviewing my query using the BC API Discovery which has been a good guide for me. But the result is just displaying the core customer's company, though the other company has a default email/email1 as the core customer.
    This is my new query:
    {module_data resource="customers" version="v3" fields="company" skip="0" limit="10" where="\{'email1.value':\{'$contains':'{{globals.user.email}}'\}\}" order="id" collection="myData"}
    <pre>{{myData|json}}</pre>
    This is the json:
      "moduleName": "data",
      "moduleDescriptor": {
      "templatePath": null,
      "parameters": "resource=\"customers\",version=\"v3\",fields=\"company\",skip=\"0\",limit=\"10\",where=\ "\\{'email1.value':\\{'$contains':'[email protected]'\\}\\}\",order=\"id\",collection=\"myData\"",
      "apiEndpoint": "/api/v3/data",
      "objectType": "-1",
      "objectId": "-1",
      "adminUrl": ""
      "items": [
      "company": "The vivove company Limited"
      "totalItemsCount": 1,
      "skip": 0,
      "limit": 10,
      "params": {
      "resource": "customers",
      "version": "v3",
      "fields": "company",
      "skip": "0",
      "limit": "10",
      "where": "\{'email1.value':\{'$contains':'[email protected]'\}\}",
      "order": "id",
      "collection": "myData"
    I expected to see two companies. This is screenshot of my the companies in the CRM:
    Screenshot by Lightshot
    Screenshot by Lightshot
    Thanks. most appreciated.

  • How to create a report with different page sizes

    Hi,
    I would like to create a report with different page sizes, it's possible to do it with diadem?
    When I change the layout parameters, changes afect to all sheets...
    Is there a way to change page size individually for each sheet?
    Thanks in advance.
    Marc

    Hi Marc,
    You can use the DocStart and DocEnd commands along with the PicPrint command to spool multiple print commands to the same output PDF file using the direct printer approach.  This should enable you to programmatically specify the page size differently for each sheet that you add to the print job.
    ' Print PDF Page by Page.VBS
    OPTION EXPLICIT
    Dim i, Path, OldPrintName
    Path = AutoActPath & "2D Stacked"
    Call DataDelAll
    Call DataFileLoad(Path & ".TDM")
    PDFFileName = Path & " Page by Page.pdf"
    IF FileExist(PDFFileName) THEN Call FileDelete(PDFFileName)
    OldPrintName = PrintName
    PrintName = "winspool,DIAdem PDF Export,LPT1:" ' Set to PDF printer
    PDFResolution = "72 DPI" ' "2400 DPI" , "default"
    PDFOptimization = TRUE
    PDFFontsEmbedded = FALSE
    PDFJPGCompressed = "high"
    PrintOrient = "landscape" ' orient paper
    Call PrintMaxScale("GRAPH") ' auto-max, see alternative margin setting variables below
    PrintLeftMarg = 0.181
    PrintTopMarg = 0.181
    PrintWidth = 10.67
    'PrintHeigth = 7 (read-only)
    Call WndShow("REPORT")
    Call DocStart ' Begin multi-page document/print job
    FOR i = 1 TO 4
    Call PicLoad(Path & ".TDR")
    Call GraphSheetNGet(1)
    Call GraphSheetRename(GraphSheetName, "Page " & i)
    Call PicUpdate
    Call PicPrint("WinPrint") ' Add a page to be printed
    NEXT ' i
    Call DocEnd ' End multi-page document/print job
    PrintName = OldPrintName
    Call ExtProgram(PDFFileName)
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to use different page scapes in smartforms

    hi
    How to use different page scapes in smartforms.
    I want Potrait format in the 1st page and Lanscape format in 2nd page is it possible if so plz suggest me an idea

    Hi,
    It is possible in smart forms, but not in scripts.
    we can have 3 tabbed options for pages in smart forms.
    <b>General...
    Output options
    Conditions</b>.
    In <b>output options</b> u can define whether a page can portrait or land scape in <b>print attributes</b>.
    Reward if helpful.
    Regards,
    Sandhya

  • How to print different pages of sap script  from diff. trays of printer

    Hi All,
    I have the requirement in SAP script. How to print different pages from different trays in the printer.
    For example  page 1 logo and address has to print from tray-1,
                        page 2 main data print from tray-2,
                        page 3 footer data print from tray-3.
    will appreciate if u come up with solutions asap.
    Thanks in advance.

    Hi,
    May be the links given below might help you,
    SAPScript:Selecting Different Tray in SAPscript
    Print to different output tray in SAPscript/Print Workbench
    Regards,
    Hema.
    Reward points if it is useful.

  • Different layouts for different pages

    hi all,
    i have created a form in which there are 5 output pages but the print preview shows only the first page out of 5.i want to go to the next page.plz help how would i do that.and  i want different layouts for different pages.
    thnks n regards,
    mukesh.

    Hi Mukesh,
    Read these lines which has been given in help.sap.com and also go through the link given below.
    Main Window on Several Draft Pages :
    if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on the different pages, but the width must remain the same throughout.
    [Main Window|http://help.sap.com/saphelp_nw70/helpdata/en/b1/243fdabeee11d4b633006094192fe3/content.htm]
    Regards,
    Sravanthi

  • Different page orientation in SMARTFORMS

    Hi Experts,
    Is it possible to have different page orientation (portrait/landscape) for different pages in one smartforms? Thanks so much!
    Best Regards,
    randy

    Hi,
    Yes, it is.  Go to the output options of the page and select the portrait/landscape option.
    Regards,
    Nick

  • Displaying a group of data in different Pages

    Hello
    I will try to explain my Problem below briefly
    I have a problem with displaying a group of data in different Pages.I want to display a group of data like this:
    page1      page2
    data1Part1      data1Part2
    Page3     Page4
    data2Part1      data2Part2
    Page5     Page6
    data3Part1      data3Part2
    page 7     Page 8
    data4Part1      data4Part2
    What I get is :
    page1      page2
    data1Part1      data2Part1
    Page3     b]Page4
    data3Part1      data4Part1
    Page5     Page6
    data2Part2      data3Part2
    page 7     Page 8
    data4Part2      data4Part2
    I test <?for-each-group@section:ROW?> and Different first page etc. It doesn't work.I would appreciate your help. I can send you the output, template and xml doc, if you can have a look at it.
    Thanks

    Send me all files along with expected output at [email protected]

  • Different Page Header

    Hi,
    I am working in AR Invoice Report. The requirement is to print the invoice along with terms and condition, which is the last page. We don't require the logo and company information to appear on the terms and condition page. For this we have used page header in invoice page. But how can I remove the page header in the last page. Or can use a different page header in the last page.
    We tried <?start@last-page:body?><?end body?> and section break before that in the last page. But the problem is when the invoice information overflows, it appears in the terms and condition page. and the header information is lost for that. and a page break before <?start@last-page:body?><?end body?> raises an error.
    Any help will be apprciated.
    Satyajit

    Nice little guide to "different first page", vetsrini. Do you know if this is supported with RTF output? I have no problem getting a different header, when the output is in pdf, but when I try to output in RTF, the first header is repeated on the following pages. Is this not supported for RTF?

  • !Format event, Global fields & different pages

    Hi, very new to Output Designer and having a couple of head scratching moments with something I've been asked to do.
    I have a requirement to show or not show a barcode dependant on the initial chartacter of an order number. However, the order number and barcode are on different pages. I changed the order number on page 1 to be a global field, but when I go into the !Format event for the barcode field on page 10 it doesn't show up in the globals fields list.
    As a way of testing I put the following code in the format event of another field on page 10, the barcode field page.
    @(If ("@(Substr ("@ORDER_NUMBER.", 1, 1))" == "R", "R", "NOT R"))
    This wouldn't work as it interperates "@ORDER_NUMBER." as a literal string value of @ORDER_NUMBER. and not a global field.
    So, I suppose my question is - Is it possible for a field on one page of a form know what the value of a field on another page is?
    All the best
    Chris

    I believe that if a field is defined as global
    b in the data file
    then it should be able to be referenced on any page. It shouldn't matter what page actually
    b prints
    the field. Effectively, all the global items in the data file are loaded into a "dictionary" and are available for reference anywhere within the form. Unfortunately, the field list provided for the !format event only shows the fields on that page, not all the fields in the form.
    If @ORDER_NUMBER. (as a literal) is what the instruction operates against then the field "ORDER_NUMBER" doesn't exist in the data file. At least that is what some recent testing tells me.

  • ALV printing error - Footer on 3 different pages

    Hi all,
    I created an report which outputs an ALV grid (full screen) with a header and a footer. The ALV grid is created with class CL_SALV_TABLE (incl. methods set_top_of_list for the header, resp. set_end_of_list for the footer). This all works correctly and the print preview looks fine too.
    Problem is a very strange print output:
    In most cases, printing works fine. But sometimes the output is wrongly formatted: is the footer to be printed on two different pages (i.e. the footer is partly printed on the current page, the rest on the next page), the footer will be printed on three pages! The first part on the current page (correct), only one line at the bottom of the second page (wrong) and the rest of the footer on the third page (wrong)! Could it be that this is a print setting problem? Should I add special footer settings?
    I already checked SDN forums and looked at SAP Notes for solutions but could not found any tip on how to solve this.
    Does anyone of you had the same issue before? Or does anyone has an idea how this problem could be solved?
    Thanks a lot!!

    Need suggestions please.

  • How can i redirect to with one button to different pages!

    Hi All,
    For any application, for the first time,if a new table exists then there will no data in that table.
    based on this scenerio,in my application,i am handling apex validation staying that "you have no data. Please click here to go Reset symbol page.
    when it redirects to Reset symbol i am providing a text box and with a button. Once there enter a symbol and click on button it will inert in that table and again redirects to Home page for say-39.
    simillarly what are the functionality available in home page i had implemented same thing but only it differs page no for say-115.
    In both the scenerio's i will be redircting reset Symbol page where there can insert a symbol explained in above scenerio case.
    My problem is when i am throwing the error msg from page-39 i am redirecting to Reset symbol and when there enter symbol and click on button again i will be redirection t page -39 because the error had came from page-39.
    If the same error comes from page-115 then also i will redirecting to same Reset Symbol where there will be entering symbol and click on button, in this case it should redirect to page-115 instead of page-39 because i have got error from page-115 but not from page-39.
    How to handle the above scenerio, please help me out.
    Thanks in advance,
    Anoo.

    Hi Andy,
    Thanks for your suggestion, it is working fine..But i am facing one problem in page 115, i have two regions and both regiosn have same name but only difference is items names.. when i had tried to rediect to page-115 the umwanted one regions is showing instead of expected region. It is getting failed here bec it is rediecting to differnet region.
    Any suggestion on this!
    Thanks,
    Anoo..

  • Setting different pages widths in different sections - Pages 5.2

    In Pages 5.2, how does one set different page widths (margins) in different sections?

    You can't. Margins apply to the entire document.
    What you can do is set the margins to their max width and then use left and right indents for the sections you want narrower.
    Peter

  • Hi, I managed to publish my website on the server. The server recognize the different pages when I write the url, but when I use the a tag to surf to the next page it doesn't recognize the link.

    Here below you can find my coding > And I highlighted the links that refer to my different pages:
    <div id="Main_navMenu">
        <ul>
            <li><a href="/index.html">HOME</a></li>
            <li><a href="#">NIEUWS</a>
            <ul>
                <li><a href="/pages/nieuws.html">ACTUALITEIT </a></li>
                <li><a href="#">ACTIVITEITEN</a></li>
                <li><a href="#">ARCHIEF</a></li>
            </ul>
        </li>
        <li><a href="#">ADVIES</a>
            <ul>
                   <li><a href="/pages/contract.html">CONTRACT</a></li>
                    <li><a href="#">CHECKLIST</a></li>
                    <li><a href="#">UITKERING</a></li>
                    <li><a href="#">JURIDISCH</a></li>
            </ul>
        </li>
        <li><a href="#">WIE WE ZIJN</a>
            <ul>
                    <li><a href="#">BESTUURSLEDEN</a></li>
                    <li><a href="#">WAT WE DOEN</a></li>
                    <li><a href="#">ONZE LEDEN</a></li>
            </ul>
        </li>
        <li><a href="#">INFORMATIE</a>
            <ul>
                    <li><a href="#">STATUTEN</a></li>
                    <li><a href="#">FAQ</a></li>
                    <li><a href="#">LINKS</a></li>
            </ul>
        </li>
        <li><a href="#">LID WORDEN</a>
            <ul>
                <li><a href="#">INSCHRIJVEN</a></li>
                <li><a href="#">INLOGGEN</a></li>
            </ul>
        <li><a href="#">CONTACT</a></li>
        </ul>
    </div><!-- end navMenu -->

    Maddy dOliveira wrote:
    Hi,
    Thanks and yes, this is a test website.
    The link for news (nieuws) works now, but the link for Advies - contract gives this as result: http://www.maddydoliveira.com/DeActeursGilde/pages/pages/contract.html
    As you can see the link is looking for pages within pages.
    Is there a possibility to solve this issue? I've tried now for a small hour,.. and didn't manage to find a solution.
    Thanks in advance,
    Maddy
    If you just change the links to point to the 'pages' folder in the 'DeActeursGilde' folder instead of them pointing outside of the folder to the site server root which a / leading slash does that should solve your issue. With the leading slash the browser is looking for a folder named 'pages' outside of the 'DeActeursGilde' folder instead of looking for a 'pages' folder inside of it.
    <a href="pages/contract.html">CONTRACT</a>
    Contract
    I think when you create links in Dreamweaver you have an option to choose 'site root relative' links or 'document relative' links - well you always want document relative links.

  • Target Named Anchor in a Spry Collapsible Panel from a different page

    Let me start by saying I have combed this forum (and others) looking for a resolution to this.  I am familiar with David Powers solution on Foundationphp.com and am using that code in project to open the collapsible panel from a separate page and it works beautifullly.  The problem I have is that I want the browser to move down to a specific named anchor inside that opened collapsible panel when clicked from a different page.
    Snippets of my current code here.
    Below is the code that I have on an image that when clicked goes to the correct page and opens Panel1.  Works Perfectly!
    <a href="bamboo-species.php?col1=open#CollapsiblePanel1"><img src="images/Content/Photos/HomeScroll/blackTmbor.jpg" width="227" height="175" /></a>
    Below is the link to the .js file and the script in the head of the target page
    <script type="text/javascript" src="SpryAssets/SpryURLUtils.js"></script>
    <script type="text/javascript">
    // Grabs the values of the URL parameters for the current URL.
    var params = Spry.Utils.getLocationParamsAsObject();
    </script>
    Below is the code that I have on the target page for Panel1
    <script type="text/javascript">
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:params.col1 ? true : false},{duration: 1000});
    </script>
    If I have a named anchor say <a name="species1" id="species1"></a> down in the page, how do I target that named anchor from my link on the separate page.  I have tried adding the #species1 to the end of the link on the link page (see below) but with no luck. I believe those were the instructions on foundationphp.com site.
    <a href="bamboo-species.php?col1=open#CollapsiblePanel1#species1"><img  src="images/Content/Photos/HomeScroll/blackTmbor.jpg" width="227"  height="175" /></a>
    I hope (and suspect) that this is an easy fix, I just do not know what it is.  Any help or direction where to look is greatly appreciated.

    I once had the same issue can created a small function that allows me to "jump" to a element.
    function scrollTo( element ){
         var stylize = function( element){ return !+"\v1" ? element.currentStyle : document.defaultView.getComputedStyle( element , null ) },
              getPosition = function( element ){
                   // based on the SpryEffect's module:
                   var computedStyle, tryComputedStyle,
                        position = { x: 0, y: 0 };
                        if ( element.style.left  && /px/i.test(element.style.left) ){
                             position.x = parseInt(element.style.left, 10); // without padding
                        } else {
                             computedStyle = stylize( element );
                             var tryComputedStyle = computedStyle && computedStyle.left && /px/i.test( computedStyle.left );
                             if (tryComputedStyle)
                                  position.x = parseInt( computedStyle.left, 10 ); // without padding, includes css
                             if(!tryComputedStyle || position.x == 0) // otherwise we might run into problems on safari and opera (mac only)
                                  position.x = element.offsetLeft;   // includes padding
                        if ( element.style.top && /px/i.test(element.style.top) )
                             position.y = parseInt( element.style.top, 10); // without padding
                        else
                             if ( !computedStyle )
                                  computedStyle = stylize( element );
                        var tryComputedStyle = computedStyle && computedStyle.top && /px/i.test( computedStyle.top );
                             if ( tryComputedStyle )
                                  position.y = parseInt( computedStyle.top, 10 ); // without padding, includes css
                             if( !tryComputedStyle || position.y == 0 ) // otherwise we might run into problems on safari and opera (mac only)
                                  position.y = element.offsetTop;   // includes padding
                   return position;
              scroll( 0, getPosition( element ).y );
    So now we have a scrollTo function that accepts a pure HTML element as argument, all what is left to do is figure out if we have a hash, and if the anchor exits on the page.
    ( hopes this works, i wrote it without testing, but you get the general idea ):
    if( window.location.hash ){
         var hash = window.location.hash.substr(1), // remove the # from the hash
         element;
         // as anchors can also be used with id attributes, check that first,
         element = document.getElementById( hash );
         // maby we used name="" attribute
         if( !element && ( element = document.getElementsByName( hash )) ){
              element = element[0];
         // if we have a match:
         if( element ){
              // give the collapsible panel some time to init and update the DOM;
              setTimeout(function(){ scrollTo( element ) },0);
    \o/

Maybe you are looking for