Reporting services and appending multiple documents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Someone11
    New Member
    • Jan 2007
    • 3

    Reporting services and appending multiple documents

    Ok not sure if this is where im meant to post my problem. But currently i'm generating a report through a webpage coded using vb.net.

    I create the reporitng service and set the credentials and then set the render arguments. i then call the reportingservic es.render method to generate the report which all works fine. Currently the report takes in one paramater, in this case a invoice number and the report returned is an invoice. The report returned is a PDF file.

    Now i'm wondering is there anyway to have the reporting service recieve multiple invoice numbers as a parameter and in return prints ALL invoices into one pdf file?
  • radcaesar
    Recognized Expert Contributor
    • Sep 2006
    • 759

    #2
    That is not the task of reporting services. Thats ur logic. You can achieve this in crystal reports itself. Else try with Farpoint.

    :)

    Comment

    • Someone11
      New Member
      • Jan 2007
      • 3

      #3
      Hey thanks for the reply, i started thinking about this and now im not sure if this will work. But the render method returns a byte array so i tried to render two reports and return it in Byte1 and Byte2 arrays. Then i declared a filestream and created a file with the length of both these arrays lengths. THen i tried to call the Write method and write the two bytes into the file. Would this work?
      I've got the following code

      Two byte arrays which have been rendered and then

      Dim length As Integer = Data.Length + Data2.Length

      Dim stream As FileStream = File.Create("re port.pdf", length)

      stream.Write(Da ta, 0, Data.Length)

      stream.Write(Da ta2, Data.Length length)

      stream.Close()

      Comment

      • enreil
        New Member
        • Jan 2007
        • 86

        #4
        I don't think this is possible. There are several 3rd party solutions (see this link for a discussion of one that works with Crystal Reports: http://aspalliance.com/571_Merging_a...rystal_Reports) that can accomplish this task. I like your creativity, though!

        Originally posted by Someone11
        Hey thanks for the reply, i started thinking about this and now im not sure if this will work. But the render method returns a byte array so i tried to render two reports and return it in Byte1 and Byte2 arrays. Then i declared a filestream and created a file with the length of both these arrays lengths. THen i tried to call the Write method and write the two bytes into the file. Would this work?
        I've got the following code

        Two byte arrays which have been rendered and then

        Dim length As Integer = Data.Length + Data2.Length

        Dim stream As FileStream = File.Create("re port.pdf", length)

        stream.Write(Da ta, 0, Data.Length)

        stream.Write(Da ta2, Data.Length length)

        stream.Close()

        Comment

        • Someone11
          New Member
          • Jan 2007
          • 3

          #5
          lol im still new to all this and i dont know whats possible.
          But i cant use crystal reports as we already have all our reports written using sql reporting services. I'm sure if you have two byte arrays you can just combine it and get it to display?

          Comment

          • enreil
            New Member
            • Jan 2007
            • 86

            #6
            Try looking into the following:



            Originally posted by Someone11
            lol im still new to all this and i dont know whats possible.
            But i cant use crystal reports as we already have all our reports written using sql reporting services. I'm sure if you have two byte arrays you can just combine it and get it to display?

            Comment

            • ronicard
              New Member
              • Dec 2006
              • 3

              #7
              Would it not be possible for you to change the parameters for report and, instead of taking a single id, accept a string. Then, your SQL query could return multiple invoices by doing a :

              select
              *
              from
              invoice_table t
              where
              t.id in (@parameterIDSt ring)

              instead of

              select
              *
              from
              invoice_table t
              where
              t.id = (@parameterID)

              Not sure if that helps, but I've done that before and gotten it to work.

              Comment

              • Aligieri
                New Member
                • Dec 2007
                • 1

                #8
                Hi everyone.

                I rendered two reports to PDF, joined the two byte arrays into one, created a FileStream and write the byte array that contains the reports into the file. The file is created with the correct length but, when I open the PDF, it only shows the last report. Does anyone have a solution for this?

                Thanks,
                Aligieri


                Originally posted by Someone11
                Hey thanks for the reply, i started thinking about this and now im not sure if this will work. But the render method returns a byte array so i tried to render two reports and return it in Byte1 and Byte2 arrays. Then i declared a filestream and created a file with the length of both these arrays lengths. THen i tried to call the Write method and write the two bytes into the file. Would this work?
                I've got the following code

                Two byte arrays which have been rendered and then

                Dim length As Integer = Data.Length + Data2.Length

                Dim stream As FileStream = File.Create("re port.pdf", length)

                stream.Write(Da ta, 0, Data.Length)

                stream.Write(Da ta2, Data.Length length)

                stream.Close()

                Comment

                Working...