cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with passing parameters through Java-JSP in a report with cross tab

Former Member
0 Kudos

Can anyone tell me, if there's a bug in Java SDK in passing the parameters to a report (rpt file) that has a cross tab in it ?

I hava report that works perfectly fine

with ODBC through IDE and also through browser (JSP page)

(ii) with JDBC in CR 2011 IDE

the rpt file has a cross tab and accpts two parameters.

When I run the JDBC report through JSP the parameters are never considered. The same report works fine when I remove the cross tab and make it a simple report.

I have posted this to CR SDK forum and have not received any reply. This have become a blocker and because of this our delivery has been postponed. We are left with two choices,

Re-Write the rpt files not to have cross-tabs - This would take significant effort

OR

(ii) Abandon the crystal solution and try out any other java based solutions available.

I have given the code here in this forum posting..

TIA

DRG

TIA

DRG

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The person who attempted to answer this Mr. James has been very kind and friendly. But it ended up proving that there's a crucial bug in the sw of Crystal 2011 which do not allow use of Cross-Tab reports using the Java library. It would be very useful if SAP could release a fix for this BUG which makes the purchase of CR 2011 sw license futile.

Former Member
0 Kudos

The Development team is investigating this issue for the next Service Pack of Crystal Reports for Eclipse.

I am currently following up with them to get the latest status.

thanks

James Anderson

Former Member
0 Kudos

Mr. James,

Thank you for the reply.

Regards

DRG

Former Member
0 Kudos

Mr. James,

Any updates on this ?

We have purchased a crystal single case support for this. How do we take this forward to a closure ?

Thanks

DRG

Former Member
0 Kudos

Hi Raghavan,

this issue has be resolved in Crystal Reports for Eclipse SP13 which is available at the following location. Please give it a try and confirm that it resolves the issue.

http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp

thanks

James

Former Member
0 Kudos

Please attach the following two reports with Saved Data

1) rpt without cross tab that refreshes properly

2) rpt with cross tab which won't refresh properly

Once I have the reports I'll take a look at the issue.

thanks

James Anderson

Support Architect

AGS Primary Support

Global Support Center Canada

SAP Canada Inc.

Former Member
0 Kudos

Mr James,

Thank you for the reply.

I have given the code here in this forum posting,

Also How do I attach the rpt files here in a post ?

What is very painful in the whole thing is, This we feel is a serious bug in the library, where the rpt file works in one environment (activeX) and does not work in Java using the library provided by crystal. Not a remote issue we are discussing about but a major blocker in the entire SDK.

The parameters are not applied as filters on cross tab reports. Those experts and fellow development community Please clarify is this not a bug ?

The entire edited response by me is triggerred by the reply By Mr. Adam stone who have provided a link to describe what and why support is for ! My apologies if any has got hurt in this process.

Edited by: drgiri on Oct 20, 2011 2:32 PM

Former Member
0 Kudos

Please upload the following two reports with Saved Data to https://sapmats-us.sap-ag.de/upload/index.cgi?id=UEAQHVV03SZNO7P1725Z6ZE52HVRXBWXL6F26EACDIPBBD6OB7

1) rpt without cross tab that refreshes properly

2) rpt with cross tab which won't refresh properly

Once I have the reports I'll take a look at the issue.

thanks

James Anderson

Support Architect

AGS Primary Support

Global Support Center Canada

SAP Canada Inc.

Former Member
0 Kudos

I have uploaded the files into the site mentioned by you.

The following is the status obtained.

File Upload Status

The file will be transfered to jame.anderson @ sap.com

The file's reported name on the client machine is: CR2011JDBC_withCrossTab_Files.zip

The file's reported Content-type (possibly none) was: application/zip

The file's length was: 199.8 kByte (204669 byte)

Thanks and Regards

DRG

Former Member
0 Kudos

Thank you for sending the files. I received them this morning.

Please try the following test.

1) Add the Special Fields Data Date and Data Time to both reports

2) Run your application with both reports

3) Check whether the Data Date and Data Time change as you run the reports

This will tell us if the data is refreshing with the same parameters or not refreshing at all in the case that is not working.

thanks

James

Former Member
0 Kudos

Thanks for your response Mr.James.

We do not have issues in seeing the refreshed Date or time. Both work. Infact the parameter a datetime and integer as given in the sample rpt files sent is refreshed and displayed properly in the report.

The issue is,

This parameter data is not applied or passed to the stored procedure that is attached to this report. The result of this is, we tend to see the same data irrespective of parameter passed into the report.

For example, if the user has passed in a date as 1/1/1975, he would see the date displayed as what he provided but the data in cross tab would correspond to what was provided while saving the rpt file.

