Page 1 of 1

Adding printable reports, csv, xml, rss to query results

PostPosted: Tue Oct 04, 2011 6:52 am
by manifold
Any suggestions on how to allow the printable_reports module or the RSS module to access the results of a query?

I'd like for the printer, RSS, csv and XML modules to appear and be available to the results of a query; can't seem to figure out how to do this!

TIA,
-manifold

Re: Adding printable reports, csv, xml, rss to query results

PostPosted: Tue Oct 04, 2011 9:27 am
by shannah
By the results of a query do you mean a custom SQL query, or just a found set? Their default is to export the current found set. If I need a custom query to be exportable, I may either create a dummy relationship (that can be exported) or a mysql view - then treat the view as a table.

-Steve

Re: Adding printable reports, csv, xml, rss to query results

PostPosted: Tue Oct 04, 2011 10:04 am
by manifold
This would be for a custom query that I've created. I've put the query in the 'block before_table_tabs', and it runs fine. While I'd like the output to occur in a new window or tab (it just returns to the before_table_tabs block), it is even more important to be able to route it to the printer/RSS/csv/XML options.

-manifold

Re: Adding printable reports, csv, xml, rss to query results

PostPosted: Wed Oct 05, 2011 9:31 am
by shannah
It sounds like you need to do this in a custom action. If I were you, though, I would try to use the existing infrastructure for XML, CSV, etc... and just link to the result using Xataface URL conventions. E.g. you could create a view the produces the output how you want it, then just add a link to that view's feed action or export_csv action from your before_table_tabs slot.

Re: Adding printable reports, csv, xml, rss to query results

PostPosted: Fri Oct 07, 2011 6:31 am
by manifold
Hi,

I'm trying to properly place the custom query on the display page; everything works, except that the query input form and output all appear at the head of the page, before everything else.

I think this is the failure point:

-------------------
{use_macro file="Dataface_Main_Template.html"}
{fill_slot name="main_column"}

Hello World!! <<-------------------------------

{/fill_slot}
{/use_macro}
------------------------

I'd like to have the query input form and results appear where "Hello World!!" appears, but I can only get this to happen with simple text.

The small attached screen cap will show exactly what I mean...

Any suggestions on how to have the query form and result override main column and appear in its place?

TIA,
manifold
locationpic.jpg
locationpic.jpg (28.64 KiB) Viewed 2322 times

Re: Adding printable reports, csv, xml, rss to query results

PostPosted: Mon Oct 10, 2011 7:44 am
by manifold
I think I'm one step away; please see attached screencap (above) re: how to position the actual query form and results..

TIA,
-manifold