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!

Sub Reports in the Main Report

Status
Not open for further replies.
Aug 27, 2003
428
US
Hi Again,

I have several SubReports(20) that I want included in a Main Report.

I am using CE 9 and Sybase 12.x.

I thought it was as easy as just inserting the SubReports in the Page Header section within the Main Report.

SubReports when run separately are fine and show the right grouping, format etc... However when I insert the same SubReports in the Main Report, the Sub Report header is not displayed. The grouping for the SubReport is not reflected in the Main Report.

The SubReports are generated by a mere select from a table.


Example:

SubReport:


CKC SV and SG Accounts Page 1 of 9


Rel# Book_Code Book_Name
1884 5= CKC_MISC
1885 5= CKC_MISC


S:\PackageTemplates\PKG_Wrongbooks.rpt Printed On:


MDK SV and SG Accounts Page 2 of 9


Rel# Book_Code Book_Name
23189 5= TEST
23187 5= TEST


The Main Report has a Report Header :

Reports By APM Page N Of M

I am inserting the SubReport in the Page Header Section of the Main Report. Also, the Main Report itself has not Datasource. What am I doing wrong?

Thanks in advance!
junction123

 
I may be wrong, but I think the Main Report has to have a datasource of some sort in order for data to be processed. You could set up the selection criteria so that there's no data actually processed in the main report, though.

Also, putting the subreports in the Page Header is likely to cause you problems. I would put them either in the Report Header or the Report Footer since you don't have any data showing on the main report.

-D
 
Hi

Inserting the SuBReport in the Report Footer worked. I am unable to get data in the Main Report based on a particular value for a field in the SubReport.

For example:

SubReport:


CKC SV and SG Accounts Page 1 of 9


Rel# Book_Code Book_Name
1884 5= CKC_MISC
1885 5= CKC_MISC


S:\PackageTemplates\PKG_Wrongbooks.rpt Printed On:


MDK SV and SG Accounts Page 2 of 9


Rel# Book_Code Book_Name
23189 5= TEST
23187 5= TEST

Where CKC,MDK are values for column name "inititals" in the table.
In the Main Report, I want all data for initials = CKC only. I am using a parameter called initials in the Main Report. I also have a formula @initials defined as:

{PKG_Wrongbooks.initials} = ("?initials")

where PKG_Wrongbooks is the table and is a datasource for the SubReport and the MainReport.

How can I have the Main Report get me the same result as the query:

select * from PKG_Wrongbooks
where initials = "CKC"
group by initials,rel_nr

Thanks
junction123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top