This topic is locked
[SOLVED]

 Open A report direct from List Page

2/25/2008 9:00:32 AM
PHPRunner General questions
C
ckapote author

Hi , Can You Help?
I have table with name tblcrew and field :

idc - Primary Key

Surname

Name

connect
I have created a Report based on that table . What I need is to add a button
in the list page of tblcrew ( next to view link ) and when click on that button

to open the report page for that specific crew member .

Otherwise I have to open the report search for a crew member and then view the

details .
Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7677&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />

J
Jane 2/26/2008

Hi,
to create link edit your page on the Visual Editor tab manually.

Pass member id through URL and then add where clause to SQL query on the Report page: Before SQL query event on the Events tab.

C
ckapote author 2/27/2008

Hi,

to create link edit your page on the Visual Editor tab manually.

Pass member id through URL and then add where clause to SQL query on the Report page: Before SQL query event on the Events tab.


Thanks , can you provide me with the script ??
Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=26410&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />

J
Jane 2/27/2008

Hi,
use view or edit link as a sample for your new link.
To add where clause use this code in the Report page: Before SQL query event:

if ($_REQUEST["member_id"])

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

C
ckapote author 3/13/2008

Hi,

use view or edit link as a sample for your new link.
To add where clause use this code in the Report page: Before SQL query event:



Thank I have edit the view button to open the report page instead the view page

I have add the above where clause in the report , but still

all the entries are open instead the one in the specific row.

FYI on the address line it shows

https://localhost/tblAgent2_Report_re...php?editid1=972
where 972 is the correct entries id but all the records are coming up instead the 972 in the report.
PLease help!

J
Jane 3/13/2008

Chris,
replace $_REQUEST["member_id"] with this one:

$_REQUEST["editid1"]



in your code.

C
ckapote author 3/13/2008

Chris,

replace $_REQUEST["member_id"] with this one:
in your code.


Thanks , I used the following where IdCounter is the link key and working fine !! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=26952&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
if ($_REQUEST["editid1"])
{
$strWhereClause = whereAdd("IdCounter=".$_REQUEST["editid1"],$strWhereClause);
}