This topic is locked

Security Group from a Query

10/15/2007 1:11:55 PM
PHPRunner General questions
P
phpwalker author

I have a table of users

a table of devices

and a report/view of devices and their data (uses a query combining a data table and devices table)
the user table and the devices table both have a field called "security group"
When someone runs the report / view, i would like to set the security group using the devices table field as pulled from the query.
here is an example of the query for the report/view:
SELECT

`Rdata`.`msgid`,

`Rdata`.`time`,

`Rdata`.`from`,

`Rdata`.`to`,

`Rdata`.`subject`,

`Rdata`.`encoding`,

`Rdata`.`body`,

`Rdata`.`status`,

`Rdata`.`lat`,

`Rdata`.`lon`,

`Rdata`.`dlvrdFailedtime`,

`Rdata`.`deviceName`,

`Rdata`.`reason`,

`Rdata`.`hexstring`,

`Rdata`.`speed`,

`Rdata`.`heading`,

`Rdata`.`extvoltage`,

`Rdata`.`battchargetemp`,

`Rdata`.`ambienttemp`,

`Rdata`.`mapit`,

`Rdata`.`confNum`,

`Rdata`.`batteryvoltage`,

`devices`.`securitygroup`,

`devices`.`carNum`,

`devices`.`carType`

FROM

`Rdata`

Left Outer Join `devices` ON `Rdata`.`deviceName` = `devices`.`CharacterName`
you can see that the securitygroup is showing up here...
however, when i go to security screen in php runner... and click on advanced ... use the dropdown to get my report/view... i see only fields from the Rdata table and not from the devices table... so i am unable to select the security group as the Main Table: OwnerID field.
is there a way to get the security group from a query like this?

Alexey admin 10/17/2007

Hi,
I see what you saying.

Recreate your report on the Datasource table tab in PHPRunner.

Make it based on devices table.

Then enter the same SQL string on Edit SQL query tag.
We'll find a way to resolve this issue automatically in the next version of PHPRunner.

P
phpwalker author 10/18/2007

Hi,

I see what you saying.

Recreate your report on the Datasource table tab in PHPRunner.

Make it based on devices table.

Then enter the same SQL string on Edit SQL query tag.
We'll find a way to resolve this issue automatically in the next version of PHPRunner.


NOTE Too... when i base the report on the devices table ... I am not able to sort on a field from another table in the query (sorting only allows you to sort by fields within the table that the view is based on).
karen