Web API Call for Report Print in HTML

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0

Is is possible to print in html a report via a web api call?

Once again, thanks very much.


Javier


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


On 23-Sep-2014, at 9:36 am, Javier <bo...@gmail.com> wrote:

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0


Thanks 

Is is possible to print in html a report via a web api call?

unfortunately no - you can get the JSON though and format it.

The reason is that the HTML is generated client side (to avoid double execution of the report)


Once again, thanks very much.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/17C548AE-9E35-434A-BBE8-D7D36ECA6EBD%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Thanks Rushabh,

Sorry if this is a silly question, but what http call can I make to obtain the JSON? 

Thanks once again.

On Tuesday, September 23, 2014 1:19:40 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 9:36 am, Javier <bo...@gmail.com> wrote:

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0


Thanks 

Is is possible to print in html a report via a web api call?

unfortunately no - you can get the JSON though and format it.

The reason is that the HTML is generated client side (to avoid double execution of the report)


Once again, thanks very much.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/fd8db71a-d72a-485a-8551-de3e98bbc8f6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


On 23-Sep-2014, at 11:02 am, Javier <bo...@gmail.com> wrote:

Thanks Rushabh,

Sorry if this is a silly question, but what http call can I make to obtain the JSON? 

Quick way to find out. 

Run the report from the Frappe Desk and keep your Network tab in the JS console open :)


Thanks once again.

On Tuesday, September 23, 2014 1:19:40 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 9:36 am, Javier <bo...@gmail.com> wrote:

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0


Thanks 

Is is possible to print in html a report via a web api call?

unfortunately no - you can get the JSON though and format it.

The reason is that the HTML is generated client side (to avoid double execution of the report)


Once again, thanks very much.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/fd8db71a-d72a-485a-8551-de3e98bbc8f6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/C7A681F4-8BF2-44F3-8DDC-BC4644010E13%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Rushabh, thank you...

Must say that I am not a good programmer so I may not get it right, anyhow I ran the report, had the JS console open with the network tab selected and under content types i see several application/json types. 

Did a preview on a few of them and found the data structure inside one of the JSON. Can you recommend a method which I can use to extract this JSON to be used in a custom script? Say PHP of some other language?

Thanks so much again.


On Tuesday, September 23, 2014 1:34:32 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 11:02 am, Javier <bo...@gmail.com> wrote:

Thanks Rushabh,

Sorry if this is a silly question, but what http call can I make to obtain the JSON? 

Quick way to find out. 

Run the report from the Frappe Desk and keep your Network tab in the JS console open :)


Thanks once again.

On Tuesday, September 23, 2014 1:19:40 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 9:36 am, Javier <bo...@gmail.com> wrote:

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0


Thanks 

Is is possible to print in html a report via a web api call?

unfortunately no - you can get the JSON though and format it.

The reason is that the HTML is generated client side (to avoid double execution of the report)


Once again, thanks very much.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/fd8db71a-d72a-485a-8551-de3e98bbc8f6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/15ce6d41-6161-4750-8e8f-717fc0a836e1%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


On 23-Sep-2014, at 11:26 am, Javier <bo...@gmail.com> wrote:

Rushabh, thank you...

Must say that I am not a good programmer so I may not get it right, anyhow I ran the report, had the JS console open with the network tab selected and under content types i see several application/json types. 

Did a preview on a few of them and found the data structure inside one of the JSON. Can you recommend a method which I can use to extract this JSON to be used in a custom script? Say PHP of some other language?

Great - now look at the "request" tab for the query parameters - it should be quite intuitive :)


Thanks so much again.


On Tuesday, September 23, 2014 1:34:32 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 11:02 am, Javier <bo...@gmail.com> wrote:

Thanks Rushabh,

Sorry if this is a silly question, but what http call can I make to obtain the JSON? 

Quick way to find out. 

Run the report from the Frappe Desk and keep your Network tab in the JS console open :)


Thanks once again.

On Tuesday, September 23, 2014 1:19:40 PM UTC+8, Rushabh Mehta wrote:


On 23-Sep-2014, at 9:36 am, Javier <bo...@gmail.com> wrote:

Dear Experts,

Much like how it is possible to print in html a Sales Invoice through a web API call via https://erpnext.url/print?doctype=Sales%20Invoice&name=INVNO123456&format=Standard&no_letterhead=0


Thanks 

Is is possible to print in html a report via a web api call?

unfortunately no - you can get the JSON though and format it.

The reason is that the HTML is generated client side (to avoid double execution of the report)


Once again, thanks very much.


Javier

-- 
1. Please be kind and don't send large attachments
2. For issues, features requests use https://github.com/frappe/erpnext/issues
--- 
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email toerpnext-user-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5fc9de6a-0847-4cc3-85c5-5e2f8470992d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
1. Please be kind and don't send large attachments
2. For issues, features requests use https://github.com/frappe/erpnext/issues
--- 
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email toerpnext-user-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/fd8db71a-d72a-485a-8551-de3e98bbc8f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
1. Please be kind and don't send large attachments
2. For issues, features requests use https://github.com/frappe/erpnext/issues
--- 
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email toerpnext-user-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/15ce6d41-6161-4750-8e8f-717fc0a836e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/45C74229-BC43-4530-8781-5E93353A6320%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.