This topic is locked

Created File Name

2/11/2008 8:53:06 AM
PHPRunner General questions
hfg author

I have a program that the software company has allowed me to create look but don't touch views using PHPRunner in order to provide my users with additional ways of looking at data. For sometime now we have been scanning related documents and storing them on the same Intranet server that our php files are on.
Each record in the table has a ID number that is unique (and of course the primary key). The files (pdfs) are named the same as the keys.
For example a record with a key number of 012345 has a file named 012345.pdf
All pdfs are stored in the same folder on the server.
I would like to make it so my users could click on a link inside PHPRunner and open the related PDF file. I tried creating the following SQL to do this (the DB is Oracle)
select "ID_NUMBER",

"ID_NUMBER" || '.pdf' as Scan

From "TABLE1"
I then set the View as to File and set the Folder to the proper location on the server. for the Scan field.
When I click on the file hyperlink all I get is a blank screen.
Can this be done without actually storing the name of the file in the database (something I can't do in this case)?
Thanks

J
Jane 2/12/2008

Hi,
you can do it editing your SQL query on the Edit SQL query tab:

select

select "ID_NUMBER",

"ID_NUMBER" as Scan

From "TABLE1"



and using Custom format on the "View as" settings dialog on the Visual Editor tab:

$value = "<a href=\"FolderName/".$value.".pdf\">File</a>";

hfg author 2/12/2008

Hi,

you can do it editing your SQL query on the Edit SQL query tab:
and using Custom format on the "View as" settings dialog on the Visual Editor tab:


I ended up doing something similar. I created the link in the sql like this
'http://webaddress/files/'; || ID_Number || '.pdf' as Scan
and then made Scan's view as a hyperlink.
Thanks for the help