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

A place for users and developers of the Xataface to discuss and receive support.

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

Postby manifold » Tue Oct 04, 2011 6:52 am

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
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

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

Postby shannah » Tue Oct 04, 2011 9:27 am

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

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

Postby manifold » Tue Oct 04, 2011 10:04 am

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
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

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

Postby shannah » Wed Oct 05, 2011 9:31 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

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

Postby manifold » Fri Oct 07, 2011 6:31 am

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 2321 times
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

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

Postby manifold » Mon Oct 10, 2011 7:44 am

I think I'm one step away; please see attached screencap (above) re: how to position the actual query form and results..

TIA,
-manifold
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved