Ask a Question related to ASP Database, Design and Development.
-
James Campbell #1
pass sql where statement into access report
I am trying to automate production of an Access report via ASP.
I have almost got there apart from the fact that I want to send either an
SQL statment or a value into the SQL within the report:
My code is:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim objAccess
Set objAccess = Server.CreateObject("Access.Application")
objAccess.OpenCurrentDatabase server.MapPath("data.mdb")
objAccess.DoCmd.OutputTo 3, "companycontacts", "Snapshot Format (*.snp)",
"C:\Inetpub\wwwroot\Access_Reports\companycontacts .snp"
objAccess.DoCmd.Quit 2
set objAccess = nothing
response.redirect "index.asp"
%>
The SQL within the report at the moment is:
Select * from companycontacts
However what I would like is to be able to send values like:
where companyname = 'Abacus Lighting Ltd' or companyname = 'Lighting Ltd' or
companyname = 'CSM Ltd'..................
etc, etc, etc
Has anyone come across a way of doing this ???
thanks for any replies
James Campbell
James Campbell Guest
-
Access Report to PDF.
I'm trying to programmaticaly (VBA) export a report as a pdf. I have Adobe Acrobat 4.0 and Distiller 4.0. How can I go about doing this? -
How do I pass a collection type to a prepared statement in Informix-4gl
One way is to construct the string for prepare dynamically - ( the c_sel text ), but I think it will defeat the purpose of using prepared... -
How do I pass a collection type to a prepared statement in Informix-4gl 7.30?
Haven't used 4GL much but maybe you can use a subquery. Store the values in a temp table, then ... and field_color in (select fcolor from... -
Pass Session Variable Value to Crystal Report?
I've got an aspx page that allows the user to select different options whenever they want to run a report. On this page, I have added an... -
how to pass a password to crystal report 9.0 from vb6.0??!
Is there any way passing a password to crystal report 9.0 from Visual Basic 6.0. so that when loading the report in vb6.0., it can connect to the...



Reply With Quote

