| View previous topic :: View next topic |
| Author |
Message |
Karl-Heinz Aschenbach Guest
|
Posted: Mon Mar 21, 2005 10:57 am Post subject: Forwarding parameters to a report from FormX |
|
|
I use Borland C++-Builder 6.0.
It is possible to forward parameters from FormX to QuickReportX,
for instance with EditX->Text. But this works per default only, when FormX is
Form1 (=Main Form) and QuickReportX is QuickReport2.
Is there a possibility to do so, that FormX is Form2 and QuickReportX is QuickReport3?
Sincerly
Karl-Heinz
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Mon Mar 21, 2005 2:10 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
Karl-Heinz Aschenbach wrote:
| Quote: | It is possible to forward parameters from FormX to QuickReportX,
|
Of course.
| Quote: | for instance with EditX->Text. But this works per default only, when FormX is
Form1 (=Main Form) and QuickReportX is QuickReport2.
|
Of course not. What makes you think so ?
| Quote: | Is there a possibility to do so, that FormX is Form2 and QuickReportX is QuickReport3?
|
On which form is EditX and on which form is QuickReport3 ?
You have to decide if the code which transfers the data is
part of FormX or of the form that contains QuickReport3.
You might also read the thread 'Problem with data sharing between form'
in this newsgroup. There are of course other solutions.
Hans.
|
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Mon Mar 21, 2005 3:15 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
Hi,
I have already answred you that in the 'ide' group a couple
of days befeore. There is *no difference* if the form is
Form1 or Form999, or the report is QuickReport1 or
QuickReport999.
You must have been made some mistake when you are
testing the code. Follow the examples I presented you
before, or show your own code and we'll help you.
--
Best regards,
Vladimir Stefanovic
"Karl-Heinz Aschenbach" <khasb (AT) web (DOT) de> wrote
| Quote: |
I use Borland C++-Builder 6.0.
It is possible to forward parameters from FormX to QuickReportX,
for instance with EditX->Text. But this works per default only, when FormX
is
Form1 (=Main Form) and QuickReportX is QuickReport2.
Is there a possibility to do so, that FormX is Form2 and QuickReportX is
QuickReport3?
Sincerly
Karl-Heinz
|
|
|
| Back to top |
|
 |
Karl-Heinz Aschenbach Guest
|
Posted: Mon Mar 21, 2005 3:23 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
Hans Galema <notused (AT) notused (DOT) nl> wrote:
| Quote: | Karl-Heinz Aschenbach wrote:
It is possible to forward parameters from FormX to QuickReportX,
Of course.
for instance with EditX->Text. But this works per default only, when FormX is
Form1 (=Main Form) and QuickReportX is QuickReport2.
Of course not. What makes you think so ?
Is there a possibility to do so, that FormX is Form2 and QuickReportX is QuickReport3?
On which form is EditX and on which form is QuickReport3 ?
You have to decide if the code which transfers the data is
part of FormX or of the form that contains QuickReport3.
You might also read the thread 'Problem with data sharing between form'
in this newsgroup. There are of course other solutions.
Hans.
|
Of course not. What makes you think so ?
I probed it much times and it didn't work.
On which form is EditX and on which form is QuickReport3 ?
EditX ist on Form2. QuickReport is build by the C++-Builder and saved on the Hard Disk as QuickReport3. But I believe, it is unimportant. Can try to make it with Form3, well. Mostly didn't come any parameter to QuickReport3. Some times came a notification "Data record locked by another user."
Now I try another variant of the programme. In the menue of the main form ist a point "statement of accounts." On clicking on this point comes a formular to select the name. QuickReport is on this form. But it would be smarter to make this statement of accounts from the form which contains all informations about the account from the participator of the barter union.
Sincerly
Karl-Heinz
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Mon Mar 21, 2005 3:46 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
Karl-Heinz Aschenbach wrote:
| Quote: | Of course not. What makes you think so ?
Of course not. What makes you think so ?
|
Please do not quote an entire mesage and then retype the sentences
you are going to comment on. Just use the quoted sentence then.
| Quote: | I probed it much times and it didn't work.
|
You should tell then what you tried. Otherwise we have to guess.
| Quote: | ..QuickReport is build by the C++-Builder and saved on the Hard Disk as QuickReport3.
|
That is hard to believe. C++Builder will not do that. Your application
(build with c++builder) can write the previeuw to the harddisk.
So you have to distinguish between a .QRP file on the harddisk
and a TQuickRep component on a TForm.
If you can reprase your ploblem ? And please wrap your lines manually
because otherwise you make a selctive reply hard to do.
Hans.
|
|
| Back to top |
|
 |
