This is a question of strategy. Can SSRS handle this problem, or should I consider another approach?
My problem: I want to print a family tree chart. Imagine starting with the parents at the top center, then their children spread out in the next row, with their spouses, then the third row has the grandchildren, and so on. No problem, provided that you have the ability to position the entries where you want, and a page that has indefinite width and depth. But of course this has to be printed out on normal pages.
1/ Does SSRS give me the ability to create a very large page, and then automatically break this up for me into standard-sized pages that the real printer can handle. For example, the program might first produce a "virtual A1 page", then physically print this as up to 16 A4 pages (which the user might then glue together). It doesn't matter (from the application's point of view) whether the output is HTML, PDF, or something else, although PDF is probably a preference.
2/ Does SSRS allow me to calculate the position of a textbox at execution time. It is not until I read the data that I can work out the dimensions of the chart.
[Editing: I've found the answer: it's "Yes". But that leads to another question: -]
3/ Can I create new controls dynamically? I won't know how many people there are until I read the data. So whereas normal logic is "Read a record, print a detail line", in this case the logic will be "Read a record, create a texbox and place it {here} on the virtual page"
If yes, then I think that I can figure out the logic. What should I read to learn how to do this?
Thanks, Robert.
hi,
first create one rdlc file with existing ds and certain values (which is in working condition)
then open it as an xml file.
now you can see the xml tags in it and before generating the report generate the rdlc file as per your caluclation (these tags has column width..etc)
generate the rdlc and then, while showing it in report viewer select processing mode as local, then give this rdlc file as report and bind the dataset which you want to show in the report.
First, open a working report's rdlc file content in xml viewer, you can understand what to do, by using System.Xml namespace classes.
I will try to find the code, i have worked on it in the past.
and once you have done this, printer will take care of the rest.
( in rdlc xml tags give length and bredth of report as per your needs after calculating the data and space it occupies)
see the following link, its also similar to your problem
http://forums.asp.net/t/1195123.aspx
all the best
|||Thanks for this, if you can post the code, that would be great!
Perhaps you can help me with the related problem, http://forums.asp.net/p/1192671/2052349.aspx#2052349. This explains the whole problem, which is that I'm trying to produce a family tree chart. My original idea was that I could produce a huge "virtual page", and then break this up into printable (A4) chunks. However, I can't figure out how program logic such as this at the start of the report: -
For each record
Read record
Create textbox at position ...
Next
Until I can figure this out, I'm completely stuck. In fact, if I could write code like this at the start of each page I wouldn't need to create a large virtual page to be broken up later.
No comments:
Post a Comment