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

How do I get subreport to print with other detail?

Status
Not open for further replies.

deborahyr

Technical User
Nov 14, 2002
63
US
I created a subreport for a couple fields that I inserted on my main report's detail. When I export the report to excel, the subreport prints on its own row instead of in the columns with other details - how can I get the subreport columns to stay and appear as columns with the main report?
 
Are you putting the subreport with the detail line, with the values inside the subreport? If so, make the subreport tiny and invisible, in a very thin section all by itself. Use Shared Variables to get the values from the subreports to the main report. (Look up Shared Variables using SEARCH if you don't know them.)

I am assuming it is fresh data for each detail line. If not, minimising the number of times you call a subreport will speed the overall run.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options. Exports to Excel are one such.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
I am using Crystal 11. Yes, I was putting the subreport on same detail line as main report fields. I searched Shared Variables and tried following directions for creations but now can't get data to display in the variable fields.

Main report formula is this -

whileprintingrecords;
shared dateVar finaltermdt; finaltermdt

Sub report formula is this and is suppressed -

whileprintingrecords;
shared dateVar finaltermdt := {FJBEVNT.FJBEVNT_EFF_DT} ;
 
Try un-suppressing it

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
If you use the regular Excel export, not data only, you should be able to export the sub on the same line. You have to make all fields (incuding the sub) the same height, bu using format->make same size->same height. Then align the fields/sub by connecting them to gridlines both vertically and horizontally. With subs it is harder to do, as the corners don't turn red as fields do when they are attached. You can test whether the sub is connected by moving the gridlines. Once attached, the sub should export appropriately.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top