|
-
Jul 22nd, 2004, 10:17 AM
#1
Thread Starter
Lively Member
Crystal Reports - Dynamically add parameter link between subreport and main report
Hi everyone, here's my issue:
I have a Crystal Report with a sub report in the page footer that has a parameter field. I know that to pass a parameter to a sub report you have to have a parameter on the main report and link the two parameters.
My problem is that there are a number of different sub reports so they are added to the report at runtime based on the user's selection along with the parameter passed to the main report.
How can I perform a link between the dynamically added subreport's parameter and them main report's parameter. I see that there is a .Links method under the properties of the subreport but I don't know how to use it and what format it's looking for. Here's my code of the addition of the subreport:
VB Code:
If Not IsNull(rsReports("Footer")) Then
'Page footer
Set crSection = CReport.Sections.Item("PFa")
crSection.Suppress = False
Set crSubReport = crSection.ImportSubreport(strRoot & "\" & rsReports("Footer"), 250, 100)
With crSubReport
.OpenSubreport
.LeftLineStyle = crLSSingleLine
.RightLineStyle = crLSSingleLine
.TopLineStyle = crLSSingleLine
.BottomLineStyle = crLSSingleLine
.KeepTogether = True
[COLOR=red].Links.Add.MainReportField ("?FootData")[/COLOR]
End With
End If
Any help or tips would be appreciated. Thanks a lot in advance.
-
Oct 4th, 2004, 06:12 PM
#2
Frenzied Member
Did you ever find the answer to this? How did you do it with codes?
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
-
Oct 8th, 2004, 04:12 PM
#3
Thread Starter
Lively Member
Sorry for the late reply. I never did find a solution to this or a workaround. I abandoned the subreports and moved on. Sorry.
-
Oct 8th, 2004, 11:19 PM
#4
So what was the equilivalent solution in your other direction?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 11th, 2004, 02:47 PM
#5
Thread Starter
Lively Member
The parameters in my sub reports would have been nice but they weren’t required so I didn't persue in any further. I still have a sub report, I just don't send any parameters to it.
-
Oct 11th, 2004, 02:49 PM
#6
Thanks, was just wondering.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|