Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Langages serveur > ASP
ASP Forum sur la programmation ASP. Avant de poster : Cours ASP, FAQ ASP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 27/01/2012, 11h30   #1
Invité régulier
 
Inscription : juin 2008
Messages : 74
Détails du profil
Informations forums :
Inscription : juin 2008
Messages : 74
Points : 7
Points : 7
Par défaut Error Occurred creating Report Object: Répertoire non valide. Détails : error

Bonjour , j'ai créé un rapport avec crystal reports , il fonctionne parfaitement .
J'insère ce rapport dans une page ASP . Et là , j'ai l'erreur suivante :
Error Occurred creating Report Object: Répertoire non valide. Détails : error
.
J'ai vérifié les fichiers et je constate que cette erreur apparaît dans mon fichier AlwaysRequiredSteps.asp

Pouvez vous me montrer le code de l'erreur . Voici mon fichier AlwaysRequiredSteps.asp .


Code ASP :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 
<%
'===================================================================================
'Create the Crystal Reports Objects
'===================================================================================
'
'You will notice that the Crystal Reports objects are scoped as session variables.
'This is because the page on demand processing is performed by a prewritten
'ASP page called "rptserver.asp".  In order to allow rptserver.asp easy access 
'to the Crystal Report objects, we scope them as session variables.  That way
'any ASP page running in this session, including rptserver.asp, can use them.
' CREATE THE APPLICATION OBJECT                                                                     
If Not IsObject (session("oApp")) Then                          
  Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
End If                                                               
 
'This "if/end if" structure is used to create the Crystal Reports Application
'object only once per session.  Creating the application object - session("oApp")
'loads the Crystal Report Design Component automation server (craxdrt.dll) into memory.
'
'We create it as a session variable in order to use it for the duration of the
'ASP session.  This is to eliminate the overhead of loading and unloading the
'craxdrt.dll in and out of memory.  Once the application object is created in
'memory for this session, you can run many reports without having to recreate it.
 
' CREATE THE REPORT OBJECT                                     
'                                                                     
'The Report object is created by calling the Application object's OpenReport method.
 
Path = Request.ServerVariables("PATH_TRANSLATED")          
 
While (Right(Path, 1) <> "\" And Len(Path) <> 0)                        
iLen = Len(Path) - 1                                                  
Path = Left(Path, iLen)                                               
Wend                                                                  
 
'This "While/Wend" loop is used to determine the physical path (eg: C:\) to the 
'Crystal Report file by translating the URL virtual path (eg: http://Domain/Dir)                                                                        
 
'OPEN THE REPORT (but destroy any previous one first)                                                     
 
If IsObject(session("oRpt")) then
response.Write("ok")
Set session("oRpt") = nothing
End if
 
On error resume next
 
Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
'This line uses the "PATH" and "reportname" variables to reference the Crystal
'Report file, and open it up for processing.
 
If Err.Number <> 0 Then
  Response.Write "Error Occurred creating Report Object: " & Err.Description
  Set Session("oRpt") = nothing
  Set Session("oApp") = nothing
  Session.Abandon
  Response.End
End If
 
'This On error resume next block checks for any errors on creating the report object.
'We are specifically trapping for an error if we try to surpass the maximum concurrent
'users defined by the license agreement.  By destroying the application and report objects
'on failure we ensure that this client session will be able to run reports when a license is free.
'
'Notice that we do not create the report object only once.  This is because
'within an ASP session, you may want to process more than one report.  The
'rptserver.asp component will only process a report object named session("oRpt").
'Therefore, if you wish to process more than one report in an ASP session, you
'must open that report by creating a new session("oRpt") object.
 
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
'session("oRpt").DiscardSavedData
 
'These lines disable the Error reporting mechanism built into the
'Crystal Report Design Component automation server (craxdrt.dll).
'This is done for two reasons:
'1.  The print engine is executed on the Web Server, so any error messages
'    will be displayed there.  If an error is reported on the web server, the
'    print engine will stop processing and you application will "hang".
'
'2.  This ASP page and rptserver.asp have some error handling logic designed
'    to trap any non-fatal errors (such as failed database connectivity) and
'    display them to the client browser.
'
'**IMPORTANT**  Even though we disable the extended error messaging of the engine,
'fatal errors can cause an error dialog to be displayed on the Web Server machine.
'For this reason we recommend that you set the "Allow Service to Interact with Desktop"
'option on the "World Wide Web Publishing" service (IIS service).  That way if your ASP
'application freezes you will be able to view the error dialog (if one is displayed).
%>
regisyves est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/01/2012, 12h16   #2
Modérateur
 
Avatar de roro06
 
Inscription : avril 2007
Messages : 1 364
Détails du profil
Informations personnelles :
Âge : 42

Informations forums :
Inscription : avril 2007
Messages : 1 364
Points : 1 551
Points : 1 551
Bonjour

c'est une plaisanterie ?

Commence par enlever la ligne on error resume next le message d'erreur sera plus explicite. Tu fais un et tu trouveras facilement le code en erreur.
__________________


" La vie c'est quelque chose de très fort et de très beau.... La vie appartient a tous les vivants. It's both a dream and a feeling. C'est être ce que nous ne sommes pas sans le rester. La vie c'est mourir aussi....Et mourir c'est vraiment strong...c'est rester en vie au delà de la mort...Tous ceux qui sont morts n'ignorent pas de le savoir."
(J.C. VanDamme, humoriste et philosophe belge . A moins que ce ne soit l'inverse ...)

Chuck Norris comprend JC Van Damme.
roro06 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/01/2012, 11h51   #3
Invité régulier
 
Inscription : juin 2008
Messages : 74
Détails du profil
Informations forums :
Inscription : juin 2008
Messages : 74
Points : 7
Points : 7
L'erreur était liée à mon système d'exploitation . Il est resolu
regisyves est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 20h51.


 
 
 
 
Partenaires

Hébergement Web