Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create one report containing results of 4 different values of a field

Status
Not open for further replies.

TomBoardman

Programmer
Aug 25, 2006
26
US
I am using CR ver. XI in vb.net and want to create one report that shows the record selection for a field that will be incremented from 1 to 4. I'm trying to avoid creating a seperate report for each of the 4 values. I intend to paginate between values. Any help would be apprecriated!

Tom
 
Try posting example data and expected output.

Why would a report show a record selection, and record selections aren't used on fields, they're used against recordsets to limit rows, and what does increment a field mean to you?

-k
 
The report contains 2 tables. In summary, Table 1 contains a column with account numbers and 4 columns of boolean values that signify whether the acount is in area #1, 2,3, and/or 4. Each account could be in more than 1 area. The 2nd table contains a column of accounts and multple columns with numeric values that I will sum.

I want a report that will group all accounts for each area, with each row in the group to show the account and the summed value I mentioned. I am struggling with combining the report for each area into one report that paginates between each area.
 
I think you need to get those 4 fields all into one field. If you have the option of inserting a command, you could create one like this:

Select 'Area1' as type, table1.`area1`, table2.`amt1`, table2.`amt2`
From table1 inner join table2 on
table1.`acctno` = table2.`acctno`
Where table1.`area1` = true

union

Select 'Area2' as type, table1.`area2`, table2.`amt1`, table2.`amt2`
From table1 inner join table2 on
table1.`acctno` = table2.`acctno`
Where table1.`area2` = true

union

Select 'Area3' as type, table1.`area3`, table2.`amt1`, table2.`amt2`
From table1 inner join table2 on
table1.`acctno` = table2.`acctno`
Where table1.`area3` = true

etc. Then you could insert a group on {command.type} and in the section expert, format the group footer to new page after.

-LB
 
Thanks a lot for the great solution, LBass!

It worked fantastic!

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top