the report print date that we have added at the bottom of the page gets refreshed properly. The parameter field that we added to the report gets refreshed properly and also the fields that you have mentioned in your response above gets refreshed and displayed properly. But the data that is fetched from database is always corresponds to the parameters that is saved in CR 2011 IDE.

We tried changing the parameter in IDE and save the rpt file. The data displayed thorugh JSP changes.

I'll be happy to provide you any further information you would need on this.

Regards

DRG

Former Member
0 Kudos

We can send you a war file containing all the library Jars that can be deployed on Glassfish server if you prefer.

Regards

DRG

Former Member
0 Kudos

It may be quicker to debug this in your environment rather than try to reproduce here.

CR 2011 comes with crlogger.dll which provides additional logging capabilities.

Please do the following.

1) Create logging directory c:\crlogger

2) Create system environment variable LOGGING_DIR and set it to c:\crlogger

3) Create system environment variable LOGGING_ENABLED_ASSERT and set it to 1

4) Create system environment variable LOGGING_ENABLED_RUNTIME and set it to 100

5) Launch a command window and use a set command with no arguments to list all environment variables and ensure the values are as requested in steps 2, 3 and 4

6) Reproduce the problem

7) Upload the log file from c:\crlogger which should be in the form <process>_<processid>_yyyy-mm-dd-hh-mm-ss_assert.log using link https://sapmats-us.sap-ag.de/upload/index.cgi?id=I6W7U9ROL6VMOB5TG6LAD7GAWFADYWV8DQHKVBGEP2PBZWFUYP

thanks

James

Former Member
0 Kudos

Mr.James,

Thanks for your reply. I am writting my observations below.

The log files do not get created when I run the report through Java - JSP pages.

(ii) The log files gets created when I open the CR 2011 IDE and fills up when I open the rpt file.

(iii) Log files are do not get updated when I run the report through Java-JSP pages.

(iv) The assert.log file is empty and contains a header line only

"TIMESTAMP THREAD_ID FILENAME LINE_NUMBER EXPRESSION"

(v) When I refresh the preview through IDE I get the following line added to Trace.

2011-10-27-17-15-35 2324 .\QEProperties.cpp 968 FALSE

But no records added when I run the report view through JSP.

However the runtime log file contains data about loading of different cpp files and intermediate values. I am uploading that file.

Here too, the run time log file gets filled with values only when it is ran through the IDE (When i run the report through IDE it works fine and refreshes the data properly). When I run the report view through Java-JSP nothing gets added to this file.

Please let me know how we can proceed further on this.

Thanks and Regards

DRG

Edited by: drgiri on Oct 27, 2011 2:10 PM

Former Member
0 Kudos

An equivalent level of tracing can be added to the Report Application Server by modifying the command line to include

-trace -crpetrace 7

Please let me know which server product and version (CR Server, Enterprise, Edge) you are using (apologies as I should have confirmed this earlier).

There will be a logging directory under the installation folder of the server product you are using.

Please empty the logging folder before starting then add the command line switches above and restart the Report Application Server.

Please upload the logs using the following link.

https://sapmats-us.sap-ag.de/upload/index.cgi?id=ET1EOW874H5JU0Z62D6I0XUKKRL5LO9YZQZD6IDDQZ5X5OBGMX

thanks

James

Former Member
0 Kudos

Mr James,

To give you the backround/environemnt of our system,

We using SAP Crystal Reports 2011.[Crystal Reports and Xcelsius] along with Crystal - eclipse java SDK version 2.2 on GlassFish Server 3.0 running Java 6. The JDBC Drvier we use is JTds version 1.2 from source forge.

The OS : is Window sXP or Windows 2003 Server.

Since we are not running Crystal Reports Server, I am not sure how to use the command line parameters to enable logging.

We use Crystal Reports as follows.

We create rpt files using CR 2011 - UI development environment (CR IDE)

(ii) Use SQL Stored procedures running on the same physical machine running SQL Server 2005 dev edition/enterprise ed.

(iii) Create two versions of rpt files, of which one using ODBC connection and the other using JDBC. Both the reports target different web servers targetting different users.

(iv) The ODBC version of rpt files are rendered on internet explorer browser through asp-VBScript running on IIS. These reports are rendered using ActiveX CR viewers. These Reports RUN WITHOUT issues.

(v) The same rpt files when connected using JDBC Driver and rendered using CR-DHTML viewer through eclipse-Crystal Library causes the CURRENT ISSUE.

With regard to Logs, I do see a directory with name "logging" under folder, "SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0" . There are two files that perhaps got created when we installed CR 2011 but did not get updated since then. No Log records gets added to them.

