Smoothing data inside crystal report

Ok, this might be a weird query, but is it possible to essentially flatten my dataset inside a crystal report?

I have a datatable in C # that was created with a connection, so when it hits the report its 2 entries. Most of the columns have the same data, and the last few display a different address.

Instead of printing the detail section multiple times using mostly similar data, I need to display 1 "record" with the total data printed once, and each record address next to it. As is the case, all common fields are displayed in one area, then next to the address fields from the entry where "AddressType = 1", and then next to the address fields where "AddressType = 2"

Is this part of the information? Because even in the subheadings, I can't get it to print only one section with the data from the first post.

Is this possible with a crystal? On long-term extracts, I cannot flatten the data before it hits the report.

+2


source to share


4 answers


Okay, someone here in the office showed me the way, so I'll put it there.

Given the data with cols A, B, C, all common and D, E different across several lines, here's how I "flattened" the dataset in the die:

  • Create a group based on col A and put A, B, C inside that group header - get rid of the details section entirely.
  • Create subreport in group header for each data row, in my case 2 subreports
  • Within each report, enter fields D, E. Important: There are no links in these reports.
  • For each subsection, enter Select Expert and create a condition that displays only one specific row of data. This condition will have the same field for each subreport, but different values. In my case it is AddressType = 'A' and AddressType = 'B'


This will result in 1 report with one or more characters A, B, C and D, E specified once for each report (once for each data row)

It was confusing, took a long time, and I hate crystal reports now more than ever.

+1


source


That would be pretty ugly, but you could add a group for each common field in the Group Expert, and then display the data for the common fields in the last group header. So if your common fields are field1 through field5, you must create five groups and put all five fields in the group header of field5. Then you have to put unique address fields (call field6 through field 8) in the details section.

Now the trick gets it all to line up correctly. You can set "underline the following sections" in the group header for field 5; this will cause field1 through field 5 to "fall" into the details section. You just need to make sure that field 6 through field 8 is to the right of field1 to field5 so the text doesn't overlap.



Now if you want the two address records to be printed horizontally, I think you need a multi-column subheading for that. But the same principle applies - just make sure the subfile is to the right of field1 to field5 so the data doesn't overlap.

0


source


Have you tried the parameter suppress if duplicated

in every field without an address?

Otherwise, you can group by common ID, put common fields in that header, and then display multiple addresses in the details section.

Or, you can remove addresses from the data source and use a subheading to retrieve that data for each record. This will bypass the connection and be the slowest performance option, due to the presence of select

addresses for each entry.

0


source


Ok, first let's see if I get it right:

You need a report that will be in the format

Address MainDetails (type1)
MainDetails the Address (type2)

instead in the format

MainDetails address (type1) (type2)

?

Assuming there are only two types of addresses, you can do the following:

1) Basic information group (regardless of the unique entry 2) Put the address data in the group header next to it, on the right. 3) Also put the address data in the details section, but they are positioned as if they were in the positions of the Address column (type2), so it looks like this:

GH MainDetails Address
D ....................................... Address

4) Then add sorting to the report by the AddressType field to first display AddressType = 1.
5) Add a conditional suppression form in the Details section that says {AddressType = 1}
6) Using the section expert, in the group heading, check the field "underlay following sections"

This should work as long as the number of addresses is 1 or 2.

0


source







All Articles