-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
Delphi To/From
To/FromCODEGuides
Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi Single User Apps Topic   Print This     

Printing from DBGrid

Printing from DBGrid in Delphi Single User Apps topic (part of our Pascal and Delphi Coding group).

Quick Search: Printing   Printing DBGrid  
Mido
 (Inactive)
-- USA
Hi all,
I have two forms .... the first one I used ADOQuery to search the Table and put the result in the DBGrid at the same form, when I press the button I should see the result of searching in the second form in the QReport .
any Idea ???? Confused Roll Eyes Big Grin!

Thanx
 Posted 24 years ago (Thread Starter)
Comment Quote
About Mido
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1710, 10 replies
Thread Started 4/10/2001 9:08:00 PM
View Counter=3194
Last Reply Posted 7/3/2022 1:51:10 PM)
Location=-- USA 
Joined=24 years ago   MB Posts=21  
Mido
 (Inactive)
-- USA
Dear Sir,

Thanx for your reply , but I didn't got what you said .. infact I didn't know how to do it and where should I write it, so could you please exaplaine more.
Thanx again

Regards
 Posted 24 years ago (Thread Starter)
Comment Quote
About Mido
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1745 (Level 1.1)  Reply to 1710
Thread Started 4/15/2001 8:09:00 PM
View Counter=2
Location=-- USA 
Joined=24 years ago   MB Posts=21  
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
Well, here's a simple question.


Is the QReport on the second form linked to a TDataSource that points to the ADOQuery on the first form? Perhaps that's the problem.


This ususally trips folks up the first time they try it. Be sure that the uses section of the QReport form includes the form with the ADOQuery on it.


In the DataSource's DataSet attribute, the ADOQuery may not show up in the drop-down list, but you can type in the reference as a member of the first form, like in this example:

Unit QForm;
...
MyQuery : TADOQuery;
...
Unit ReportForm;
...
RptSource : TDataSource;
...


RptSource.DataSet := QForm.MyQuery;
 Posted 24 years ago
Comment Quote
About Scott Wehrly
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1714 (Level 1.2)  Reply to 1710
Reply Posted 4/11/2001 4:15:00 AM
Location=Las Vegas, NV USA 
Joined=23 years ago   MB Posts=442   KB Posts=19  
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
O-o-o-k-a-a-a-y-y... Big Grin!

Well, I can't know what your unit names or component names are, so I have to just provide a generic example to demonstrate what I meant.

I see now in the code example I showed above that I didn't make it clear enough (and I got the RptSource wrong...). Let me break it down better. I can't do screen shots in this forum, so you'll have to do with lines of code.

__________________________________________________

Let's take the one form with the TADOQuery, and the DBGrid. I think it would look something like this:

Unit QForm;
type
TMyQForm = class(TForm)
MyQuery : TADOQuery;
MySource : TDataSource;
MyGrid : TDBGrid;
... (other components)


with attribute settings that probably look something like this:

MySource.DataSet = MyQuery
MyGrid.DataSource = MySource
MyQuery.Active = True


Okay? This is something like what you should already have on the first form.

__________________________________________________

Now, about the second form. Here's a guess at what should be there:

Unit ReportForm;
type
TRptForm = class(TForm)
MyReport : TQuickRep;


Okay...mea culpa. Here's where I screwed up.

The QuickReport has a DataSet attribute. Since the TADOQuery doesn't sit on this form, you have to qualify the name using the name of the unit it resides in. In the DataSet attribute of the TQuickRep (MyReport), you type:

QForm.MyQuery

In code, this would be typed as:

MyReport.DataSet := QForm.MyQuery

If the TADOQuery is Active, or you used the Fields Editor to populate the form with TField components for the TADOQuery, you should be able to select DataField components for all of the QuickReport's Database variables.

For instance, let's say that you have a TQRDBText component on the QuickReport labeled as "First Name". And let's say that the TADOQuery includes a FirstName field, assigned to a TStringField component named MyQueryFirstName.

In code, you would assign the QuickReport's Database field to the TADOQuery's corresponding field like this:

QRDBFirstName.Data:= QForm.MyQueryFirstName

__________________________________________________


I hope that this is enough.
 Posted 24 years ago
