Every time I print a report I want to increment a field. 1001,1002 etc..
i know its just i=i+1 but i donot know the syntax and my help is not installed properly.please help!!
Hi
You can try using the special field RecordNumber to determine the current line number. That should work as long as you aren't conditionally suppressing any detail sections.
If you need to know the # of detail lines per group, you can do it with 2 formulas:
//@Init
//Put this in your Group Header
//(If you want to get the # of lines per page,
// then you can put this in the Page Header instead)
WhilePrintingRecords;
NumberVar lineNum := 0;
//@Increment
//Put this in your Details section
WhilePrintingRecords;
NumberVar lineNum := lineNum + 1;
To force a page break after a certain line number, use a formula for 'New Page After':
WhilePrintingRecords;
NumberVar lineNum;
If lineNum = [whatever your Max is] Then
True
Else
False
My problem is I want to display something like a hit count.Each time I run this report I want to increment hit count like 1001 first time i run the report ..1002 when i run the report 2nd time and so on..thanku
Yes you can
but not how many time the report is been open.
you need an audit table or a report table with name of the
reports in it with a datestamp
there u can count how many time the report has been view by the number of time the report was open
Can you suggest me how I go about creating an audit or report table?? also I was thinking can we create another table in pervasive sql database with a sequence of numbers and display the numbers from there? However I am not sure how to link this table to the existing table in the report..new to using crystal!!
(v8)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.