Solved TD-14983: Problem with reports & use of...

Report bugs and possible workarounds.
Welskop

TD-14983: Problem with reports & use of...

Post by Welskop » 31 Jan 2011, 09:00

Hello,

I have a problem with a report using the function "TotalPages". To show you the problem I attached a small sample with two reports. The first report (without using "TotalPages") is okay and the second one is wrong. The only difference between these two reports is that I use the function "TotalPages" in the second one.

In the output of the repot look at the following data:

Report 1 Report 2
Counter starts at 1 204
Number of pages 9 9
Sum 2225,54 4451,08

Does anybody has an idea what is going wrong here?

Regards,
Frank
You do not have the required permissions to view the files attached to this post.

Conrado Zavala

Re: TD-14983: Problem with reports & use of...

Post by Conrado Zavala » 01 Feb 2011, 21:08

Hello Frank:

I will be looking at your case and will get back to you shortly.

Conrado Zavala

Re: TD-14983: Problem with reports & use of...

Post by Conrado Zavala » 01 Feb 2011, 23:18

Hello Frank:

I want to inform you that I was able to reproduce the behavior that you described. I have documented this issue and logged it into our QA System so it can be fixed in a future release or service pack. For future reference please use the following case number TD-14983. Thank you for bringing this to our attention.

Sincerely,

Nils Jänicke
Germany
Posts: 413
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: TD-14983: Problem with reports & use of...

Post by Nils Jänicke » 02 Feb 2011, 08:19

And we are using TotalPages() in many reports. What do you mean with "can be fixed in a future release or service pack"? I think this is a serious bug and should be fixed as soon as possible, i.e. the next EMP or at SP2.

Nils

Conrado Zavala

Re: TD-14983: Problem with reports & use of...

Post by Conrado Zavala » 02 Feb 2011, 18:09

Hello Nils:

I apologize for the misunderstanding. I agree with you: this is a very important feature and will be fixed.

Again: Thank you for bringing this to our attention.

Sincerely,

Nils Jänicke
Germany
Posts: 413
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: TD-14983: Problem with reports & use of...

Post by Nils Jänicke » 13 May 2011, 10:19

it seems that this bug is not fixed by SP2 or EMP5334. Please have a look again on this point. It seems that TotalPages() always returns 0.

Nils Jänicke
Germany
Posts: 413
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: TD-14983: Problem with reports & use of...

Post by Nils Jänicke » 19 May 2011, 14:04

Thank you. Seems to work fine with EMP5347.
Nils

Conrado Zavala

Re: TD-14983: Problem with reports & use of...

Post by Conrado Zavala » 19 May 2011, 22:10

I feel very happy for you Nils :)

I highly appreciate your patience and the fact you let us know that this issue is not a problem for you anymore.

Please feel free to contact us anytime. Thank you for bringing this our attention and for pushing us to be better.

Sincerely,

Welskop

Re: TD-14983: Problem with reports & use of...

Post by Welskop » 01 Aug 2011, 07:47

Hello,

the problme still exists in TD 6.0 SP3. :cry:

In EMP534747 for TD 6.0 SP2 the error was fixed. But now the error is back again with TD6.0 SP3.

You can find the example code in the very first post. Please try it and give feedback if it is working on your installation!

Kind regards,
Frank

Welskop

Re: TD-14983: Problem with reports & use of...

Post by Welskop » 03 Aug 2011, 08:05

Please can somebody check if the report is working? On my installation the problem is still there.

Regards,
Frank

Ana Paula Bonani

Re: TD-14983: Problem with reports & use of...

Post by Ana Paula Bonani » 03 Aug 2011, 11:07

Hello Frank,

It's working for us in 6.0 SP3. Here's the feedback from the engineer who tested this issue:

Both reprocases are OK in win32. The provided snapshot about missing value is NOT what I see with SP3 so it seems that testcase is OK with SP3

Please make sure that you have a clean environment (since you've installed previous EMPs and still see this problem, I'd recommend uninstalling everything and starting from scratch).

Thanks,

Welskop

Re: TD-14983: Problem with reports & use of...

Post by Welskop » 03 Aug 2011, 12:44

Hi,

thank you for the reply! I have also tested it on a clean installation of TD 6.0 SP3. And the problem is still there. The problem is not that there are missing values. The problem is that the values in "Report 2" are wrong.

"Report 1" has 203 rows and the counter in column 1 starts at 1. The sum at the end of the report is 2225,54 €.
"Report2" also has 203 colums but the counter in column 1 starts at 204 (203+1). The sum at the end of the report is 4451,08 € (2225,54 € * 2).

The only difference between the two reports is that I used the function "TotalPages()" in "Report 2". That's all.

So please check again if your reports are both showing excatly the same results.

Kind regards,
Frank
You do not have the required permissions to view the files attached to this post.

Nils Jänicke
Germany
Posts: 413
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: TD-14983: Problem with reports & use of...

Post by Nils Jänicke » 03 Aug 2011, 13:01

Hi Frank,

you should initialize your counter on SAM_ReportFetchInit, because the use of the TotalCount() causes in calling the report twice, the first call calculates the number of pages and the scond one prints. So SAM_Report_Start is called only one time, so every addition is done twice.

Code: Select all

On SAM_ReportFetchInit
   ! !
   Call SqlExecute( hSql )
   Set nCounter = 0
   Set nSum = 0
   !
I think that should work.

Welskop

Re: TD-14983: Problem with reports & use of...

Post by Welskop » 03 Aug 2011, 13:56

Hi Nils,

thank you for this hint. I moved the two lines from "On SAM_ReportStart" to "On SAM_ReportFetchInit" and now everythng is worling fine!

:D

Thank you!

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests