How to print a jqgrid content?

Topics: User Forum
Jan 7, 2014 at 2:01 PM
Hi friends,
i've downloaded and configured AVFP on my computer for testing. With a little difficoulty, i'm success to print a PDF files from a query. Now, my problem is this: "How can i print the results of query (showed in a grid) in a PDF?"

If i use a unique cursor name, when loading the webpage (that containing a grid and a select statement), she go into loop. I've tried to use oSession.Value but without results.

Can we explain me the right method?

P.S. Sorry for my bad english :)
Jan 8, 2014 at 1:41 PM
Well the PDF generation. as it is, is tied to regular VFP report generation. So you should be able to run any query on data, return it to the VFP Report writer which generates a regular VFP report, and then auto convert that to PDF.

More than likely there are many more ways to do this in AVFP. This is just the way it works out of the box.
Jan 9, 2014 at 7:30 AM
Thanks for reply. I can print to report through query but i've problem to print the content of a grid. If i've a grid (jqgrid) with data, how can i use your data for printing? I try to save the query string in oSession class but AVFP don't run me a query with macro operator.
I try to save in oSession the name of cursor but when i go to print page, she's showing me that can't access to file dbf (but this is a cursor...).

This is the code that i use for query to return to page grid:


-> curtemp is my cursor

In print page, how can i use the same cursor (with same data)?

Thanks for your help.
Jan 9, 2014 at 10:39 AM
Maybe i've resolved.
Jan 9, 2014 at 1:18 PM
maybe this would help with your problem?
Jan 9, 2014 at 2:51 PM
Thanks but i'm resolved. :)
Jan 10, 2014 at 9:32 AM
What was the resolution?
Jan 10, 2014 at 10:13 AM
I've use a single string with my query (in a variable) for webpage with a grid and i'm used a oSession class to store this variable. In the print page i recall the content of variable stored in oSession and i use it for oPDF object.
Jan 10, 2014 at 1:18 PM
Cool - thanks!