cancel
Showing results for 
Search instead for 
Did you mean: 

formula placement

Former Member
0 Kudos

Using VB6 and CR9. Have a two column report with a record counter like: whileprintingrecords; numbervar cnt := cnt +1 in the details section. In the report footer is: whileprintingrecords; numbervar cnt ;totext(cnt,0,"").

The numbervar cnt ;totext always prints in the left column. It would be better to print at the end of the report. So if the last record in the report is in the left column, it should print there. However, if the last record is in the right column it should print at the end of that column.

Is it possible? Any help would be great.

Thank you.

Kim

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Not enough info

Former Member
0 Kudos

Your comment is cryptic and 'not enough info'. What do you mean by your remark? What info to you need?

0 Kudos

I marked as closed because Ludek had moved your post from the SDK forum to the designer forum.

No one replied and you did not add any new info.

Former Member
0 Kudos

if i understand correctly you need a total record count based upon your count formula, is that correct?

use manual running totals and the display formula in the bottom and it should be your final number

Former Member
0 Kudos

sharonamt -The formula shown in the original post gets the record count. The problem is placement at the end of the records irrespective of the column. Right now it shows up only in the left column. If the last record is in the right column, that is where the count should show. any ideas?

Mr. Williams - of course no further info was added since it seemed to me that the problem was clearly stated. And since noone responded, why would any info be added without input?

Former Member
0 Kudos

The numbervar cnt ;totext always prints in the left column. It would be better to print at the end of the report. So if the last record in the report is in the left column, it should print there. However, if the last record is in the right column it should print at the end of that column.

if you create two(2) formulas, can you do a conditional supression on one based upon where the last record is

so if it is in a group(left form) and right form in diff group you could supress the group on record count

or you can supress the formula

right click, format field check off surpress

if rightrecord count =0 then true

or vice vers

Former Member
0 Kudos

After a long absence I have tried this:

There are two issues concerning the record count. On the first page the column count is 41 because of a header. The following pages have 45 records in both columns. There are three formulas which the first is the counter - whileprintingrecords; numbervar cnt := cnt +1

The other two are almost identical. displaycnt says whileprintingrecords; if numbervar cnt > 45 then "" else totext(cnt,0,"") which will print the count in the left column. displaycnt_right will print the count in the right column: whileprintingrecords; if numbervar cnt > 45 then totext(cnt,0,"")

If the number of records is < 41 then the display correctly shows in the first column after the last record. However, if the record count > 42 then the count shows up on the next page even though all records are on the first page.

The second issue is how to account for the difference in record count from the first page and subsequent pages?

The report is a label type with two columns, full page length. The problem is that both of the formulas are showing up in the first column and I can't seem to figure out how to get the displaycnt_right to show in the second (right) column.

Thanks.

former_member183750
Active Contributor
0 Kudos

We should get this working in the designer before proceeding to VB so I moved the post to the SAP Crystal Reports Design

forum.

Ludek