This topic is locked
[SOLVED]

 Show with $i++ in report list

9/5/2010 5:25:53 PM
PHPRunner General questions
A
afa1999 author

Hi,

For a newbee first thanks for your help

I have a table with cat and sub cat like this:

InvID

Cat

SubCat

Description

WhereUsed
At report page I want to add and show a new column with the number of row like not with InvID, it will be a new number list like below.
No Cat Subcat Where

1 Car 4X4 Personnel

2 PC Desktop Logistics
At Report Page:Befor Display I created code like this
for($i=1;$i<100;$i++)

$xt->assign("No",$i);
But shows all No fields 99, and

if I change to $i<10 it reflects 9
Just I want to show the row number at the No column increasing truely

Is it possible

Or is it possible in Query tab ?

Thanks

A
ann 9/9/2010

Hi,
you can create an alias for any field on the Edit SQL query tab and then setup it as Custom on the View as settings dialog on the Visual Editor tab.

Type the following code:

$value=$_SESSION["No"];

$_SESSION["No"]=$_SESSION["No"]+1;



Define Session variable in the Before process event:

$_SESSION["No"]=1;
A
afa1999 author 10/3/2010



Hi,
you can create an alias for any field on the Edit SQL query tab and then setup it as Custom on the View as settings dialog on the Visual Editor tab.

Type the following code:

$value=$_SESSION["No"];

$_SESSION["No"]=$_SESSION["No"]+1;



Define Session variable in the Before process event:

$_SESSION["No"]=1;



Thanky you very much.

It worked but when I need to get the lıst to export to excel, the number began with the first not 1 with 51, then I needed to try again, this time it began with 71.

Is there any way to get the list with the beginning 1?

A
afa1999 author 10/3/2010



Thanky you very much.

It worked but when I need to get the list to export to excel, the number began with the first not 1 with 51, then I needed to try again, this time it began with 71.

Is there any way to get the list with the beginning 1?


Thanks again. I fixed.

I added

Define Session variable in the Before process event:

$_SESSION["No"]=1;

to every process event.