Solved

Crystal Report Error formula when change from indows 2000 professional to Windows 2000 server.

Posted on 2003-11-30
9
501 Views
Last Modified: 2008-01-09
Dear developper,

   I have successed creating my web appliaction in Windows 2000 professionnal and it work well. It can display my report that I have done in Crystal Report. I have builded a web setup to deploye this application on other server(Windows 2000 professionnal). Great I got sucess to deploy it on that new server. But I got an error of formula in CR when I install and run it on Windows 2000 server. I try to take the original source that I use to build that setup file to rebuild in Windows 2000 server but I still get the same error.

  The following message are the error that I got when I try to open page contained Crystal Report :



Server Error in '/AirportSca' Application.
--------------------------------------------------------------------------------

Error in File C:\WINNT\TEMP\temp_ae14af68-27c6-4ba6-97d2-080dd6f9ef90.rpt: Error in formula <Total_Kh_Passenger>. 'If isnull({#nb_total_kh_passenger_notblanck}) AND isnull({#nb_total_kh_passenger_blanck}) then ' String length is less than 0 or not an integer.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.FormulaException: Error in File C:\WINNT\TEMP\temp_ae14af68-27c6-4ba6-97d2-080dd6f9ef90.rpt: Error in formula <Total_Kh_Passenger>. 'If isnull({#nb_total_kh_passenger_notblanck}) AND isnull({#nb_total_kh_passenger_blanck}) then ' String length is less than 0 or not an integer.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[FormulaException: Error in File C:\WINNT\TEMP\temp_ae14af68-27c6-4ba6-97d2-080dd6f9ef90.rpt:
Error in formula  <Total_Kh_Passenger>.
'If isnull({#nb_total_kh_passenger_notblanck}) AND isnull({#nb_total_kh_passenger_blanck}) then
'
String length is less than 0 or not an integer.]
   .K(String 
, EngineExceptionErrorID  ) +610
   .F(Int16 , Int32 ) +491
   CrystalDecisions.CrystalReports.Engine.FormatEngine.GetLastPageNumber(ReportPageRequestContext reqContext) +187
   CrystalDecisions.ReportSource.LocalReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) +174
   CrystalDecisions.Web.ReportAgent.get_LastPageNumber() +34
   CrystalDecisions.Web.ReportAgent.v(Boolean `) +90
   CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1447

 
  I do need your help,


  Best regards,
      Veasna


   
0
Comment
Question by:veasnamuch
  • 4
  • 3
9 Comments
 
LVL 27

Expert Comment

by:Dabas
ID: 9852120
Hi veasnamuch:
Please give more information about #nb_total_kh_passenger_notblanck
Type?

Dabas
0
 
LVL 1

Author Comment

by:veasnamuch
ID: 9856395
 Ok, I will tell you in detail about #nb_total_kh_passenger_notblanck. In fact #nb_total_kh_passenger_notblanck is "running total field" which is calculate the "Count" function. The same for #nb_total_kh_passenger_blanck.

  My main idea is to eliminate     ,00    at the end the Total_Kh_Passenger when it is display.
  I have place a Text Field on a report by putting a Formula  Fields named "Total_Kh_Passenger" which have a formule like this :

  If isnull({#passenger_total_kh_null}) AND isnull({#passenger_total_kh_notnull}) then
     "0"
  Else
     If isnull({#passenger_total_kh_null}) Then
       left(cstr(-{#passenger_total_kh_notnull}),instr(cstr(-{#passenger_total_kh_notnull}),",")-1)
    Else
       If isnull({#passenger_total_kh_notnull}) Then
          left(cstr(-{#passenger_total_kh_null}),instr(cstr(-{#passenger_total_kh_null}),",")-1)
       Else
          left(cstr({#passenger_total_kh_null}-{#passenger_total_kh_notnull}),instr(cstr({#passenger_total_kh_null}-{#passenger_total_kh_notnull}),",")-1)


     
  I got succcessed in running these formula on Windows 2000 professional but not for Windows 2000 server.


0
 
LVL 27

Expert Comment

by:Dabas
ID: 9856530
veasnamuch:
I do not think that the problem is OS related, rather in the data behind the report.
When you ran it successfully, were you accessing the same data?

But apart from that, if what you want is to change the display, would you not be able to do so by formatting your formula?

Dabas
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Author Comment

by:veasnamuch
ID: 9863304
I am agree on your idea but as you know I am new to Crystal Report and I don't know where shoud I do to perform that formating.
 Could you guide me the right way to do that?.


 Best regards,
      Veasna
 
0
 
LVL 27

Accepted Solution

by:
Dabas earned 50 total points
ID: 9863338
veasnamuch,
Very Easy!
Open your report and right click on the field you want to change
Choose Format Field...
Choose the Number Tab
Choose the format you want from the list

Good luck!

Dabas
0
 
LVL 1

Author Comment

by:veasnamuch
ID: 9873204

      Ok, I a gree on what you said. This would be in case where the field we want to format is the type number. In fact the Total_Kh_Passenger is a formula not a DataSet field and this formula I put it in a TextField.
      When I right click on that Field I didn't see the Number Tab.

      Regards,

        Veasna

 
   
0
 
LVL 27

Expert Comment

by:Dabas
ID: 9873223
veasnamuch:
what is the formula inside Total_KH_Passenger?

Dabas
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10279740
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Dabas {http:#9863338}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connection String 16 61
How to add <appSettings> to the webconfig file 2 28
Where did System.Data.Objects go? 2 29
Reading the web config for a running service on Windows 10 16 42
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question