This topic is locked
[SOLVED]

 How to mark a record as "Printed" ?

3/24/2011 9:48:56 AM
PHPRunner General questions
M
macskafogo author

Hi !
How to mark a record as "Printed" ?
Please help !
Thanks.

Sergey Kornilov admin 3/24/2011

Need more details.
When this needs to be done? How do you actually mark it?

J
Joth 3/24/2011



Hi !
How to mark a record as "Printed" ?
Please help !
Thanks.


I have a need for this too to print a sort of membership card that should only be printed once. Card details are entered by the 'end user' and reviewed by a local group of people. They will print the card on pre-printed forms and each membership card will be issued only once, hence the need for this lock on 'multiple' copies.

J
joker 3/24/2011

You could add another field to your table named "PRINTED". You could add custom SQL statement that sets this field to "YES" on the events tab PRINT PAGE: AFTER RECORD PROCESSED. You could then make your "PRINTED" field read-only or checkbox or whatever you need to display.

J
Jane 3/25/2011

Hi,
to mark record as 'printed' add new field to the table, then change value of this field in the Print page: After record processed event.

To filter records on the list page and not show printed record add WHERE statement to the SQL query on the Edit SQL query tab.

M
macskafogo author 3/29/2011



Hi,
to mark record as 'printed' add new field to the table, then change value of this field in the Print page: After record processed event.

To filter records on the list page and not show printed record add WHERE statement to the SQL query on the Edit SQL query tab.


Hi !
This code is correct ?:
$data["printed"]=="printed";
Thanks.

J
Jane 3/29/2011

Hi,
Here is a sample:

global $dal;

$dal_table=$dal->Table("TableName");

$dal_table->Value["printed"] = "printed";

$dal_table->Param["IDField"] = $data["IDField"];

$dal_table->Update();



where IDField and printed are your actual field names, TableName is your actual table name.

More info:

http://xlinesoft.com/phprunner/docs/data_access_layer.htm

M
macskafogo author 3/30/2011

Thanks.