Please let me know how to proceed.

Thanks and Regards

DRG

Edited by: drgiri on Oct 28, 2011 10:03 AM

Former Member
0 Kudos

The fact that your are using Crystal Reports for Eclipse is the missing piece of the puzzle.

My concern is that I am unsure whether we have yet released a version of Crystal Reports for Eclipse that supports CR 2011 reports. I have sent this question to our product owners. In the meantime there is some log4j logging we can do that will help out.

Here is some background info:

Initializing Log4J with the Java Reporting Component

The log4j.jar file that comes with the Java Reporting Component must be found in the CLASSPATH. For web applications, the jar file should be present in the WEB-INF/lib folder, and for desktop applications, the path for the jar file should be present in the CLASSPATH environment variable.

The log4j configuration file, either log4j.properties or log4j.xml should also be found in the CLASSPATH. For web application, the file should either present in the WEB-INF/classes folder, or jarred or zipped and the jar or zip file present in the WEB-INF/lib folder.

Configuration

One may specify configuration information for Log4J through either a Java Properties objects, defined through a *.properties file, or an XML element, defined through a *.xml file.

log4j.properties example


log4j.rootLogger=DEBUG, CRtrace
log4j.logger.com.crystaldecisions=DEBUG
log4j.logger.com.businessobjects=DEBUG
log4j.appender.CRtrace=org.apache.log4j.RollingFileAppender
log4j.appender.CRtrace.MaxFileSize=100MB
log4j.appender.CRtrace.MaxBackupIndex=1000
log4j.appender.CRtrace.layout=org.apache.log4j.PatternLayout
log4j.appender.CRtrace.layout.ConversionPattern=%r	%t	%p	%c - %m%n
# Modify this line to specify where to create the log files.
# Make sure the directory exists before running your application.
# For example, if you don't change this line, then make sure the directory C:logs exists.
log4j.appender.CRtrace.File=c:\logs\CRtrace.log

There is a forum thread that talks about some recommended settings for log4j:

thanks

James

Former Member
0 Kudos

I spoke with the Product Owner and he confirmed that CR 2011 reports are supported by Crystal Reports for Eclipse Service Pack 12 which can be downloaded from the following location. You can determine which Service Pack you have based on the names of the JAR files.

http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp

thanks

James

Former Member
0 Kudos

Mr. James,

Thank you for your reply.

After your reply, we are able to configure the log4j and have taken the log. I have uploaded to the link provided by you.

We have updated the service packs through eclipse before generating the logs. Still as per your reply. I am downloading the latest budle provided at sdn site, try out and let you know the result with fresh log files as required.

Thanks and Regards

DRG

Former Member
0 Kudos

From the log file I can see that the data is read from the database using parameter values:

{?@Direction} is: n(1.0)

{?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000))

which results in 146 records returned from the database

Are these the value you are setting or the values that were set at design time?

I would feel more comfortable if you were testing with the latest version as it has been tested against CR2011 reports.

Please upload the logs from the latest version using the following link and let me know what the values of the parameters are that you are setting as well as what they were at design time.

https://sapmats-us.sap-ag.de/upload/index.cgi?id=CP6KJ75XDLZ0SHB6QV39RNFOV61S46061M3ZL3ZA387SMAYQGX

thanks

James

Former Member
0 Kudos

Mr.James,

Thank you for the reply.

As I stated earlier, we have been using the latest service pack (12) when I generated the log file that is uploaded earlier.

To confirm this further, I downloaded the complete eclipse bundle from sdn site and reran the rpt files. No change in the behaviour and the bug is reproducible.

You are right about the parameters, we are using {?@Direction} is: n(1.0)

{?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000)) as parameters in JSP and we get 146 records when we directly execute the stored procedure. The date and the direction parameter values stored in design time are different. '1965-01-01' and Direction 1.

When we run the JSP page, The parameter that is passed through the JSP page, is displayed correctly on the right top of the report view. But the data that is displayed in cross tab is not corresponding to the date and direction parameter. It corresponds to 1965-01-01 and direction 1 which are saved at design time.

You can test this by modifying the parameter values in the JSP page that I sent earlier. You will see the displayed data will remain same irrespective of the parameter.

Further to note, Before each trial run, I modify the parameters in JSP page, build them and redeploy so that caching does not affect the end result.

This behaviour, we observe on all the reports that have cross-tabs. These reports work perfectly fine when rendered through ODBC-ActiveX viewer and the bug is observable only when ran through Java runtime library. We get this bug on view, export and print functionalities as well.

Additionally we tested the same in

With CR version 2008 instead of CR 2011.

