E
Everaldo Ricardo
views doesn´t accept parameters, I suggest you to do a stored procedure,
creating a temporary table
Everaldo Ricardo - Brazil
creating a temporary table
Everaldo Ricardo - Brazil
Duong Nguyen said:Hello!
Thank you very much!
OK, I have created a Store Procedure like you told, But please help me how
to make a Crystal Report with a datasource = StoreProcedure?
I am waiting for your help!
Thanks again!
Regards!
Everaldo Ricardo said:views doesn´t accept parameters, I suggest you to do a stored procedure,
creating a temporary table
Everaldo Ricardo - Brazil
Duong Nguyen said:Hello!
I have 2 tables: The first is ExportProducts (CheckID, Date, ProductID,
Quantity, Price, Total), and the second table Payments(ID, Date, CheckID,
PaySum) to store every all the payments for one check in
ExportProducts (
the CheckID to pay, The date of payment, and the paysum)
For example:
ExportProducts
CheckID Date ProductID Quantity
Price Total
1 06/05/2005 PR0001 100
150.00 150000.00
2 06/21/2005 PR0004 200
120.00 240000.00
And the table Paymetns
id Date CheckID PaySum
1 06/07/2005 1 5000.00
2 06/13/2005 1 7000.00
3 06/16/2005 1 3000.00
4 06/24/2005 2 10000.00
And now I must get a report All the Checks before a concrete date and
thier
payments and remain sum.
If I don't need notice to the Date, I can do it like that
Create A View:
PaymentView:
SELECT CheckID, SUM(PaySum) AS PaySum
FROM dbo.Payments
GROUP BY CheckID
And the Second View:
SELECT dbo.ExportProducts.CheckID, dbo.ExportProducts.[Date],
dbo.ExportProducts.ProductID, dbo.ExportProducts.Quantity,
dbo.ExportProducts.Total, dbo.PaymentView.PaySum
FROM dbo.ExportProducts LEFT OUTER JOIN
dbo.PaymentView ON dbo.ExportProducts.CheckID =
dbo.PaymentView.CheckID
- Now I create a Crystal Report with the Command like Second View.
It works OK, but my Task is getting report with a concrete date. so I must
assign somewhere a parameter of date....I don't know how to do it.
Pls Help me!
Thanks in advance!
Everaldo Ricardo said:views doesn´t accept parameters, I suggest you to do a stored procedure,
creating a temporary table
Everaldo Ricardo - Brazil
Duong Nguyen said:Hello!
I have 2 tables: The first is ExportProducts (CheckID, Date, ProductID,
Quantity, Price, Total), and the second table Payments(ID, Date, CheckID,
PaySum) to store every all the payments for one check in ExportProducts (
the CheckID to pay, The date of payment, and the paysum)
For example:
ExportProducts
CheckID Date ProductID Quantity
Price Total
1 06/05/2005 PR0001 100
150.00 150000.00
2 06/21/2005 PR0004 200
120.00 240000.00
And the table Paymetns
id Date CheckID PaySum
1 06/07/2005 1 5000.00
2 06/13/2005 1 7000.00
3 06/16/2005 1 3000.00
4 06/24/2005 2 10000.00
And now I must get a report All the Checks before a concrete date and
thier
payments and remain sum.
If I don't need notice to the Date, I can do it like that
Create A View:
PaymentView:
SELECT CheckID, SUM(PaySum) AS PaySum
FROM dbo.Payments
GROUP BY CheckID
And the Second View:
SELECT dbo.ExportProducts.CheckID, dbo.ExportProducts.[Date],
dbo.ExportProducts.ProductID, dbo.ExportProducts.Quantity,
dbo.ExportProducts.Total, dbo.PaymentView.PaySum
FROM dbo.ExportProducts LEFT OUTER JOIN
dbo.PaymentView ON dbo.ExportProducts.CheckID =
dbo.PaymentView.CheckID
- Now I create a Crystal Report with the Command like Second View.
It works OK, but my Task is getting report with a concrete date. so I must
assign somewhere a parameter of date....I don't know how to do it.
Pls Help me!
Thanks in advance!