Home Server

Problem with reports from Report builder 10.07 to 10.08

edited May 2008 in Server
Hi,

We have 2 versions of our program. One windows client and one
Webclient.

Report builder is integrated in both of them, as report server for the
webclient.

We have just installed 10.08 and some of our reports still work in the
windows version but not from the report server.


"Server Error: Processing request for report Report Explorer
Database\All Reports\7630
Code Error: Kon programma: Var_saldoOnCalc niet starten Could not
convert variant of type (Null) into type (Double) "

The saldo variable sums the values of a few fields on the layout
(DBCalc variables).

How can I fix this?

Thankx
Chantal Marchand

Comments

  • edited May 2008

    I emailed you a patch for RB 10.08 that I think will resolve this issue.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008
    Tanks a lot,

    But it appears my email address was incorrectly registerd, so I did
    not receive it!

    Could you send it again please?

    chantal@pasoftware.nl

    Regards,

    Chantal Marchand



    On Fri, 23 May 2008 08:51:35 -0500, "Nard Moseley \(Digital
  • edited May 2008
    Hi,

    I've installed the patch and rebuilt everything but it still doesn't
    work.

    I still works from the enterprise version and not from the
    reportserver (used via the web).

    I tried to debug it and made sure I built everything correctly, it
    uses the code of the patch but crashes in a part of the code we don't
    have sources from.

    The stack trace shows this:

    :77e4bee7 kernel32.RaiseException + 0x3c
    Variants.VarCastError(1,62240)
    Variants.@VatToDouble(???)
    Variants.@VarToReal((1,0,0,0,0,0,0,0,0,0, nil {#0}, nil, 0 ...
    :00416f78 @VarToDouble + $94
    :00713333 TraNumericValue.CompareNumericValues + $33
    :00712f66 TraNumericValue.CompareValue + $A

    I cannot see who calls this function (CompareValue) and I considering
    the report builder is integrated in our software it's not possible to
    send you a copy of the report that you could debug yourself...I also
    don't have the tools to build an apart report only using delphi and
    the report server...

    Regards,
    Chantal
  • edited May 2008
    Hello,

    I found the problem. It mainly lies in the report itself, not in the
    report builder...

    In the calc variable that gives the error is something like this:

    var
    tmpExtraHours : double;
    begin
    tmpExtraHours := Pipeline['hours1'] + Pipeline['Hours2'] + ...;

    if (tmpExtraHours is null) then tmpExtraHours := 0;

    ....

    end

    When I remove the check on null everything works fine...
    I still don't understand why this works in windows and not via the
    report server (web).
    I don't think it should work at all considering tmpExtraHours is
    definitly not a variant.

    I'll adjust our reports.

    Thankx for your help,
    Chantal




    On Fri, 23 May 2008 08:51:35 -0500, "Nard Moseley \(Digital
  • edited May 2008

    Perhaps you did not rebuild the report server using the patch.

    A report should work the same, whether it runs on the server or in a
    standard windows application. RB Server is built on top of RB Enterprise,
    there is only one report engine.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008
    I've checked, I even ran it through the debugger to make sure the code
    of the patch was executed.

    I do get an error when I clic on preview in the enterprise version,
    but not when I execute the report.

    It's only from the report server that the user gets an error.

    Chantal


    On Tue, 27 May 2008 08:38:44 -0500, "Nard Moseley \(Digital
  • edited May 2008
    Please try to create a test case that we can run here. This is not a known
    issue.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008
    I've made one little report in Delphi, with the same code, but this
    one crashes all the time.
    On Preview AND Execute, I just get the same message canno't convert
    null to double on my calc variable. So I guess this is the way it
    should work.

    May be my old reports dit not crash because they were made with older
    versions of the report builder (version 7) and only used but never
    modified sinds?

    You can try it by making a simple report with a calc variable that
    does this:

    var
    tmpResult : double
    begin
    tmpResult := 0;
    if (tmpResult is null) then
    value := 0;
    else
    value := 1;
    end

    Regards,
    Chantal

    On Wed, 28 May 2008 08:41:49 -0500, "Nard Moseley \(Digital
  • edited May 2008


    That code is not correct. In Delphi it will not compile. In RAP, it compiles
    but produces a run-time error. I recommend consulting the Delphi help topic
    for the 'is' operator so that you have an understanding of what it is used
    for. The expression

    Object is Classs

    is used to test whether Object is an instance of Class or one of its
    descendants.

    In your code, tmpResult is not an object. Null is not a class.

    Try the following code instead

    procedure Variable1OnCalc(var Value: Variant);
    var
    tmpResult: Variant;
    begin
    tmpResult := 0;
    if (tmpResult = null) then
    Value := 0
    else
    Value := 1;
    end;


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008

    The code I corrected already.

    I didn't write the original code, I just don't understand why it
    worked for 2 years and not anymore. That's why I first though it was a
    report builder problem.

    Thanks for your help.

    Chantal

    On Thu, 29 May 2008 09:09:02 -0500, "Nard Moseley \(Digital
  • edited May 2008

    Rarely happens, but it is possible that when we fix a bug, an old report
    that was exploiting the bug will behave differently.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.