Results 1 to 5 of 5

Thread: print function

  1. #1
    john.luat is offline Senior Member
    Join Date
    Sep 2008
    Posts
    30

    Default print function

    Hello,

    I would like to ask how can i control the number of entries being displayed when i click on the print link under each module. The ideal is not to make the number of entries in the print function dependent on the number of entry being displayed in the list view.

    for example, in the Accounts List View, the number of entries displayed is 50. When i click on the link, i want to view ALL Accounts.

    Thanks in advance

    ---------------------------
    Windows Server 2003
    SugarCRM 5.2.0g
    IIS 6.0
    PHP 5.2.9-2
    MySQL 5.0.51a

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: print function

    Not exactly what you want to hear but you could just do an Export All and open in your favorite spreadsheet program then print. This would give you better control of the output as well so that not everything on the page is printed.

  3. #3
    wdroush is offline Senior Member
    Join Date
    Oct 2009
    Posts
    159

    Default Re: print function

    Got a quick hack for you.

    Add this line:
    PHP Code:
    $GLOBALS['sugar_config']['list_max_entries_per_page'] = 1000000
    After
    PHP Code:
     if ($this->_getOption('view_print')) { 
    (About line 105)

    So you get this:
    PHP Code:
     if ($this->_getOption('view_print')) {
                
    $GLOBALS['sugar_config']['list_max_entries_per_page'] = 1000000;
                echo (
    '<link href="themes/Sugar/print.css" media="all" type="text/css" rel="stylesheet">');
            } 
    in \include\MVC\ViewSugarView.php


    Testing seems to have stressed the hell out of the server, and not too sure if Sugar Heros are going to be happy that I recommend changing a MVC file like that.

    I too would recommend a file export, but if you want to use SugarCRM, there is the code that will do it.
    Last edited by wdroush; 2009-11-12 at 12:26 AM.

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: print function

    Nicely done!

    Sometimes you just can't avoid core, not upgrade-safe changes. Make sure to label the customizations so that it's easier to find and merge when you upgrade.

  5. #5
    john.luat is offline Senior Member
    Join Date
    Sep 2008
    Posts
    30

    Default Re: print function

    Thanks, i will try this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create 'Print to PDF' button/function ?
    By dekleinemedia in forum Help
    Replies: 0
    Last Post: 2009-07-24, 09:22 AM
  2. Implement Print Function on EditView
    By emillion in forum Developer Help
    Replies: 7
    Last Post: 2007-06-28, 05:28 PM
  3. Replies: 0
    Last Post: 2006-10-08, 03:52 AM
  4. Print function - Print without buttons and hyperlinks
    By malcolmh in forum Feature Requests
    Replies: 0
    Last Post: 2006-08-03, 07:43 AM
  5. Replies: 1
    Last Post: 2005-01-03, 11:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •