Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have attached a qvw that is based on a cross table, I have selected 3 ID's and in the table next to it you
will see in Field1 'spacer'.
What I would like so to place a continous number in Value1, so when I export into excel I can place a page break every 3 spaces.
But I need a number in Value1 to be able to do this, therefore.
Or I simply need ID2 to run 1 to 3 or another ID column
Thanks
Message was edited by: Neil Woodham Apolgies for my tardy response. this is what I was thinking.
HI,
I managed to find a solution.
First all other 'if' statments had to be moved into the load script.
Then when I used Rowno() it worked.
=
if(Value2='Spacer',aggr(RowNo(),ID2a))
I don't think I really understand what you are trying to do. Can you be re-explain what you are hoping for?
I am trying to create a flag in QV, then when I run VBA code I can then code in page breaks.
Thanks,
Hi Neil,
I'm not sure if this is what you need, but have a look.
Regards,
David
Hi,
Thanks for the qvw file, what you have written works and it is good to see how that works, my problem is I need it post selections, so it need to be written into an expression.
As the RecNo is fixed when a selection is made the order number will come through but not continuous.
If it was continous then I could write the following code to add a flag, this can then be written into VBA as a flag to make a page break every other count.
if(floor(RecNo()/2)=RecNo()/2,1,0) as [CT2 Spacer],
Thanks,
RowNo() or RowNo(TOTAL) can be used in the front end. You could use an expression like this in the table:
=If(Mod(RowNo(), 3) = 0, 1, 0)
You probably need
=If(Mod(RowNo(TOTAL), 3) = 0, 1, 0)
Hi,
My problem is that I am using another level of selecting inside the expression.
=
if(Value1='A1' or Value1='A3',If(Mod(RowNo(TOTAL),2)=0,1,0))
Therefore using total rows need to be after selection
So I am lookinf for TOTAL to be post selection
I am not clear on what you are saying here. RowNo() in the front end is based on the chart contents and so it responds to selections as expected...
I think I've solve it. Please check the example in the attachment.
Regards,
David
Hi,
Thanks for this,if you wrapped this expression in another clause, the answer is 2 and 3, where I am after 1 and 2.
=
if(Value1='D2' or Value1='D3',Match(ID2, $(vA)))