|
-
May 15th, 2026, 02:17 PM
#1
Thread Starter
Junior Member
Passing Multiple Parameters Between Forms
I have been trying to figure out, albeit unsuccessfully, the magic trick for passing multiple parameters between Forms.
The first form (frmReportLauncher) is used to select which report (of 9) to generate, and the second (frmReportBrowser) generates and displays the appropriate (unfortunately, Crystal) report in a viewer named crvReportViewer. Unless someone has a better idea, I am attempting to pass the appropriate DataSource, report Query (SQL), .rpt name, and a string to display in the report header. Right now I'm injecting the parameters into a function on the second Form to produce the report.
I've looked at countless posts related to passing parameters between forms. Most of these discuss passing a single parameter, which is fairly easy to do; I already do this elsewhere in my application. A handful discuss passing more than one parameter, but pretty much keep it to two. I figured expanding the scale would work, but no joy. I've tried both a public property approach and a constructor overload approach, but neither worked. I'm hoping someone could give (or point to) an example I can follow to make things work because at this point I have no idea how to make it happen.
TBH, I would rather use FastReports (OpenSource), but unfortunately it doesn't want to work for me either and all examples are C#, which I don't know at all. Using Crystal is a last-resort thing and my headaches are exacerbated by its not working with VS2026; it works with VS2022 though...
Tags for this Thread
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
|