on 2010 Apr 12 10:31 PM
Hello,
I've been struggling with this for longer than I care to admit, but I'm not sure how to resolve.
We just upgraded from Crystal reports 8.5 to 11. We previously had some ASP pages that allowed users to input some parameter values and then view the report via internet explorer, where they could then export. print, etc.
I followed the examples under Business Objects\Report Application Server 11\Samples\Asp\Simple Discrete Parameters that were part of the install package, and came up with code that did the following:
Dim fiscal_period, fiscal_year, reportname
fiscal_period = Request.Form("fiscal_period")
fiscal_year = Request.Form("fiscal_year")
reportname = "./Reports/Departmental_Expense_Report.rpt"
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
Dim paramController
Set paramController = clientDoc.DataDefController.ParameterFieldController
paramController.setCurrentValue "", "Fiscal Period", fiscal_period
paramController.setCurrentValue "", "Fiscal Year", fiscal_year
paramController.setCurrentValue "", "Department", 84
clientDoc.databaseController.logon "user","pw"
%>
<!-- #include file="crystalreportsviewer.asp" -->
the report runs and passes the parameter values, but as soon as I try to use the toolbar to print, export, search, go to the next page, I get an error in Internet explorer, page cannot be displayed.
If I remove the following lines:
Dim paramController
Set paramController = clientDoc.DataDefController.ParameterFieldController
paramController.setCurrentValue "", "Fiscal Period", fiscal_period
paramController.setCurrentValue "", "Fiscal Year", fiscal_year
paramController.setCurrentValue "", "Department", 84
Then the crystal reports viewer prompts the user to enter the parmeter values before running the report. If i do it this way everything runs fine.
Unfortunately for me, I can't let users have access the the crystal reports viewer prompt because there are some parameter values that I want to hide from certain users.
Typically if no data you get a log on failure but you need to trp it so you can get more info. Add API logging to see exactly where the error is happening. Simplify the samples and steps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My apologies for not posting in the correct forum, any help is greatly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludek,
It's not a .Net app, I'm doing all of this from classic asp pages.
I used the examples I found in Business Objects\Report Application Server 11\Samples\Asp\Simple Discrete Parameters
and I built a page called expense_report_parameters.asp for the user to input the parameters, and then built a expense_report.asp page to display the report, and the code looks like this:
Dim fiscal_period, fiscal_year, reportname
fiscal_period = Request.Form("fiscal_period")
fiscal_year = Request.Form("fiscal_year")
reportname = "./Reports/Departmental_Expense_Report.rpt"
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
clientDoc.databaseController.logon "Accpac","Accpac"
clientDoc.DataDefController.ParameterFieldController.setCurrentValue "", "Fiscal Period", fiscal_period
clientDoc.DataDefController.ParameterFieldController.setCurrentValue "", "Fiscal Year", fiscal_year
clientDoc.DataDefController.ParameterFieldController.setCurrentValue "", "Department", 84
%>
<!-- #include file="CrystalReportsViewer.asp" -->
The report runs with the correct parameters, but the user can't click on print, export, or any other item on the report without getting an error. If I remove the code pertaining to setting parameter values then the report runs just fine and the user is able to use the print, export, etc functions
Hello,
Moved again to the Legacy Forums.
I'm surprised it worked at all. RAS is .NET and managed ASP code so you can NOT use those RAS samples in calssic ASP.
Go to our download Page above and look for the RDC samples, not .NET or Report Application Server code.
An throw all your code away, it will never work not is it supported.
Thank you
Don
Ok, that helps.
I've downloaded aspmps115.zip and found the examples you mentioned, I've got it working to a point but I keep getting blank reports using either SmartViewerActiveX.asp or JavaPluginViewer.asp to display the report, because I'm not seeing an error message it's hard to pinpoint the problem, but I've copied this line from the java console of a browser trying to run the report:
Parameters = cmd=get_pg&page=1&incomplete_page=1&incomplete_page_count=1&smart_images=1
No response from server.
Moved to .NET SDK forum...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.