PDA

Click to See Complete Forum and Search --> : How to Show Report?


Plucky
Mar 27th, 2006, 02:27 AM
Hi there,
I developed a program using VB6 with MS Access 2000. Data is saving in Access 2000 fine. And i'm using Seagate Crystal Reporting 8 for reporting. But i do not know how to show report like (From Date: 01-02-2006 To: 31-02-2006). I want to let user enter date from how many dates he wants data. I think "select" command will work here. But dont' know how to. Please help me.. in detail..
thanx

Just a noob
Mar 27th, 2006, 03:28 AM
Try to use SelectionFormula

Plucky
Mar 27th, 2006, 04:41 AM
Mr. Just a nood

Please define how can i apply SelectionFormula ?

Just a noob
Mar 27th, 2006, 05:38 AM
With Selection Formula we just send to the report for specific statements of SQL and let the report works for us to get all data by that statements. But crystal reports using their langs and they call it Crystal Syntax and a little bit difference with usual SQL statements.

See this link on how to implement selection formula (http://support.businessobjects.com/documentation/product_guides/cr_net/vs_2005/html/crtsktutorialscrvselectionformulacode.htm)


Regard, Noob

Al42
Mar 27th, 2006, 11:23 AM
Or select your own record set and send that recordset to the report. VB is a lot more flexible than Crystal Syntax, as far as I'm concerned.

Hack
Mar 27th, 2006, 11:31 AM
Moved to reporting section

brucevde
Mar 28th, 2006, 05:29 PM
You have several options but it depends on how you have setup your report. As already mentioned you can modify the SelectionFormula. Another option is to add parameters to your report. Then modify the selection formula in Crystal (Report -> Edit Selection Formula -> Record menu).

For example, a report using the Northwind.Orders table which has two Date (not DateTime) parameters called FromDate and ToDate.

The Record Selection Formula using Crystal Syntax would be

{Orders.OrderDate} In {?FromDate} to {?ToDate}

If you set the parameters to Jan 1 1997 and Dec 31 1997

The sql statement generated by Crystal would be

SELECT
Orders.CustomerID, Orders.OrderDate
FROM
Northwind.dbo.Orders Orders
WHERE
Orders.OrderDate >= "Jan 1 1997 00:00:00AM" AND
Orders.OrderDate < "Jan 1 1998 00:00:00AM"

noielen
Mar 28th, 2006, 06:33 PM
Plucky,

What have you done so far now?

noielen