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 getting data via ASP & TTX files 1

Status
Not open for further replies.

6064id

IS-IT--Management
Apr 22, 2002
5
IL
Hi
I am searching for few days now a way to pass data to subreport (an ado recordset). I have an example of a main report getting recordset via ado connection but it is not enough. I would really appreciate if some one out there could show me example of who to pass 1st recordset to main report and 2nd recordset to subreport and all in ASP. NOT !!!VB!!!

Thanks in advance to all
 
Well, I don't know what the capabilities of ASP are but if you are passing an ADO recordset off to the main report, this example may work even though I only know it works for certain in VB:

[tt]
Set app = New Application
Set rpt = app.OpenReport("C:\Example.rpt")
With rpt
.Database.Tables("MyMainTable").SetPrivateData 3, rsMainReport
Set rptSub = .OpenSubReport("MySubReport")
rptSub.Database.Tables("MySubTable").SetPrivateData 3, rsSubReport
End With
[/tt]

Hope that example helps. It boils down to opening the subreport using the "OpenSubReport" method. Once you have the subreport open, you can manipulate it the same way that you do the main report.
 
Maybe someone has the exact syntax you need.

If not, ASP syntax is virtually identical to VB syntax, but only if you use the syntax of the RDC object model. Part of the confusion is that CR can use 4 different sets of syntax for VB, and only one set works for ASP. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top