Monday, March 19, 2012

Invalid Directory error message

Hi,

I am a newbie to integrating of asp page to crystal report. Please assist me in what error I am making.

From asp page, I would like to click on "Request Reports" button and it goes to ViewReports.asp

Within ViewReports.asp, I have the following code.

<%@. LANGUAGE="VBSCRIPT" %>
<title>Crystal Reports ASP Example - Displaying a Simple Report</title>
<%
reportname = "wwwroot\aspect\CommissionStatement2006.rpt"
%>

<!-- #include file="AlwaysRequiredSteps.asp" -->
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartVieweractivex.asp" -->

<%
strPeriod = Request.form("Period")
strReport = Request.Form("crystalradio")

Response.Write strPeriod
Response.Write "<br>"
Response.Write strReport

%>

<HTML>
<HEAD></HEAD>
<TITLE>View Reports</TITLE>

<BODY>
</BODY>
</HTML>

-----

Error I get is:

Error Type:
Crystal Reports ActiveX Designer (0x80043AC4)
Invalid directory.
/scripts/padmaja/AlwaysRequiredSteps.asp, line 56

Now the path of my report is

wwwroot\aspect\wwwroot\aspect\CommissionStatement2006.rpt

Line 56 of AlwaysRequiredSteps.asp is

Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)

Any ideas.

Thanks.I get this error because my reports are in another directory while my asp pages are in one directory. If I move the CR reports to the same directory as my ASP pages, then it works fine.

But any ideas as to how I can configure my path of the report in ASP pages?

'path of the report is wwwroot\merge\
strReport = Request.Form("crystalradio")
'reportname = "\merge\" & strReport
'Response.write reportname

reportname = "CommissionStatement2006.rpt"

No comments:

Post a Comment