Questions on printing in htmldb

I try to create an invoice page to print.
Some questions I ask to myself:
- Is it possible to print to an A4 (papersize)? (I mean, does the application have notions of pagesize or is everything controlled by the browser? this is important when you need to repeat some information on the second page)
- can I include "pagenumber of total pagenumbers"?
- Is it possible to repeat an header / footer?
In my opinion it is very hard to do this with htmldb...
I started my "print report" like this:
- created static html like I would like to have my report(in notepad)
- in htmldb I try to create "the same thing", first I tried with the creation of a report, but, because you 'll always have rows, I stopped with that (I need to say "that item needs to be placed there"). Than I created a form, afterwards I added some other forms (regions) to the same page. One region for every table. I still have problems to place my items like I wish, because of region overlapping. Should I create other items in an other region (and link them) if I want to show the content of an item of an other region in that region?
I try to replace an Access application, and it looks good so far, but replacing the reports is very difficult!?
Is it me?
Dimitri

I found the answer on most of my questions on this site:
http://www.w3.org/TR/REC-CSS2/page.html#propdef-size
In short: you can a lot with css! so for my htmldb application: I probably need to change (create a new) my "print" template
HTMLDB is a very nice product and in a way it can replace an Access application, but in my opinion we are limited by the html.
What I would like to have in htmldb (compared with access):
- submission of a region and not the whole page (like in access subforms)
- in the tabular form, automatic one (or more) empty line(s) to create a new record (in access you have a new empty record)
- an easier why to customize the templates/css, for the default ones you can't change everything... (in access you can "draw" your form/report, that's very easy, in htmldb it's more difficult)

