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!

SubReport Links cause Subreport to dissapear 1

Status
Not open for further replies.

CrystalQB

Programmer
Jan 9, 2008
18
US
Hoping someone can help point me in the right direction...
I am working with CR9 and SQL Server 2000 Stored Procedures. My report is a PO Form that requires many subreports. I've been able to combine some fo the main form data and eliminate a few of the subreports, but not all.
Now, all the sub reports are based off stored procedures. And each of these stored procedures has @PO_NUMBER & @COMPANY as thier parameters.

In the report, I created let's say three subreports. After I've created them, I run the preview for each and they are fine...I run the whole report and get multiple parameters for all the @PO_NUMBER and @Company parameters in each subreport. So I realize I haven't set up the sub report links...but I go ahead and fill in all the subreport parameter and run it once, and all the subreports and main report data display fin. But then I go set up the subreport links...and try again...this time the subreports dissapear.

When I set up the subreport links, it was like this:
For Subreport : [HeaderComm]
Available fields: [those from the main report]
Fields to link to:[MainRpt.PO_NUMBER & MainRpt.COMPANY]
Subreport Parameter field to use:?PO_NUMBER & ?COMPANY
Select Data in Subreport based on field: [Grayed out]

Hope this makes sense...oh and one more thing...the subreport links don't seem to stick...sometimes I go in, and there are no links for a particular subreport, that I JUST set. Any idea what gives??

Am I doing something wrong?? Probably so.
So any correction in direction you guys can give me would be greatly appreciated. :)

Thanks,
CrystalQB
 
Where in the main report (what section(s)) are you placing the subs? I think you should be creating the same parameters in the main report as in the subs (instead of using main report fields), and then linking the parameters to each other, by using the dropdown in the lower left corner of the subreport linking screen to select the actual parameter {?parm} instead of {?pm-?parm}.

-LB
 
The subreports are all in different secions...two in the Header one in the details , etc.

And yes, I am already doing the {?Parm} not the {?pm-?Parm}

And as of right now, I have no CRYSTAL parameters...only the parms from the stored proccedure that are being carried over.

-CQB
 
But you are using fields from the main report--I am suggesting that you should create the same parameters in the main report and connect the sub parameters to the main report parameters.

-LB
 
Sorry for my ignorance, I got it now.

The fields I was chosing were indeed just fields ... not the parameter fields.

Sorry for the confusion, and thank you for setting me straight. :)


CrystalQB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top