Question

I am having a small problem with formatting on a Crystal Report that I am hoping that you may be able to help me with.

Essentially, I have a Crystal Report that consists of three sub-reports. Each sub-report contains the same 3 sections, but use different data sources. Because of the different data sources, the sections in the individual sub-reports may vary in length from one another, so my full report is rendered as such:

Sub Report 1  | Sub Report 2  | Sub Report 3 
Section 1     | Section 1     | Section 1
a             | a             | a
b             | b             | Section 2
c             | c             | a
Section 2     | d             | b
a             | Section 2     | c
b             | a             | Section 3
c             | b             | a
d             | Section 3     | b
Section 3     | a                       
a

Essentially, what I want to do is have all sections line up, regardless of the amount of data that may be contained in the individual sections:

Sub Report 1  | Sub Report 2  | Sub Report 3 
Section 1     | Section 1     | Section 1
a             | a             | a
b             | b             |
c             | c             |
              | d             |
Section 2     | Section 2     | Section 2
a             | a             | a
b             | b             | b
c             |               | c
d             |               |
Section 3     | Section 3     | Section 3
a             | a             | a
              |               | b

Please note, I am using the Crystal Reports plugin for Visual Studio 2010. I do not have access to the full Crystal Reports.

Was it helpful?

Solution

All your sub reports must be linked to a common field in order to line up correctly. Something like DATE or TIME, COLOR, PRICE. What ever would be the same DATA in each of your data sources. Your main report should report at least that field. Right click on the sub report to manage individual sub report links.

In Crystal Reports 10 exporting with multiple sub reports. All data from the main report is forced left unless there is data from the sub in front of it. If all sub reports are placed to the right of all info being reported in your main report, and everything is lined up correctly... your columns and rows should export correctly to a

    • TAB separated file.
      From there, import your file to excel using the "text to column wizard".

I am not having success exporting direct to an excel worksheet. BUT, it works famously by exporting to a TAB Separated Text File and then importing to excel via the TEXT to COLUMN wizard.

OTHER TIPS

You can try to place the subreport in the details section then go to section experts, select details and check "Format with multiple columns". Then set the number of columns to 3 and try how the report will run. This will work just in case you can make the subreport to use the same datasource.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top