Similar Messages

  • Question about printing by page count

    Hi
    I'm new to this and I have a question about printing our invoices by page count.
    We generate our invoice using Crystal 2008 we have invoices that can range from a single page to as many as 6 pages. I would like Crystal to preview/print the reports in order of how many pages are in the report. Example: print all single page invoices first then all invoices that are 2 pages and so on. Is this possible?
    Thank you in advance

    Hi Ido,
    Thanks for your input. This is more or less what Carl was suggesting yesterday and I gave it a lot of thinking. The problem here is that I cannot go with "good enough resolution" - I need perfect resolution.
    The reason for this apparently silly requirement (why would one sort a bunch of invoices by number of pages instead of Customer Number, as long as they end up in an envelope anyway?) is the proposed purchase of a folding/stuffing machine which could do very fast what now takes one person 4 days to achieve.
    One type of machine comes with three settings - fold/stuff 1, 2 or 3-page statements. You need to have three stacks with all the statements that have 1, 2 and 3 pages. The ones with more pages will have to be folded manually, but there are only about two dozen clients that give us that much business. You feed the machine one stack at a time and set it to process the respective number of pages. Any statement that falls accidentally in the other stack will either cause the whole rest of the stack to be mixed up, which is very bad, or cause one customer to receive his invoice and someone else's, which is just embarrassing. I cannot afford any of these scenarios.
    Given that the statement contains variable-length (and depth) messages that vary by month and by profit center, and it could also contain one or more groups of details, each with its own header, it is very risky to try to come up with magic numbers attempting to estimate the number of pages based on the number of detail lines. Someone will still have to eyeball very carefully the initial stack of statements in the areas where the number of pages increases by one and make sure that ordering by number of detail lines did not mix, for example, one report with two pages among two reports with one page. Of course, this increased scrutiny will be necessary only around the areas where the page number transitions from 1->2, 2->3 and 3->4, which is much better than trying to order by number of pages all 1500 statements, but still depends on one's manual intervention and focus and, as a result, makes me pretty uncomfortable.
    I have taken a look at the "Group Sort Expert". If you select the "All" option (all groups) and you had some kind of summary value then you could sort the report by that value. The idea was to create a hidden Average field over the TotalPageCount runtime variable (which will always equal the TotalPageCount for that customer, since it's the same for all the pages in that group) and use that summary field in the "Group Sort Expert", which would have solved the problem elegantly. Unfortunately, there is no way to create a summary field over a runtime variable. I even created a formula that just returns the TotalPageCount, but that formula did not show up in the list of fields available for summarization (while other formulas did).
    It looks like the reporting engine does not allow this type of "late-sorting". I wonder if it is possible at all, because in effect this would require the engine to execute an additional pass: first it should somehow generate the whole report grouped by Customer Number so it knows how many pages are in each group, then it should sort by the number of pages and only after that it could render the report. I'm not sure the engine can do this additional pass.
    I would be very curious to hear about the other (more complex) ideas you mentioned. For example, I have seen (in Crystal 2008) a checkbox allowing "sorting by a formula". I don't know how to write a formula used in sorting, but the basic question in the paragraph above still stands: does the engine even support such a feature?
    Thanks again.

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Questions About Printing in Java

    Alright, I've been looking at the Java printing API. I like it, it's nice. I've got a drag-and-drop workspace that the user wants to print, so I just use m_workspace.paint(Graphics) on the print Graphics object to paint the workspace onto the page. Very nice.
    Here's the issue. I want to fit as many workspaces on a page as is possible. Now, with a Graphics2D object, I can call a couple of methods to get its height and width. I need to be able to determine the height and width of the Graphics object that the printer hands me. Here are the questions as best as I can describe them:
    * Is it possible to find the height and width of a Graphics object? How else can you determine a Graphics object's coordinate range?
    * When the Printable interface is given a Graphics object on which to print, does the Graphcis object represent the whole page or just the printable area of the page?
    * The PageFormat class provides methods for determining the height and width as well as the printable height and width of a page in 72nds of an inch. How does one determine the intended printing resolution (dpi) of the print job? If this cannot be done, how is it possible to determine the size of the page in pixels?
    I'd really appreciate help with this as fast as it can be mustered. This program needs to be completed by Friday morning and I'm clueless as to the Java printing interface.
    Thanks for any time you've spent reading this and the time you may spend answering it. :) Best wishes!

    After perusing the many books of one of my coworkers, I think I have good reason to believe the following:
    * Printing with the Printable interface is always at a resolution of 72dpi (1 pixel per point).
    * The Graphics object passed to print(...) represents a pixel space equal to the number of points of each dimension of the imageable area of the page.
    Can anyone with experience with Java printing confirm these conclusions?

  • Few Questions 'bout Printing in Lab Color

    I'm a little confused about how LAB color works. I have a document thats currently in CYMK color mode, and I'm having difficulty finding satisfactory colors. I was advised elsewhere to abandon CYMK. I therefore want to convert my image into to LAB color mode. I've read that converting from one color mode to another can cause layers to look funny, however I need to retain some of my layers... Do you guys typically have problems with this? In retrospect I should have STARTED in Lab... Seems that converting from CYMK to LAB wouldn't be as problematic as converting from LAB to CYMK...
    The key question is this: will my printer (Epson R800) even be able to print in LAB mode? I thought yes, or at least closely... because it has much more than CYMK to work with... it has these cartridges:
    #1 Blue UltraChrome Hi-Gloss Ink Cartridge T054920
    #2 Cyan UltraChrome Hi-Gloss Ink Cartridge T054220
    #3 Gloss Optimizer UltraChrome Hi-Gloss Cartridge T054020
    #4 Magenta UltraChrome Hi-Gloss Ink Cartridge T054320
    #5 Matte Black UltraChrome Hi-Gloss Ink Cartridge T054820
    #6 Photo Black UltraChrome Hi-Gloss Ink Cartridge T054120
    #7 Red UltraChrome Hi-Gloss Ink Cartridge T054720
    #8 Yellow UltraChrome Hi-Gloss Ink Cartridge
    Finally, in the print screen menu should I be
    "letting photoshop manage colors" or letting "printer manage colors"? Do you guys have any other tips on how to tweak printer/photoshop settings/preferences to maximize the accuracy of my colors? Would I possibly be better off just using RGB?
    I know my questions are conveyed in a slightly confusing manner, so thank you for your patience reading through them. I really appreciate any insight you guys can give me.
    Thanks,
    Rich

    You can't actually print in Lab mode, although it can be great for certain corrective moves. You have to print in either RGB or CMYK. If you are using the Epson driver for your printer, the print is seen as if it were an RGB device, even though it uses CcMmY and black inks.
    To get better color accuracy, you need both a hardware calibrated monitor - so you know that what you see is accurate - and good custom printer profiles, so that the colors are properly converted to the color space of the printer. There is a lot of information both in these Adobe forums and on the web in general about color management and the proper use of profiles, and how to go about it.

  • More questions on printing from internet

    While I was waiting for an answer to my original question (why my printer won't print from the internet) I found the following two preconditions:
    -  Requires an Internet connection to the printer
    - Requires HP Web Services Account Registration
    So now I also need to know if I have the above qualifications. How do I find this information?
    I shall continue to pursue the ansswers but I appreciate any help.
    Thanks!
    SALLYANNC

    Hi SALLYANNC,
    Just to clarify, you are able to print from the computer but not from the internet?
    I would try printing from another browser to see if you have the same results.
    Try a different browser.
    If you are using Google Chrome as a web browser, please do the following steps:
    Run the updates for Chrome, to make sure you have the latest version.
    Then open the Chrome's browser, go to settings, tools, clear browsing data, clear the cache and site date if listed.
    Close and reopen the browser again.
    Try printing again.
    If you are still having issues, try The Ctrl+Shift+P to see if it will print.
    Update the Java on the computer.
    Go to start, control panel, Java, click on the Update tab and select Update Now.
    I suggest that you to try these steps to resolve this issue if you are using Internet Explorer.
    Method 1: Look at the Security settings for Internet Explorer.
    1. Open the Internet Explorer. Click on Tools.
    2. Click on Internet Options->Under the Security Tab->Security Level Zone->Click on Default Level->Drag the Scroll button and set the Security as Medium level.
    Method 2: You can also add the sites from which you are trying to print to the Trusted Zone which will restore the functionality of these sites.
    1. Open Internet Explorer and go to Tools-Internet Options-Security.
    2. Click the "Security" tab and choose the "Trusted Sites" icon.
    3. Then click on the button "Sites". A window will open, where you can add any sites that you wish to be in the Trusted zone.
    4. Enter the site of interest in the line provided. Site URLs can be typed in directly or entered by copying and pasting. After entering a site click the "Add" button.
    5. The site is now added to the list of trusted sites.
    6. Enter the next site and repeat the procedure.
    Method 3: Also check the following settings:
    1. Open Internet Explorer.
    2. Click Tools, and then click Internet Options.
    3. Click the Advanced tab.
    4. Under Browsing check the option “Enable third party Browser Extensions”.
    If you are using Firefox, then take a look at this document. Fix printing problems in Firefox.
    What web browser are you using? (Chrome, Firefox, Safari, Internet Explorer)
    Are you printing a email or a webpage?
    Let me know how you make out.
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How to print from HTMLDB Report

    Hello
    How to print a report developped in HTMLDB report page ?

    Hello Patrick
    Thank you for the suggestion.
    Is there any idea to tailore the MSExcel pattern so
    that it does not permit final user to change the
    report content.Have you looked into using FOP to create PDFs?
    Here are a couple URLs:
    tech note
    http://www.oracle.com/technology/pub/notes/technote_htmldb_fop.html
    installation thread
    FOP installation
    Earl

  • Question about printing and resolution

    Hello
    I am trying out a trial version of PE13 and am attempting to come to terms with printing and resolution.
    I have also read this informative tutorial here:
    How Image Resolution Affects Print Quality - Photoshop Tutorial
    This is the image I would like to print:
    In the tutorial referred to above, the author states that when printing, 300 resolution is best and not the 79.3 px/inch that I have. When I change that 79.3 to 300, the image of Marilyn becomes tiny, so my question is how can I have an image that would neatly fit onto A4 photo paper maybe with a 1" white border around it (meaning the image size would be 8" x 6") while retaining a 300 resolution?
    Am I going about this the right way, aren't I?
    Many thanks.
    Steve

    Steve,
    The most important thing about resolution is the dimension in pixels.
    Your original is 433 x  653 pixels. Just good enough to display on a normal laptop.
    With A4 format at 300 ppi, you'd need:
    21 / 2.54 * 300 = 2480 pixels wide
    29.7 / 2.54 * 300 = 3507 pixel high.
    Any image editor won't be able to add the missing resolution, but the solution is to let the editor guess the missing pixels by interpolation methods.
    You won't get more details than those present in the original file, but you'll get a smoother, non 'pixelated' image.
    In the Elements editor, you have to check the 'resample' checkbox to be able to keep the outpur size while increasing the ppi to 300.

  • Question about printing in lightroom

    I have a new canon ip 6700d printer and was wondering if when I print from a raw photo in lightroom am I printing in the pro photo rgb color space? Bob

    >I let lightroom manage my printing and my question was..Does lightroom print my raw photo in pro photo rgb color space or another color space?????? Bob
    No. It only sends prophotoRGB to the driver when you select "managed by printer" The printer driver should then translate to its own icc profile. If you set draft mode printing, Lightroom sends adobeRGB data. But most importantly, if you let Lightroom manage color by selecting a profile, it sends data in the printing profile. The latter is the preferred method for the best output, but some printer drivers on some OS/printer combinations choke on that, so be aware.

  • Really quick question about printing a book

    hello,
    always asking questions... but you people on these forums are super nice and smart....
    if i should upload the pictures to iphoto to print a book should i export the pictures as AdobeRGB 1998 or ProPhotoRGB .jpegs????
    the website only says jpegs..... what would my best choice be.....????
    answers are appreciated and thank you in advance

    Yes - do not use Adobe RGB - sRGB is correct
    and test a few photos - some people have had problems importing Lightroom edited photos into iPhoto
    LN

  • Question re printing from internet has been blocked without a solution. Is there any next step we can take to get this problem solved or at least to be told that Forefox cannot solve it?

    The question about Firefox not printing directly from the Internet has been asked before-but no useful solutions have been offered. It came up in 2010 and was under discussion until Jan 30 when it was locked.. I would like to re open the issue to further discussion or be notified by Firefox that they cannot solve it.

    call them, tell them you NEED a new battery installed, and they need to tell you when they can do it.  That is their job to help you! Give pushback if necessary.

  • Question about printing an image/control Using Report Generator

    The attached VI is an example of creating a report from a control or image. My problem is that when the control (xy graph) gets too large in the vertical direction it clips the image but, the horizontal is scaled to the width of the report. 
    First question is why does it scale in the horizontal and not the vertical? See the Test.pdf for what I am talking about. 
    Second, is it possible to control this behavior (edit/create an alternate for the Append Control Image to report or the Report VI's)?
    I have found many work around but ultimately it comes back to; why automatically scale one direction but not the other?
    For this application I don't mind that the graph is scaled down in the horizontal I just wish it would do the same thing in the vertical axis (I don't even want it to be a 1 to 1 zoom ratio, just fill the avalible report space).
    Thoughts?
    Attachments:
    Print XY Graph TEST.vi ‏55 KB
    Test.pdf ‏217 KB

    I agree all of the workarounds have limitations. One workaround, that I'm not sure if you have tried yet is change the numeric constant from 50 to 20 (I attached a picture showing which constant I am talking about). This seems to fix the issue just because the image never becomes larger than the report page itself.
    Let me know if that option creates any problems for you as well.
    Kevin S
    Applications Engineer
    National Instruments
    Attachments:
    Block Diagram.PNG ‏29 KB

  • Question about print button

    Good morning everyone,
    Quick question for you this morning, im playing around with the print button and so far i get it to do what i want. Which is basically print in "FIT" mode like this:
    xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    now this takes care of people who press my custom print button, but i dont have control over the folks that might activate that from the print icon or from the print menu options.
    Now for this i know that using PRE:PRINT would solve it for sure, but i dont know how to write the code in there so it works.
    What i did at first is copy the print code above in that section, but if i press my Print button where the same code is, i create a endless loop.
    Im just trying to cover my self and make sure that what ever one of the 3 print choices they choose, i will be able to execute the code above and without any infinite loops
    Any ideas how i could set this up?
    Thank you very much again!!!

    Hi,
    you can disallow printing form the menu items or key combination with a bit of scripting.
    But first you need a variable you add under the form properties with a default value like 0.
    Lets name it "usedPrintButton".
    Ok, now the scripting part.
    There are 3 scripts in 3 different events neccassary. You can use all those events of your print button.
    1. click event
    // Modify the variable to imply user has started printing from this button
    usedPrintButton.value = "1";
    xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    2. prePrint event
    // Check the variable and cancel printing when it's 0
    if (usedPrintButton.value == "0") {
              xfa.event.cancelAction = true;
    3. postPrint event
    // Set the variable back to 0
    usedPrintButton.value = "0";
    Hope this helps.

  • Color Space Question For Printing

    I have multiple newbie questions so please bear with me
    Normally when working in photoshop, I tend to use the RGB color space as I need the use of filters and other effects not available in CMYK, Now when printing flyers E.g A4 Sized I tend to save the PSD in RGB (Without Flattening) and then importing it into a CMYK color space in illustrator and then exporting as a PDF, as illustrator gives me the option to create bleed as well as trim marks, I have never exported a PDF from photoshop as it always gives me the option of photoshop pdf which is kinda heavy.
    My question is, is the process I use okay for printing? or do I first need to convert it into CMYK? or just export from photoshop itself?  Also, the other reason I use illustrator is if i'm making a business card with two sides, since text is better exported from illustrator.
    Could anyone tell me a simpler process for creating for digital print? Especially if I need to do some items in illustrator as well.

    >> images are still a bit washed out with a warmish/ yellow cast to them, particularly, my black and white images
    Here is a simple test to help evaluate if the monitor profile is reasonably good:
    Open a RGB file in Photoshop (flatten if not already flattened).
    Press M key> Drag a selection> Com+Shift+U (Desaturate).
    Com+Z (to toggle back and forth).
    If the unsaturated selection looks neutral you've got a reasonably fair monitor profile.
    If selection has color casts (not neutral) -- you have a bad monitor profile
    +++++
    Here is a simple test to help evaluate if a bad monitor profile is whacking out your Photoshop color:
    Monitors/Displays (control panel)> Color> highlight AppleRGB or sRGB (don't run Calibrate), quit and reboot.
    If the Photoshop colors are back under control, then the problem was most surely a bad monitor profile go back into Monitors/Displays> Color and Calibrate a good profile highlight (load) sRGB, or preferably, the monitor's OEM profile as a starting point.
    If you are using a puck, it is likely defective; or your monitor hardware is the culprit...search it on Google by model number

  • Question about printing and sorting files

    What I'm trying to do is read in a file of names (about a thousand) sort them using a sort alorithim then print out the sorted file of names, as well a separate chart with the number of compares and swaps . My Sort class has different sorting algorithims, like insertion, bubble etc. Everything I have now works fine. But the way its set up now I have to pick one algorithim at a time, then it sorts then prints the results like this:
    Bubble Sort
    Compares : 2016
    Swaps : 1052.
    Now if I want to choose anothert algorithim, I'll have to manualy do that then run Main again then apend the results to the output file. But I would like run Main once opening the file that needs to be sorted then run one algorithim, calc the results, then do that again for another algorithim calc the results, then when I'm finished with all the algorithims, print all the results at once to the output chart. This so the output will look better, and the user won't have repeatedly run the program to see and compare the results.
    Is this even possible, and if so, any ideas how?
    This is the main console, which put the names in a array list, then sorts
    them
    public class SortyFile {
         public static void main(String[] args) throws IOException{
               BufferedReader r = new BufferedReader(new FileReader("C:/Documents and Settings/Cougar/" +
                   "Desktop/names.txt"));
               PrintWriter Output_Chart
                    = new PrintWriter(new BufferedWriter(new FileWriter("C:/Documents and Settings/Cougar/" +
                      "Desktop/Output Chart2.txt" , true)));
               PrintWriter Output_Sorted_File
                    = new PrintWriter(new BufferedWriter(new FileWriter("C:/Documents and Settings/Cougar/" +
                           "Desktop/Sorted File2.txt")));
               ArrayList a = new ArrayList();
               String line = null;
               while ((line = r.readLine()) != null)
                    a.add(line);
                    Sort.bubbleSort(a);
                  Output_Chart.println("");
                  Output_Chart.println(Sort.algoname);
                  Output_Chart.println("");
                  Output_Chart.println("Compares :" + "   " + Sort.compares);
                  Output_Chart.println("Swaps :" + "      "  + Sort.swaps);
                  Output_Chart.println("");
                  for (int i=0; i<a.size(); i++){
                       Output_Sorted_File.println(a.get(i));
                       System.out.println(a.get(i));
               Output_Chart.close();
               Output_Sorted_File.close();
    This is the class with different sorting algorithims, the variable algoname is use for printing the header on the output chart.
    public class Sort {
        static int swaps = 0;
        static int compares = 0;
        static String algoname;  // name for the algorithim
        public static void swap(List data, int least, int i) {
              Object tmp = data.get(least);
              data.set(least, data.get(i));
              data.set(i, tmp);
         public static void bubbleSort(List data)
            for (int i = 0; i < data.size(); i++)
                for(int j = i+1; j < data.size(); j++)
                    Comparable current = (Comparable) data.get(j);
                    Comparable previous = (Comparable) data.get(i);
                    compares++;
                    if (current.compareTo(previous) < 0)
                        data.set(j, previous);
                        data.set(i, current);
                        swaps++;
            algoname = "Bubble Sort"; 
          public static void selectionSort (List data)
               int i,j, least;
               final int size = data.size();
               for (i = 0; i < size - 1; i++)
                  for (j = i+1, least = i; j < size; j++)
                       compares++;     
                 if (((((Comparable) (data.get(j))).compareTo(data.get(least)))) < 0)
                      least = j;
                      swap(data,least,i);
                      swaps++;
               algoname = "Selection Sort";
          public static void insertionSort (List data)
                 Comparable tmp;
              int i, j;
                 for(i = 1; i < data.size(); i++)
                      tmp =  (Comparable)data.get(i);
                       for(j = i; (j > 0) && (tmp.compareTo(data.get(j - 1)) < 0) ; j--){
                       compares++;
                       data.set(j, data.get(j - 1))  ;
                       data.set(j, tmp)  ;
                      swaps++;
                 algoname = "Insertion Sort";
    }

    Maybe Im misunderstanding your question, but couldnt
    you just run the bubbleSort() method, then the
    insertionSort() method, and so on? You would do this
    in your main method.Yeah I tried that but for odd reason I get this for the results
    Bubble Sort
    Compares : 2016
    Swaps : 1052
    Selection Sort
    Compares : 2016
    Swaps : 1052
    The results for both algorthims are exactly the same.

Maybe you are looking for

  • "llegal character in path at index" Error While Using wsimport from ant.

    Hi, I am getting the following error, while using wsimport from ant build script. you have the details below. I dont have a clue on this error. Error : wsimport: [echo] Generating the client stubs [wsimport] error: Unable to parse "HelloService_schem

  • How Do I Check If Phone # has Been used Before

    My father is on my sister's Friends and family plan and got a phone..his phone number is (973) ***-**** and has been getting phone calls from people looking for various others and was wondering how do i check if the phone number has been properly can

  • Is there an Email ID for customer support?

    Is there an Email ID for customer support? I am currently overseas and need to communicate thru email urgently. Thanks in advance. Jacob

  • Mac does not start is asking me to reboot from back up

    My Mac is not starting and is asking me to reboot from the time machine however it is showing me that the latest complete backup is form September. Should I reboot from there and once I am in I will be able to  rescue latest backups or should I re-in

  • Hitting Max Limit on Share Photo Streams - Bug or Feature?

    I am using the Aperture to create Shared Photo Streams.  Everything has been working well except that as I cannot seem to share more than 1390 photos.  I am doing so across 20 or so Photo Streams. When I try and share, say, 100 photos to a new Photo