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

Dynamic Header / Footer Subreports 1

Status
Not open for further replies.

CrystalDuck

Programmer
Feb 2, 2005
16
US
I have a bit of a problem, and am wondering if I can avoid making several versions of the same report just to accomodate the size of the page.

First of all, I just began using CR 10. And am still farely new to it. But I've been using Crystal since before version 7 so I'm pretty familiar with most everything in Crystal REports, despite the version. But of course, you never know what's changed from version to version until you stumble across it.
I am in the midst of creating a few "canned" reports for a new application my company is producing. Each of these reports has a header and footer, which I have created as subreports to allow the one subreport to serve as header for all the reports. This way, if logo, or company information changes, I won't have to touch all 25 reports to correct it.

My problem is actually three fold, but all related to the header and footer, so bare with me. :)

Okay, Question #1:
Can a subreport grow and shrink to dynamically fit the page it is a part of. For example several of the reports it will be at the top or bottom of, are landscape, letter size. But others are Letter size, portrait, and even a couple are landscape, legal. I want the header or footer respectively, to fit the page it is on.

Question #2:
I know I can CREATE a report without a database connection. For this header and footer that is ideal. BUT, to link to the main report and make the formula from the subreport link to the report Title in the Main report...what do I need to do?

Question #3:
And finally, if I DO need to use a database connection with the subreport to be able to connect to a main report(s)...I have 4 different databases that these reports will be coming from. Do I have to make one set of header/footer subreports for each database?

I hope I've made proper sense and someone will be able to help me. This is driving me bonkers. *ha*

Thanks a million in advance!

CrystalDuck
 
Q1 - No
Q2 - either use parameters between reports - right click on subreport and choose "Change Subreport Links" - and then link the parameter of the main report to the sub or
Use shared variables to pass values to and from reports.

CrystalDuck - I would not do what you are doing. Subreports create overhead and should not be used unless there is no other way.

Whether you need to re-import or re-insert a new subreport in 25 main reports or physically go into each one and remove/replace a logo - it would take the same amount of time.

Hope this helps

paulmarr
 
You make a good point, paulmarr. I hadn't really thought about that. Thank you for your input, and I think I will take your advice and put the headers and footers in the report itself. I think it might be even more maintainance with the subreports, if it ever did come to pass that something would have to be changed. Thanks again for your input.

CrystalDuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top