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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to display results from two disparate subreports in one report 1

Status
Not open for further replies.

PDAnalyst

Technical User
Dec 2, 2005
72
US
Hi all.
I am running CR 9 (or XI) with Windows XP linking to an SQL 2003 database through ODBC that contains numerous tables. I am trying to pull certain values from two subreports that cannot be linked together (thus having one main report and one subreport is not an option since they have no common table to link these two with). The only thing that is common is that the reports have to query all of the incidents that occurred within the last week (one subreport is for the citations issued, the other is for the reports taken).
I have set up the last 7 days query in both of the reports and it works (I also can pass this date query from the main report). My supervisors want only a single report to display results from these two subreports displayed in the same main report.
I have not come across any similar threads. Does anyone have any idea how I can get this to pull and display two sub-reports in one main report?
 
Hi,
Clarify, please:

Is the data for
citations issued
is a dfiierent table ( or set of tables)
than the data for
reports taken



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
The Citations information actually comes from two tables. One is a core table that has general information and the other is the citation details table that are linked to each other by a primary key of the citation number. The Offenses information actually comes from 3 tables. One is the core table, other is the details and the third is the master name table that has the personal information of the offending party. These tables are linked by the incident number key.

So as you can see, there is no key that is common in both the citations info and the offense info.
Thanks
 
Hi,
Perhaps a Stored Procedure in the database can create
the dataset you need by using some kind of UNION logic to combine the 2 disparate data sources..
Although with non-similar fields and field names you would need to somehow alias them to appear the same.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Subreports do not have to be linked to one another. You can place one report as a subreport in the report header or report footer of the other report. It sounds though like you might want to use a date parameter in each report and then you could link the parameters to each other so that you got only one prompt.

-LB
 
lbass,

you saved me again,

I did place the second report into the report footer section and using a variabel passed the date to it. Worked like a charm,

THANKS AGAIN,

Safa

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top