borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Printing barcode along with text)Next Topic (Printing size different from actual setting) New Topic New Poll Post Reply
AndreaVB Forum : Printing : How to print a report between 2 dates?
Poster Message
is269
Level: Scholar

Registered: 24-02-2004
Posts: 35

icon How to print a report between 2 dates?

Hi all,

I am inputting the customer details on arrival basis to the database.

I've placed TWO DTpicker controls on the form, & wud like to print the customer report between 2 different dates.

Your help is highly appreciated.

Thanks

01-03-2005 at 12:54 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How to print a report between 2 dates?

Hi

Can you give us a bit more info please.

Are you using crystal, data reports or your own code.

Are you using a data control or a reference

Whats your db please Access / SQL Server or other.

Cheers Steve

01-03-2005 at 01:18 PM
View Profile Send Email to User Show All Posts | Quote Reply
is269
Level: Scholar

Registered: 24-02-2004
Posts: 35
icon Re: How to print a report between 2 dates?

Hi Steve,

I am using Data report, Data Enviroment with DB SQL Server.

Hope you can help me with the above info.

Thanks in advance.




quote]steve_w wrote:
Hi

Can you give us a bit more info please.

Are you using crystal, data reports or your own code.

Are you using a data control or a reference

Whats your db please Access / SQL Server or other.

Cheers Steve



03-03-2005 at 07:50 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How to print a report between 2 dates?

Hi

I set up a dataenvironment and datareport to use an sql command in the designer.


Then at run time modify the sql command as below
Private Sub Command1_Click()

    DataEnvironment1.Commands(1).CommandText = "select * from tablename where date = '" & DTPicker1 & "'"

    DataEnvironment1.rsCommand1.Open
    
    DataReport1.Show 1

    DataEnvironment1.rsCommand1.Close


End Sub


I chose to equal the date but you could have
where date >= '" & dtpicker1 & "' and date < '" & dtpicker2 & "'"


Steve  

04-03-2005 at 09:52 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : How to print a report between 2 dates?
Previous Topic (Printing barcode along with text)Next Topic (Printing size different from actual setting) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder