Hello!

First, thank you very much for the cool module. I like the way of implementing it as a display and configuring it like a view.

My use case requires that customers can filter the view before exporting it to a PDF. Therefore, I tried to solve it by putting an exposed filter on a PDF display, however it results in an empty page.....is it supported in this module or am I doing something wrong...?

Comments

Hi MF82
this is not nice but works for me: Create a default page from Your default view with identical exposed filter as the PDF-Page, then put some PHP-Code e.g. in the header to get the values of the active filters into an array (e.g with split('/', $_SERVER['REQUEST_URI']);). Then print a link to your PDF-view and pass the filter-values with that link. Hope that works for You...

Thanks for your reply semanthis! I will look into it :)

Hello semanthis,

I've been trying to figure out what you mean with your comment, but since I'm not a PHP hero, I'm having difficulties figuring out what you exactly trying to say. I understood the following:

My view should exist of three displays:
- default display with data
- PDF display
- page display; this contains the header with the PHP code. I assume the PDF display should be attached to this page in order to receive the filter strings. Am I correct in assuming that the PHP code manipulates the page URL in which I pass the filters?

I would appreciate it if you can elaborate a bit more on how this would work! :)

Sorry for the late answer, this is what I have done: I created a View added the filters, added a page-display and a pdf-display.
To figure out which values are choosen from exposed filters I did a

<?php
$qstrings
= split('/', $_SERVER['REQUEST_URI']);
?>

width a print_r you can find out what is in the array, then you can print the link to your pdf-display submitting the values from the exposed filters like this:

<?php
$path
= base_path();
?>

<?php
print $path."myview/pdf/".$qstrings[4]."/".$qstrings[5];
?>
" rel="nofollow">
<?php
print t("Als PDF exportieren");
?>

The numbers behind $qstrings depend on the actual path of your view.
Hope that will help you, nice greetings from Sebastian

Thanks for your reply semanthis! I will check it out and let you know if I succeeded.

hey semanthis,

Thanks again for your reply. It put me on the right track.
I already had the Print module installed with which I built a block with the same kind of PHP code you proposed. Exposed filters and printing/export pdf is unfortunately nowhere as integrated as we would like it to be :).

Anyway, my problem is solved, but not in the most elegant way... so I guess this could still remain as a "active / needs work" topic for the devs.

Version:6.x-1.0» 7.x-1.x-dev

Moving all feature requests to the current version of the module.

Status:Active» Postponed (maintainer needs more info)
Issue tags:+Needs steps to reproduce

Dear fellow Drupal enthusiasts,

I have set this issue to "Postponed (Maintainer needs more information)".

If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".

Help about how to do this can be found on IRC and in the user groups.

After there is new information, please re-open the issue by changing the status to active.

--
This issue was edited with the help of Issue Helper

Issue summary:View changes
Status:Postponed (maintainer needs more info)» Closed (works as designed)

Please open a new issue if you still have this problem.