Karl-Heinz Aschenbach Guest
|
Posted: Mon Mar 21, 2005 8:05 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
| Quote: | That is hard to believe. C++Builder will not do that. Your
application(build with c++builder) can write the previeuw to
the harddisk.
|
Of course: I use the menue File->New->Report
| Quote: | Just use the quoted sentence then.
|
Here's written: press enter at the end of each line
I hope it will be enough to do so how is written here.
Description of my problem:
On Form2 I use a DBComboBox to select a name. I can switch the
DBCombBox2 as DBComboBox2->Visible=false if I want to
present and select the account number of the name.
(Everbody has an account number.) That's why I use the event
OnChange - DBComboBox2->OnChange:
if(DBComboBox2->Visible == true)
Edit2->Text=DBComboBox2->Text;
OnQuickReport3 I want to revise if the parameter has been
transmitted:
QRLabel1->Caption=Form2->Edit2->Text;
But on the Mark QRLabel1 I see : Edit2 - The shown text is:
Edit2.
Sincerly
Karl-Heinz
|
|
| Back to top |
|
 |
Karl-Heinz Aschenbach Guest
|
Posted: Mon Mar 21, 2005 8:27 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
As completition to my description:
Before I press to button "make report!" in Form2
I use the name of the whished person in DBComboBox2
and press enter. I see in Edit2 that the name in
Edit2 has been changed. But when I press the button
"make report" QRLabel1 shows: Edit2.
Sincerely
Karl-Heinz
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Mon Mar 21, 2005 9:26 pm Post subject: Re: Forwarding parameters to a report from FormX |
|
|
Karl-Heinz Aschenbach wrote:
| Quote: | That is hard to believe. C++Builder will not do that. Your
application(build with c++builder) can write the previeuw to
the harddisk.
Of course: I use the menue File->New->Report
|
Indeed a class TQuickReport1 : public TQuickRep
becomes visin;e in the IDE and can be saved in a .cpp file.
It looks the same as when dropping a TQuickRep component on a TForm.
How does one make TQuickReport1 visible ? Assign a Parent ?
| Quote: | On Form2 I use a DBComboBox to select a name. I can switch the
DBCombBox2 as DBComboBox2->Visible=false if I want to
present and select the account number of the name.
(Everbody has an account number.) That's why I use the event
OnChange - DBComboBox2->OnChange:
if(DBComboBox2->Visible == true)
Edit2->Text=DBComboBox2->Text;
|
And where is Editr on ?
| Quote: | OnQuickReport3 I want to revise if the parameter has been
transmitted:
QRLabel1->Caption=Form2->Edit2->Text;
|
One can not place a QRLabel on a TQuickReport1 in design time.
So where is QRLabel placed ?
| Quote: | But on the Mark QRLabel1 I see : Edit2 - The shown text is:
Edit2.
|
Mark ? You have another TEdit on the same container as QRLael that
is also called Edit2 and contains the text 'Edit2' given by the
IDE.
I gave TTQuickReport1 in unit QuickReportUnit2.cpp/.h
a public variable AnsiString MyText;.
Then on a form I plcaed a TButton:
#include "QuickReportUnit2.h"
void __fastcall TForm1::Button2Click(TObject *Sender)
{
QuickReport1->MyText = "DDDDDDDDDDDDDD";
}
That is all;
Hans.
|
|
| Back to top |
|
 |
|