This topic is locked

Print page visual editor

3/16/2009 7:35:29 AM
ASPRunnerPro General questions
B
bhicks11 author

Hi, I would like to show a field value at the top of the printer friendly page. All the records in the filter have the same PROJECT NAME and I would like to show it at the top of the page rather than with each record. Can this be done?
Thanks in advance.

J
Jane 3/17/2009

Hi,
use custom event (Insert ASP code snippet option on the Visual Editortab) to select and print PROJECT NAME value on the print page.

Here is just a sample:

str = "select FieldName from TableName"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

Response.Write "PROJECT NAME : " & rstmp("FieldName")

rstmp.close

set rstmp=nothing

B
bhicks11 author 3/17/2009

Hi,

use custom event (Insert ASP code snippet option on the Visual Editortab) to select and print PROJECT NAME value on the print page.

Here is just a sample:


I did this and nothing happens. If it helps the Project Name is also the login name.

B
bhicks11 author 3/17/2009



I did this and nothing happens. If it helps the Project Name is also the login name.


Where would it print on the page?

B
bhicks11 author 3/17/2009



I did this and nothing happens. If it helps the Project Name is also the login name.


Thank you Jane - it worked!

B
bhicks11 author 3/18/2009

Hi,

use custom event (Insert ASP code snippet option on the Visual Editortab) to select and print PROJECT NAME value on the print page.

Here is just a sample:


Hi Jane,
This works great except that it doesn't filter for the PROJECT. The user is logging in as the Project Name and I have indicated that the login field relates to the Project field but when I use this code to request the Project name it doesn't return the logged in Project Name (though those are the records showing). Any ideas? Can I somehow retrieve the log in name, which is the correct Project Name?
Thanks.

J
Jane 3/19/2009

Hi,
here is a sample:

str = "select FieldName from TableName where Fieldname2='" & Session("UserID") & "'"