![]() |
|
#1
|
|||
|
|||
|
Is there a way to pass the table from my main form to my QReport form, unit1 to unit2? I don't want to have to make a new connection in the QReport window since I'm connecting to a MySQL DB on a server on the net it takes a long time to get the table, and since I already have what I want in the main form?? I have a DB connection, then an SQL table since I run a filter then I have a DataSource, regular. How do I pass this info over to the other form without re-downloading?
Thanks in advance. |
|
#2
|
|||
|
|||
|
You should put the second form into the USES clause, the one after "implementation." Then that info will be available.
George |
|
#3
|
|||
|
|||
|
As GeoWink said, put unit2 (the report unit) in USES clause of unit1 (main form) and the use the bellow code:
Code:
//QuickReport1 is in unit2 and Table1 is in unit1. QuickReport1.DataSet := Table1;
__________________
Regards, Abdulaziz Jasser |
|
#4
|
|||
|
|||
|
Or:
Code:
Unit2.QuickReport1.DataSet := Table1;
__________________
Regards, Abdulaziz Jasser |
|
#5
|
|||
|
|||
|
Perfect I wasn't getting it to pass the parameters to the other form, but were good now thanks.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|