CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Incomplete list when printing batch update via profile screen
Pages: [1]

Author Topic: Incomplete list when printing batch update via profile screen  (Read 752 times)

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Incomplete list when printing batch update via profile screen
April 13, 2011, 02:39:25 pm
hey folks,

when i use the batch update via profile and try to print the screen that results, the printout (or preview) only shows one page of records.

i replicated this on the drupal.demo.civicrm.org site. i view the participants of the Fall Fundraiser event. i then select all and choose the Batch Update via profile option and choose the participant status profile.

if i try to print this page, or click the printer icon and try to print that page, i get one page's worth of records and then the bottom of the screen and it ends.

not sure where to troubleshoot this. any thoughts?

--josue

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Incomplete list when printing batch update via profile screen
April 13, 2011, 04:52:17 pm

i had a similiar issue when doing some school stuff where the browser could not print large sets of records. the html seemed valis etc, but multiple browsers could not print it.

i gave up after trying a few random things :(

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Re: Incomplete list when printing batch update via profile screen
April 13, 2011, 08:54:42 pm
thanks for the reply lobo!

i did some more testing and discovered that google chrome printed the whole page. that inspired me to play with firebug (which i do not know a whole lot about!) and i think i found something:

there is a table that gets created right after the <legend>Batch Update for Events - Event Tracking Profile</legend>

this table has, according to firebug, an element.style that says "position: relative;"

if i change, with firebug, "relative" to "absolute" then i can successfully print the whole list of results!

now if someone can tell me where that style gets created, then maybe this is a bug that can be fixed.

--josue

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Re: Incomplete list when printing batch update via profile screen
April 28, 2011, 08:27:06 pm
hey folks,

is anyone a css expert here? i did more poking around and think that it is jquery inserting the table style.

anyone know how this is created? what file i need to edit to change this style from relative to absolute?

when i use the print icon on a batch update screen firebug identifies:

<table style="position: relative;">

and is described in the other firebug pane as:

element.style {
    position: relative;
}

it would be great for this to work in firefox. and when i change relative to absolute it does work! i just do not know where this is being set.

anyone? anyone?

paz,

--josue

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Incomplete list when printing batch update via profile screen
April 29, 2011, 05:28:19 pm
Josue - The relative class on the enclosing table is being inserted by packages/jquery/plugins/jquery.tableHeader.js for the sticky headers feature (table column headers stick to top of browser window). You can turn it off by removing the class="sticky" from this line in Batch.tpl

<thead class="sticky">

However, that will "break" the sticky headers feature :-( which you probably want in the normal (non-print friendly) view. The print friendly view has a "snippet=2" param which causes the surrounding blocks to not be included. Also, print.css is included in print friendly mode. So ... you might want to look at passing a param to the Batch.tpl template to tell it we're in print friendly mode so you can conditionally not apply the sticky class. Seems like this would be pretty easy to do in templates/common/snippet.tpl. I turned on smartyDebug and there is a $printerFriendly smarty var now but it just has the path and doesn't change whether you're in printer friendly mode or not - so you'd need to add something like $isPrinterFriendly. You could also see if it makes sense to add jquery to action.tpl (which is called by snippet.tpl) to suppress the sticky header behavior if we're in print friendly view. That would be a nice general fix.

OR perhaps suppress you can figure out a way to suppthe sticky class js behavior in print.css (not sure if that idea is viable).

In either case, we would be open to a patch to fix this problem. :-)

Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Incomplete list when printing batch update via profile screen

This forum was archived on 2017-11-26.