Comment Quote
About Scott Wehrly
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1749 (Level 1.3)  Reply to 1710
Reply Posted 4/16/2001 5:15:00 AM
Location=Las Vegas, NV USA 
Joined=23 years ago   MB Posts=442   KB Posts=19  
PS_3278
-- --

It is hard to understand how these searches and the backend of a server is working. You can use samedayessay to draw out the relations of different things. Since you use technology then you make your jobs easier.

 Posted 59 months ago
Comment Quote
About PS_3278
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18335 (Level 2) and Parent is 1710
Reply Posted 1/7/2021 11:45:29 PM
Location=-- -- 
Joined=5 years ago   MB Posts=2  
PS_3066
Essay Online
New York, CA USA

For several years company has been providing high quality essay writing services for students at all academic levels including High School, College, University, and Undergraduate. They specialize in preparing essays, reports, and thesis papers on a wide variety of subjects.Each of our papers is 100% original and quality assured. When you purchase your academic paper from them you can feel confident that you are getting an outstanding, completely finished copy with a guaranteed passing grade. They are the experts at emulating student writing - your teacher will never know the difference. Check this summarize articles for free

 Posted 51 months ago
Comment Quote
About PS_3066
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18485 (Level 3) and Parent is 1710
Reply Posted 9/18/2021 4:03:54 AM
Location=New York, CA USA 
Joined=51 months ago   MB Posts=1  
PS_3592
Essay
-- USA

 Hello everyone! My name is Andrey Langma and I work as a reporter for a small local newspaper. I also help write  essays and graduation talks to keep them interesting for everyone. If you need to buy an essay online link: 
Old UBB Archived Link: [URL=https://essay-company.org/homework-help/]best homework service[/URL]
 , take the time to find a reliable service. I am also fond of music and painting.

 Posted 48 months ago
Comment Quote
About PS_3592
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18486 (Level 4) and Parent is 1710
Reply Posted 12/12/2021 3:42:37 AM
Location=-- USA 
Joined=48 months ago   MB Posts=3  
PS_3592
Essay
-- USA

 Hello everyone! My name is Andrey Langma and I work as a reporter for a small local newspaper. I also help write  essays and graduation talks to keep them interesting for everyone. If you need to buy an essay online link: 
Old UBB Archived Link: [URL=https://essay-company.org/homework-help/]best homework service[/URL]
 , take the time to find a reliable service. I am also fond of music and painting.

 Posted 48 months ago
Comment Quote
About PS_3592
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18487 (Level 5) and Parent is 1710
Reply Posted 12/12/2021 3:42:37 AM
Location=-- USA 
Joined=48 months ago   MB Posts=3  
PS_3592
Essay
-- USA

 Hello everyone! My name is Andrey Langma and I work as a reporter for a small local newspaper. I also help write  essays and graduation talks to keep them interesting for everyone. If you need to buy an essay online link: best homework service  , take the time to find a reliable service. I am also fond of music and painting.

 Posted 48 months ago
Comment Quote
About PS_3592
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18488 (Level 6) and Parent is 1710
Reply Posted 12/12/2021 3:42:37 AM
Location=-- USA 
Joined=48 months ago   MB Posts=3  
PS_3241
0

казино вулкан бесплатноhttps://vulkanvegas.company/ru/category/classic-slots - простая регистрация и безопасные платежи. Играйте в вулкан автоматы с мобильных устройств и ПК, выводите деньги в любое время суток.

 Posted 41 months ago
Comment Quote
About PS_3241
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18500 (Level 1.1)  Reply to 18488 and Parent is 1710
Thread Started 7/3/2022 1:50:15 PM
Location=0 
Joined=42 months ago   MB Posts=2  
Most Recent Post
PS_3241
0

казино вулкан бесплатноhttps://vulkanvegas.company/ru/category/classic-slots - простая регистрация и безопасные платежи. Играйте в вулкан автоматы с мобильных устройств и ПК, выводите деньги в любое время суток.

 Posted 41 months ago
Comment Quote
About PS_3241
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18501 (Level 1.2)  Reply to 18488 and Parent is 1710
Reply Posted 7/3/2022 1:50:15 PM
Location=0 
Joined=42 months ago   MB Posts=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1163A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #1710 Counter
3194
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]