Last post Jul 14, 2018 11:33 AM by mudassarkhan
Jul 14, 2018 06:17 AM|JagjitSingh|LINK
In expression i have written
=Code.writeRow() . In Code i have written below code
Dim rownumber = 0
rownumber = rownumber + 1
When i run report it shows correct Sr No . When i export to PDF it shows wrong number . Suppose on Screen it shows 1 to 5 but in pdf it shows 6 to 10
Jul 14, 2018 06:47 AM|Rajneesh Verma|LINK
Suppose on Screen it shows 1 to 5 but in pdf it shows 6 to 10
That means "rownumber" variable persist and you are calling WriteRow() again while exporting to PDF.
Have a close look on your code [May be you are calling this method on PageLoad() and while export it called PageLoad() again, If so then do If(!Page.IsPostBack) and call WriteRow() method - Just an assumption]
Jul 14, 2018 11:33 AM|mudassarkhan|LINK
In the PDF export function first line set
rownumber = 0
So it will again start from 1.