This topic is locked

multiple entries on print page

1/18/2008 3:09:02 PM
PHPRunner General questions
M
Metiz author

I have a project where After I have entered a new database entry, I automatically get linked to the print page with the code
header("Location: gegevens_print.php?editid1=" . $keys["KeyColumnName"]);

exit();
(dutch)
however, when I get to said print page, ALL the entries in the database are dumped there. Is there any way to only view the record I just added like the button "print selected" does?
Also, for some reason, with longer fields like "discription" or the likes, the form only shows the first xx letters and then finishes with "..." is there a way to show all the text I have typed there?
I know, noob questions but please help me
thanks,

Joost

J
Jane 1/21/2008

Hi,
please see my answers below:

  1. to edit SQL query for print page use Print page: Before SQL query event on the Events tab.

    Here is a sample code:
    if ($_REQUEST["editid1"])

    {

    $strWhereClause = whereAdd("KeyColumnName=".$_REQUEST["editid1"],$strWhereClause);

    }


2. to show full values on the print page edit generated ..._print.php file.

Find this code:

$value = ProcessLargeText(GetData($data,"FieldName", ""),"field=FieldName".$keylink,"",MODE_PRINT);

and replace it with this one:

$value = GetData($data,"FieldName", "");

M
Metiz author 1/24/2008

Thank you very much, Jane!
I am almost afraid to ask and I PROMMISE, this is the LAST question, realy <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25151&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />
I'd like to automatically display the current date in my "date" field. I've only got it as far as a checkbox. I use access as my database system. This Is the final problem I'm hicking against
Thank you very much for the answers so far,

Regards,

Joost

J
Jane 1/24/2008

Joost,
use now() as default value on the "Edit as" settings for this purpose.

M
Metiz author 1/24/2008

That did it! thank you very much