Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create some report with dynamic data and that's why the report content which will be segmented and each segment has a very different length.

The report can look like this:

---------------------------------------------------------
## Report header ##
## Report main content ##

##Item 1 may have variable length

##Item 2 may have variable length

## ....

## Item n may have variable length

## Report footer ##
---------------------------------------------------------

I want to design the report not code to generate the report, of course if there is no way, using code is undetestable to me!

The Item1, 2, .. , n are anything possible to show data such as normal strings (labels), textboxes, tables ...

The difficult thing is if I build the report at design time, all the items must be dragged-n-dropped onto the report at fixed positions and I wonder how they can be rendered when being filled with data at runtime??? (Their positions must be changed).

In conclusion, I want a solution for such a report no matter how I do (design or code). Plus, could you please suggest me what report tool is the best for this problem of mine??? I know only Crystal Report and XtraReport.

Thank you! Your help would be highly appreciated!
Posted

1 solution

I recommend that you start by seeing what you can accomplish in Crystal or XtraReport (try both).

I've not used Crystal in ages, but my recollection is that it supports repeating sections (where the number of repeats is dependent on the data .. so it is not hardcoded), and it also supports text fields that grow - i.e. the size of the field in your report template may be the full width of the report, and one line tall, but at run time the field grows to be big enough to contain the entire text in the field.

The one thing you've not made clear is whether your variability within a section is that you want 'sometimes these fields, sometimes those fields' - in other words you want to dynamically change the design of the report at run time. I've never done that and I suspect if that's what you want to do you'll need to do it in code. The simpler alternative is to add the maximal set of fields at design time, and at run time just don't put data in them if the section doesn't need them. But maybe you feel the need to be completely open-ended that this option won't work.

Hope something there helps.
 
Share this answer
 

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