locked
Printing Options

    Question

  • I am wanting to print a list of items that are returned from my database in a easy viewable format.

    Normally in my web apps I would generate a PDF and then print that.

    What would be an easy way to do the same type of thing in the store app.

    Thanks for any ideas.

    Tuesday, May 6, 2014 11:59 AM

All replies

  • You can render PDFs in Windows 8.1:
    http://msdn.microsoft.com/en-us/magazine/dn532207.aspx

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, May 6, 2014 12:33 PM
    Moderator
  • That looks to me like just viewing a PDF that has already been generated. I need a way to generate the PDF document from the sql query that is run for reporting purposes.
    Tuesday, May 6, 2014 12:38 PM
  • This is the code I am using to get the list on the screen. I need to be able to print these results to a readable format.

     private async void expirationdate()
         {
           InventoryWatch.ServiceReference1 .ALLWARRANTY[] list = await myservice.GetWarrantyExpiresAsync(T1);
           warrantylistview.DataContext = list;
         }

    Wednesday, May 7, 2014 12:26 PM
  • There's a print sample here.  Look it over and let us know if you have additional questions:

    http://code.msdn.microsoft.com/windowsapps/Print-Sample-c544cce6


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, May 7, 2014 3:21 PM
    Moderator
  • I have looked over this code. When I do the same type of thing in my code I get errors referring to the BasePrintPage, yet I have it in my project.

    Everything that references items in the BasePrintPage class error.

    Wednesday, May 7, 2014 3:26 PM
  • Can you post your project to OneDrive and share it with us?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, May 8, 2014 4:18 PM
    Moderator