none
Creating Word/PDF/Html report in WCF service RRS feed

  • Question

  • Hi

    I am new to wcf development. But after spending some time i am able to get my service working.

    My Service will be used with IPhone app as a API and will provide data and receive information from app and save back to Database.

    All working well now, but now i need to be able to Product a report of all the information i am receiving from the app.

    Can someone please guide me how to do that.

    Many Thanks


    Ahnaf

    Tuesday, December 10, 2013 3:04 AM

Answers

  • All working well now

    Are you able to consume your WCF web service from iPhone?

    AFIK, there is no native iPhone framework stack for SOAP web services. You need to use OCS SDK or some soap framework along with Objective C to have WCF or any Soap request.

    WCF is a communication framework, as your requirements are more towards reporting, I will recommend using SSRS which will help you to generate html reports and that can be easily exported to word or excel on browser itself.

    Still if you think WC is the right choice, here is the code snippets which return the contents of .pdf from WCF,

    public byte[] ReturnFile()
        {
            System.IO.FileStream dd = System.IO.File.OpenRead(@"c:\abc.pdf");
            byte[] Bytes = new byte[dd.Length];
            dd.Read(Bytes, 0, Bytes.Length);
            return Bytes;
        }



    Lingaraj Mishra

    Tuesday, December 10, 2013 11:56 AM

All replies

  • All working well now

    Are you able to consume your WCF web service from iPhone?

    AFIK, there is no native iPhone framework stack for SOAP web services. You need to use OCS SDK or some soap framework along with Objective C to have WCF or any Soap request.

    WCF is a communication framework, as your requirements are more towards reporting, I will recommend using SSRS which will help you to generate html reports and that can be easily exported to word or excel on browser itself.

    Still if you think WC is the right choice, here is the code snippets which return the contents of .pdf from WCF,

    public byte[] ReturnFile()
        {
            System.IO.FileStream dd = System.IO.File.OpenRead(@"c:\abc.pdf");
            byte[] Bytes = new byte[dd.Length];
            dd.Read(Bytes, 0, Bytes.Length);
            return Bytes;
        }



    Lingaraj Mishra

    Tuesday, December 10, 2013 11:56 AM
  • try FlexDoc ,

    it is used to generate word document at server side .

    Refer CodePlex

    Tuesday, December 10, 2013 12:05 PM