0 Replies Latest reply on Mar 10, 2009 5:43 AM by amthekkel

    PrintDataGrid query

    amthekkel Level 1
      Hi all,

      I have an xml list which is being retuned as an HTTP response and saved as an XMLListCollection. The list contains elements like CARER, CLIENT etc. The list received is ordered, sorted by CARER first followed by the CLIENT Name. e.g. following is an example of the values that are useful
      record 1 : CARER1 CLIENT1
      record 2: CARER1 CLIENT1
      record 3: CARER1 CLIENT2
      record 4: CARER1 CLIENT3
      record 5: CARER2 CLIENT2
      record 6 CARER2: CLIENT2 and so on.

      what i am trying to achieve is to print records on separate pages if their is a different Carer or Client . so with the above example it would be like

      page 1
      record 1 : CARER1 CLIENT1
      record 2: CARER1 CLIENT1

      Page 2
      record 3: CARER1 CLIENT2

      Page 3
      record 4: CARER1 CLIENT3

      Page 4
      record 5: CARER2 CLIENT2
      record 6 CARER2: CLIENT2

      and so on.


      I have a print datagrid called "myDataGrid", and i have set the dataProvider ="{orgData}", where orgData is an XMLListCollection containing the xml elements. These components are laid out in a container called printComp


      here is my code for

      My test xml list has 29 elements and the print output generated contains 29 pages.

      Any suggestions on how to proceed with printing multiple data using printdatagrid. I am getting really confused with the examples on the web. they seem to work fine, but they seem to jump to next page based on the amount of rows the datagrid can display. I would like to jump printing to the next page based on the elements in the dataprovider.

      Please help.

      cheers
      abhi