Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i need to create xps report dynamically i tried different ways .

but now i need to create XamlTemplate for all section like header,body,footer etc

and i need to call these templates programically and need to set data to it.

suppose i create a Header template. a rectangle with TextBlock at it center

i need to acess this template in the code and need to assign text property for the

textblock.and i need to convert this xaml to xps report also i need to try this with flowdocument.

i tried several msdn links but this is not helping me.so please give a good sample.

Regards,

sajith
Posted
Comments
SteveAdey 9-Feb-12 9:52am    
I gave you the XAML for this yesterday. You basically asked the same question. The text in the rectangle I showed can be set through binding. In order to do that you set up a view model with the text as a property.

Unfortunately, I've spent enough time on this, without any comment from yourself, so as Christian says, we're not going to do all the work for you. Ask a specific question.
sajithnet 9-Feb-12 10:19am    
iam really really sorry steve.i was a beginner in wpf and my task was huge and my time is very less doing this report stuff. i was very panic .iam thankful to u a lot
take care
SteveAdey 9-Feb-12 10:27am    
That's fine, but I don't understand why beginners are being given this kind of task. This is at best intermediate level.

1 solution

You can set the text in your textblock in code, by accessing it by name. I'm sure you found blog posts like this[^] one, if you can't get them to work, you need to post specific questions here, not ask us to start from scratch and do your work for you
 
Share this answer
 
Comments
sajithnet 9-Feb-12 10:21am    
many thanks chris,iam a sure i will do as per u wrote .thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900