Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

Hi.

I want to pull data from the db and display it to a page. Once displayed I need to print the displayed information.

  1. What is the best way to display the data? Though a List? There will be a few records.

  2. Once displayed how would I print the data? I would like use a button to achieve this if possible.

    Thank you.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Printing from a page

Hi,
1) it depends on you data, perhaps it would be better to use Grid element. So it's up to you;
2) to print data use codewindow.print() /code
here is more info http://www.w3schools.com/jsref/met_wi...

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

Thank you Marina. I will give it a try.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

I have used the Grid Element but it only displays the 1st record. I need it to display all the records, like the list? Is that possible. I was under the impression that it works like a table and not like a datagrid?

The window.print() works perfectly.
Thank you

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Printing from a page

Please post screenshot of mapping.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

I have it showing all records through the query service. I do not know the syntax to use for the Where Request. I need the database OrderNo field to equal my Stored Variable OrderNo. Image
Image

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

Can I presume that this would be the correct syntax for JS?

return '{"OrderNo":"'+value+'"}';

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

Nope does not work. No records returned

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Printing from a page

Hi Deon,

Paste: codereturn '{"OrderNo":"'+value+'"}'; /code as a JavaScript code for field "where" when creating a request.

Where do you pass database session token X-Appery-Session-Token in mapping?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Printing from a page

Thanks Katya
I was not aware that I had to map it. Can you please explain why this is needed and what I should do?

Thank you

Return to “Issues”