Forums

ASP

This topic is locked

Printing to PDF from Access Report

Posted 25 Jul 2005 15:42:02
1
has voted
25 Jul 2005 15:42:02 Seb Adlington posted:
Hi Guys,

This may be a bit off topic but might come in handy for someone out there.
I am working on a Purchase Order system for a customer which works lovely online and
I had a real headache getting a nice pretty printed purchase order that could span several pages
with continuation sheets etc. I tried using just asp & Javascript code but it was real messy.
I downloaded and purchased some reporting software (www.rptsoftware.com/) which
turns an access report into a pdf or excel sheet etc. Works lovely but my Access skills are
very basic.

Question is. I use a SQL statement to create a Query which I base my Report on - so far so good

--------
SELECT CInt(((b.Retail/1.175)-b.Unit_Cost)/(b.Retail/1.175)*100) AS GP, b.Quantity*Unit_Cost AS TOT, *
FROM PO_Detail AS a, PO_Listing AS b, Suppliers AS c
WHERE (((a.PONumber)=21355) And ((b.PONumber)=21355) And ((a.POSupplierID)=c.Supp_ID));
--------

How do I tell the SQL to expect a parameter? (ie that number 21355 should be a variable)

Thanks

Seb

Replies

Replied 08 Aug 2005 18:26:53
08 Aug 2005 18:26:53 myke black replied:
try creating a query like this:

SELECT CInt(((b.Retail/1.175)-b.Unit_Cost)/(b.Retail/1.175)*100) AS GP, b.Quantity*Unit_Cost AS TOT, *
FROM PO_Detail AS a, PO_Listing AS b, Suppliers AS c
WHERE (((a.PONumber)=[Enter PO Number]) And ((b.PONumber)=[Enter PO Number]) And ((a.POSupplierID)=c.Supp_ID));

it should then prompt you to 'Enter PO Number' when you run the query, and then it will output the results of the query based on when you type in the popup box.


Reply to this topic