How to print a jqgrid content?

Topics: User Forum
Jan 7, 2014 at 3: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 :)
Coordinator
Jan 8, 2014 at 2: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 8: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:

oResponse.Write(oJSON.AddJSONProps(oJSON.stringify(AjaxResponse),oJSON.stringify('curtemp')))

-> 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 11:39 AM
Maybe i've resolved.
Developer
Jan 9, 2014 at 2:18 PM
maybe this would help with your problem?
Jan 9, 2014 at 3:51 PM
Thanks but i'm resolved. :)
Coordinator
Jan 10, 2014 at 10:32 AM
What was the resolution?
Jan 10, 2014 at 11: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.
Coordinator
Jan 10, 2014 at 2:18 PM
Cool - thanks!