(ii) Different browsers ranging from IE 7 through 9 and FF 7.

The complete environment and various softwares that we used for this testing are,

OS : XP Latest updates as on Oct 2011.

App Server: GlassFish Version 3 with Java version 1.6 and build 21

Database server ; SQL Server 2005. SP 3 - Dev Ed.

JTds JDBC type 4 driver version - 1.2.5 from source forge.

Eclipse : Helios along with crystal libraries directly downloaded from SDN site.

I am uploading the log file that is generated when rendering the rpt for view in IE 8

Regards

DRG

Former Member
0 Kudos

In the latest log file I see that the parameters were set to:

{?@Direction} is: n(1.0)

{?@BDate} is: dt(d(1971-01-01),t(00:00:00.968000000))

which returned 181 records

What seems to be happening is the data is coming back to the CR Engine and it is not using it to render the crosstab.

Please add the same database fields you have in the CrossTab to the details section of the report and see if the data in the details section is refreshed properly while the CrossTab is not. Please upload this rpt and the resulting log file to the following link.

https://sapmats-us.sap-ag.de/upload/index.cgi?id=L96LPD7YZ9WO5SILCTCDNID0BRTQ9FZ8H0W0QHE1ITMIUK38UL

thanks

James

Former Member
0 Kudos

Mr. James,

Thanks for your reply.

What you said on the parameters in last upload is correct.

We also feel that the data that is fetched is not used inside Crosstab but used in other report fields.

Today I have uploaded a zip file containing three files. A rpt file containing both crosstab and detail section fields - EmployeeCR2011Test.rpt (ii) Log file - CRtrace.log (iii) A PDF file exported from the browser showing erraneous data The uploaded rpt file has design time parameters set as @BDate : '1/1/1965' (ii) @Direction: 1 The log file is generated using run time parameters : @BDate : '1/1/1973' (ii) @Direction: 1

Thanks and Regards

DRG

Former Member
0 Kudos

This is looking like it may be a defect and have to go to Development.

Do you have a Support Contract with SAP that will allow you to open an Incident via Service Marketplace?

If so please go ahead and do so and include that you want it assigned to me as we have been working on the issue in the Forum. I will pick up the Incident and start the process of escalating to Development.

thanks

James Anderson

Former Member
0 Kudos

Mr. James,

Thank you very much. I'll take up the support contract with our purchase. In the meantime, will it be possible to get a patch if available. I feel this is a major bug wherein a featre do not work in the product that is being sold.

Thanks and Regards

DRG

Former Member
0 Kudos

I am having informal discussions with Development on it to see if it is a known problem. To formally submit a defect I will need to have an Incident. It is best if you create the Incident if you have a Support Contract. If you don't currently have a Support Contract with access to Sales Marketplace let me know and I can create an Incident on an exceptional basis as this seems to be a defect.

thanks

James

Former Member
0 Kudos

Mr.James,

Thank you very much and your your help is appreciated. I have referred to our office in US on the support. I think it may take a while before it is finalized. In the mean time, you can proceed with creating the incident on this. It would be very helpful if this thread can be updated with any solutions in sight.

Regards

DRG

Former Member
0 Kudos

I will create an Incident today on an exceptional basis as this does appear to be a defect.

thanks

James Anderson

Former Member
0 Kudos

Thank you very much Mr. James.

Moderator: Is it the convention we close the thread as we got an answer and not

Will I get any message posted on to this thread when the issue is resolved ?

Regards

DRG

Former Member
0 Kudos

I have created "Incident 926722 / 2011 / Cross Tab data not refreshed CR4Eclipse" for this issue.

I have submitted defect "ADAPT01594630 - TE:Cross Tab data not refreshed CR4Eclip" for this issue.

I will post here when there is an update from Development.

thanks

James

Former Member
0 Kudos

Mr. James, Thank you very much.

Dr.R.Giridharan

This being a crucial one in our application, our recent CR 2011 license purchase remains useless for at the moment.

Is there any timline we can expect for this bug to be closed ?

Regards

DRG.

Edited by: drgiri on Dec 15, 2011 7:20 AM

Adam_Stone
Active Contributor
0 Kudos

This question looks like it will be more involved than what can be answered in the forums. The only thing I can suggest is to make sure that you are not saving the report with data so that it has to hit the database when you try to run it.

[What are these "support" forums good for anyhow?|]

Former Member
0 Kudos

We tried both.When we save the rpt without data it gives an exception.

How do I attach the rpt file here ?

Edited by: drgiri on Oct 18, 2011 1:32 PM

Edited by: drgiri on Oct 18, 2011 1:36 PM