Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB Tools

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2015, 02:20 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Angry Delphi 7 Rave 5 reports database connection

I'm running Delphi 7 and updated Rave 5.0 reports standard freeware edition. I have not used rave before but it looks good. I have a ADO connection to MS access database that's working fine in all respects.
My objective: - I'm taking my clients table to print on a envelope with current record in clients table.
Rave RvProject object is set to the envelope, no problems.
RvDataSetConnection finds the database tables from my DataModule very well but I cannot link RvDataSetConnection to a text object in RvProject object.

I have registry strings that I wish to place in text fields in my RvProject object but I need an appropriate method to insert the text before printing.


Thanks in advance





database
Reply With Quote
  #2  
Old 09-21-2015, 01:46 AM
GeoWink GeoWink is offline
Senior Member
 
Join Date: Jan 2001
Posts: 885
Default

Here is what I do...

On the FormCreate Event I put in the following...

DH := 'c:\YourDirectory' + 'MyDataBase.abs';
DB.Connected := False;
DB.DatabaseFileName := DH;
DB.Connected := True;

I use the Absolute Database.

Then in a RVSystem I put in

with Sender as TBaseReport do
begin
FN := 'SchoolRemarks'; // The table name
with LineQuery do
begin
Close;
SQL.Clear;
SQL.ADD('select * from '''+FN+'''T');
SQL.ADD('order by T.Breaker');
DisableControls;
Open;
EnableControls;
gYPos := 0.6;
I := 0;
while not eof do
begin
gYPos := gYPos + 0.2;
GoToXY(4.25,gYPos);
PrintLeft(FieldByName('TheLine').asString,1.0);
Next;
end;
end;
end;

This prints as many lines as there are in the table. I just like to be simple and straightforward.

George
Reply With Quote
  #3  
Old 09-21-2015, 09:27 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

yes you have set up your data base the same as me

DH := 'c:\YourDirectory' + 'MyDataBase.abs';
DB.Connected := False;
DB.DatabaseFileName := DH;
DB.Connected := True;

I'm very happy with that
Loading RVSystem text objects from code is fine if I new what RVSystem event I can do that with.

I understand RVSystem.exicute executes the print I think.

You see I do not have my head around how to drive RVSystem properly and use its events.
Reply With Quote
  #4  
Old 09-21-2015, 06:25 PM
GeoWink GeoWink is offline
Senior Member
 
Join Date: Jan 2001
Posts: 885
Default

To run the print use

RVSystem1.Execute;

George
Reply With Quote
  #5  
Old 09-22-2015, 01:28 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

1/ Does RVSystem run an event before its print starts.
2/ Can RVSystem be placed in any form I like and can i place 2 separate RVSystem's in a form for separate pages like envelope and A4 page format
Reply With Quote
  #6  
Old 09-22-2015, 02:29 AM
GeoWink GeoWink is offline
Senior Member
 
Join Date: Jan 2001
Posts: 885
Default

Whenever I run RVSystem I get a choice of Preview or Print. You can also do a setup so you can change printers if necessary. Otherwise it uses the default printer. See System Options.

I have some forms that have 20 RVSystems on it. You do as many as you like.

George
Reply With Quote
  #7  
Old 09-22-2015, 02:39 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

Its I'm not use to Rave as its not an normal object.
I will simply load it up before the print in one procedure

I just did not want to upset my database with heaps of trials

Lex Dean.
Reply With Quote
  #8  
Old 09-22-2015, 02:53 AM
GeoWink GeoWink is offline
Senior Member
 
Join Date: Jan 2001
Posts: 885
Default

Not sure what you meant by not a normal object, looks pretty normal to me. Also should not bother any database you have, just write using it, simple.

George
Reply With Quote
  #9  
Old 09-22-2015, 03:58 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

A rave object displays its own form and not an IDE style form. to me that's not normal and more tings can be going behind the seen that I do not know about.

Thats all
Thanks.
Reply With Quote
Reply

Tags
rave

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:53 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.