Hi Infragistics team.
We have a requirement to print a report which does not have any User -Interface i.e i need to generate a report programatically.
I have an Xamdatatree with hirearchy of data as below.
Parent
-child1
-child2
--Grand Child.
When user right clicks on parent and clicks on Export then i need to generate report which should consist of Header,Footer,Page Numbers, Detail Section.
Detail section will consist of all the details related to parent and it's children in a grid view.
Ex:
--------------------------------------Header---------------------------------------------
parentdetails in datagrid
child1
child1 details in grid.
grandchild1
grand child details in Grid.
-------------------------------------Footer-----------------------------------------------
Any suggestions on what controls to use or any links related to this.
Hi,
The xamDataGrid already implements IEmbeddedVisualPaginator which is why I originally used the collapsed grid in my sample. If you need to use another control, like the ListBox, you would have to implement the interface. You could perhaps use our source code for the xamDataGrid as a model.
Please let me know if you have any questions.
Hi Team,
Any Suggestions to above Problem, i just need to have all my visual data printed. Right now it is printing only one page.
Hi
After adding below Content template to report object , data started showing from Top Left ,
But the problem is Only one page is displayed and data in remaining pages is Lost. It is not showing in the print preview either.
<DataTemplate x:Key="basicContentTemplate">
<Grid HorizontalAlignment="Left" VerticalAlignment="Top"> <ContentPresenter Content="{TemplateBinding Content}" /> </Grid> </DataTemplate>
EmbeddedVisualReportSection section1 = new EmbeddedVisualReportSection(IoreportListing.dckpnlIoList);
section1.PageContentTemplate = IoreportListing.MainGrid.TryFindResource("basicContentTemplate") as DataTemplate; reportObj.Sections.Add(section1);
I was looking into IEmbeddedVisualPaginator , do i need to Implement this Interface for printing all pages, Can i have a sample on this.
I have attached a sample solution that shows problem i am facing.
1. Visual Object is displayed in the Center of the page.
2. There are horizontal and vertical scroll bars . and data is not fully seen.
i have used header,footer and content templates. My controls in the Visual tree includes a list box with an xamdata gridin the Item template.
Please let me know where i am going wrong.
I'm attaching my sample where I used a xamDataTree and a collaped xamDataGrid that will be used to create the report. The xamDataTree is bound to hierarchical data and when you select a parent node, you can click on the print button and generate the report.
I left in a xamReportViewer because it's handy to see the report before it is printed.
Let me know if you have any questions.