This topic is locked

Use Search page as Main Page and the have 4 reports as the ouput

3/10/2008 9:54:36 PM
PHPRunner General questions
W
wholly author
  1. I want to use the search page as the Main page
  2. After I select the search requirements, I want it to output say 4 reports all on the one web page.
    How do I do this easly. (I am not an experienced coder)
    Thanks

J
Jane 3/11/2008

Hi,
to redirect to the advanced search page first use Report page: Before process event on the Events tab.

Here is a sample:

if ($_REQUEST["a"]!="search" && $_REQUEST["a"]!="advsearch")

{

header("Location: tablename_search.php");

exit();

}


To combine info from two or more reports edit SQL query on the Edit SQL query tab. Use JOIN clause for this purpose.

W
wholly author 3/12/2008

Hi,

to redirect to the advanced search page first use Report page: Before process event on the Events tab.

Here is a sample:
To combine info from two or more reports edit SQL query on the Edit SQL query tab. Use JOIN clause for this purpose.


Jane,
That code works great, however, I still have a few issues that were not answered.

  1. Is it possible to have the advanced search page be the main menu
  2. When the staff enter the date range, I would like say 4 reports to be show on one page. (listed below is some of the sql). at this time I have created 2 reports (individually) - Really a dashboard
  3. How do I get the date range from the search page to show on the report. eg. Report from DatePart to DatePart
    Report 1: Colour Procedures

    SELECT

    docketline.line_id,

    docket.docket_date,

    docket.docket_id,

    customer.customer_id,

    staff.docket_name,

    staff.staff_id,

    stock.cat1,

    stock.cat2,

    count(stock.cat2),

    date(docket.docket_date) as DatePart,

    stock.description

    FROM

    docket

    Inner Join docketline ON docketline.docket_id = docket.docket_id

    Inner Join customer ON customer.customer_id = docket.customer_id

    Inner Join staff ON staff.staff_id = docket.staff_id

    Inner Join stock ON stock.stock_id = docketline.stock_id

    WHERE

    stock.cat1 = 'COLOR' AND

    (stock.cat2 = 'COLOR' OR

    stock.cat2 = 'FOILS' )

    group by

    staff.staff_id
    Report 2: Date range of Store Sales

    SELECT

    docketline.line_id,

    docketline.stock_id,

    docketline.sell_inc,

    docket.docket_date,

    date(docket.docket_date) as DatePart,

    docketline.docket_id,

    Sum(docketline.sell_inc),

    staff.docket_name

    FROM

    docket

    Inner Join docketline ON docketline.docket_id = docket.docket_id

    Inner Join stock ON stock.stock_id = docketline.stock_id

    Inner Join staff ON docket.staff_id = staff.staff_id

    GROUP BY

    docket.staff_id
    Report 1:
    [font=Arial]Colours Serviced

    **

    75**
    Report 2:
    adele

    $2,486.20

    $2,692.80

    $2,617.10

    $485.50

    $81.00

    [font=Tahoma]Period Sales

    $8,362.60
    The pasrted tables don't replicated well.
    Thanks in advance

S
swanside 3/13/2008

On the advanced search page, on date, use the drop down box, and select between. Another date range box will appear, Enter the two dates in these boxes.

J
Jane 3/13/2008

Hi,
to place link to advanced search page on the menu edit it in the HTML mode on the Visual Editor tab.
Unfortunately it's impossible to display two reports on the same page. As workaround you can create custom event (Insert PHP code snippet option on the Visual Editor tab), select data from second table and print it on the page.

S
steveh 4/16/2008

Seems to be a problem with pagination using that method, they get thrown to the search screen each time they try to move to the next page of a report?
It would eb a useful addition to have a parameters page for a report as I'd think most reports would want this?