Problem with a simple Crystal 10 report
Help please!!
I am writing what should be a simple report in Crystal 10 which is acting oddly.
The report is built on 3 tables which sit on a SQL database and are linked through ODBC views. The tables are property, referral and incident and the property table is the one that exists in all cases. All three have a Property ID and the other two tables are linked to the property table through two full outer join connections. A property can have a referral or an incident or both.
I just want to create a report which lists all the unique properties which have a referral or an incident which has been created within a particular timescale.
The filter I am using is:
{est_property.est_address_postalcode} = "AB12 5NX" and
(({est_referral.CreatedOn}>={?Start date}) and ({est_referral.CreatedOn}<={?End date}))
or
(({Incident.CreatedOn}>={?Start date})and ( {Incident.CreatedOn}<={?End date} ))
Note the 'AB12 5NX' bit is just to speed the testing process up as the databases that I am querying are large.
The version I am running is 10.0.0.533 although I am currently (very slowly) downloading SP6.
Thanks,
John
I have made some progress on this. I think the problem is because the filter fails when the tables it is querying have Nulls in them.
I have just tried building the filter again with an "if the 'created on' field in the referral table is NULL then just query on the incident table" type of query:
if isnull({est_referral.CreatedOn})=FALSE then
{est_property.est_address_postalcode} = "AB12 5NX" and
({?Start date}<={est_referral.CreatedOn} and {est_referral.CreatedOn}<={?End date})
or
{est_property.est_address_postalcode} = "AB12 5NX" and
({?Start date}<={Incident.CreatedOn}and {Incident.CreatedOn}<={?End date} )
else
{est_property.est_address_postalcode} = "AB12 5NX" and
({?Start date}<={Incident.CreatedOn}and {Incident.CreatedOn}<={?End date} )
This seems to work but seems to be very heavy on the processing. It would also require a very complex bit of coding when I start building the proper query which actually requires four sub-tables to be queried rather than ust two!
So still help required!
Thanks.
Similar Messages
-
Performance problem with Filters of Crystal Report
Hi,
I have been facing this problem for a month now.
Whenever I try to run a Crystal Report from Infoview it takes 5min or more to get the prompts screen
but sometimes(mostly when i restart all servers) the filter screen appears real quick say 5 to 10 secs(is this quick?)
I have no idea why this is happening! Is there an issue with the servers? or is this problem related to Crystal report?
Please help. I tried googling for this problem but could not find anything that would help.
Thanks
NileshI am using a universe which uses a DSN to connect to the sql2k5 database. One thing I forgot to mention is that this is a clustered environment(with 2 servers) and the input/output file repository is set to a folder on a third server.
Note: Even though the report filters take time to pop up, but the report runs very fast; doesnt take more than 5 seconds for a fairly complex report.
Yesterday I did a trial install on a seperate server and the reports filters come up pretty fast. -
Problem with Localization of Crystal Reports
Post Author: raj20007
CA Forum: Crystal Reports
Hi everyone..I am having a problem with crystal Reports. I need Malayalam unicode( INDIAN Language) to be displayed in the reports, this data will be binded from database.And the problem is : After applying this unicode font to the labels of my reports, some labels in the reports are going invisible.Also, previously if I increase the font size beyond 22, I used to get "A Generic error occured in GDI+". But after changing the textformat property of the field to "crRtfText" from "crstandardText" , I could resolve this Generic Error.
And, I could also observe that the last char of the fields in the "details" section is repeating.This is the code I am using to apply local font to the labels.
Private Sub assignfont()
Dim Mfont As New Font("kartika", 20, FontStyle.Regular,GraphicsUnit.Document)
CType(Report.Section8.ReportObjects("Field45"), CrystalDecisions.CrystalReports.Engine.FieldObject).ApplyFont(Mfont)
CType(Report.Section8.ReportObjects("Field48"), CrystalDecisions.CrystalReports.Engine.FieldObject).ApplyFont(Mfont)
End SubAnd I am calling this function in the form load event of that report.Any suggestion on this is greatly appreciated........Thanks in advance..Thanks for replying.
Yes I am trying to move the 15mb of template files which are located in the Users Profile to a different location. I have modified the key in the Registry which defines this location: HKEY_CURRENT_USER\Software
Business Objects\Suite 12.0\Crystal Reports\ChartSupportPath=My Defined Location
I have done this prior to installtion and prepulated the registry and the templates in my defined location, but the installation over looks this and writes over the reg key. Even after modifying the reg key post installation, the application writes over this key and ignores what's in there. Does this mean that the Install.EXE is hard coded to always over write that location, and therefore the crw32.exe is hard coded to look in the User's Profile for the templates, and if they are not there it will create a copy for the User specific??
Thanks -
Problem with opening a Crystal Report containing parameters in InfoView
Hello everybody.
Here's the situation.
I've created a Report in CR2008 wich contains parameters to reduce the shown data. The user should be able to select one or more years. I've realized this by using a dynamic parameter that gets its values out of an data field (part of a SAP BW query, connected with the BW MDX driver of the SAP Integration Kit).
Then I've published this report using the SAP Integration Kit toolbar button.
Now there's a copy of this report in the BW Repository and in the BO Repository as well.
But here comes the problem. If I want to open this report it asks for the parameters to choose. But theres nothing to choose. Searching isn't working because it brings no results. So I couldn't open because it needs a parameter to go on that I can't choose or type in manually. Even that ones I've chosen while saving aren't offered or used by default.
It doesn't matter from where I want to open it. Double click on report in SAP BW or on that one in InfoView. Same result. Stop at the discribed point.
Open this report in the Crystal Viewer 2008 works just fine.
Changing the viewer engine to ActiveX, Java or standard wasn't successfull.
Any suggestions?
Would be nice.
Thanks a lot in advance.
Greetings,
SebastianAnyone?
Here's a screenshot of this empty listbox:
[http://img106.imagevenue.com/img.php?image=72973_03.03_122_525lo.jpg] -
Problem while importing a Crystal Report in SAP Business One
Hi Experts,
I am facing a problem while importing a Crystal Report in SAP Business One, it displaying an error "No matching records found 'Queries' (OUQR) (ODBC -2028) [Message 131-183]" , and there is no use of this table OUQR in the Query.
Kindly let me know the solution.
Regards
Rahul SinghHi Rhaul,
i don't exactly know why this is a problem, but if your not on latest (881 p10) then upgrade and try again.
Or as a workaround,
try saveing from CR to SAP with the CR add-on. That usualy works better then the import.
Regards,
D -
Problem to run the Crystal report inside from SAP B1 based on SQL views.
Hello,
I have a problem to run my Crystal report inside from SAP B1 which is based on SQL views.And the SQL views are stored in a separate database in SQL server.The error which i am getting is saying the the tablename does not exist.What i need to do in order to sort this problem.
Great if somebody can help me to sort out this so that i can run my report based on SQL views stored on separate database other than SAP databases inside from SAP B1.
Edited by: rozenagrawal on Apr 19, 2011 11:51 AMTry using a SQL synonym in your company database for the views outside the company database. I don't know if SBO will let you get away with it, but its worth a shot.
If your company database is MyCompany and you have a view called MyView in Views database, assuming the view belongs to schema dbo, and you want the synonym to belong to dbo schema in your company database, run this:
Use MyCompany
go
create synonym dbo.OutsiderView for
Views.dbo.MyView
go
select * from OutsiderView
The select statement should return the contents of MyView in the Views database while you are connected to your MyCompany database.
For more info, see the Books Online for MSSQL on topic synonym.
You will need to change your CR options to include displaying synonyms along with tables, views, etc. You may also need to grant select to B1 users.
Edited by: Cindy Lange on Apr 21, 2011 4:00 PM -
Problems with a simple stop watch program
I would appreciate help sorting out a problem with a simple stop watch program. The problem is that it throws up inappropriate values. For example, the first time I ran it today it showed the best time at 19 seconds before the actual time had reached 2 seconds. I restarted the program and it ran correctly until about the thirtieth time I started it again when it was going okay until the display suddenly changed to something like '-50:31:30:50-'. I don't have screenshot because I had twenty thirteen year olds suddenly yelling at me that it was wrong. I clicked 'Stop' and then 'Start' again and it ran correctly.
I have posted the whole code (minus the GUI section) because I want you to see that the program is very, very simple. I can't see where it could go wrong. I would appreciate any hints.
public class StopWatch extends javax.swing.JFrame implements Runnable {
int startTime, stopTime, totalTime, bestTime;
private volatile Thread myThread = null;
/** Creates new form StopWatch */
public StopWatch() {
startTime = 0;
stopTime = 0;
totalTime = 0;
bestTime = 0;
initComponents();
public void run() {
Thread thisThread = Thread.currentThread();
while(myThread == thisThread) {
try {
Thread.sleep(100);
getEnd();
} catch (InterruptedException e) {}
public void start() {
if(myThread == null) {
myThread = new Thread(this);
myThread.start();
public void getStart() {
Calendar now = Calendar.getInstance();
startTime = (now.get(Calendar.MINUTE) * 60) + now.get(Calendar.SECOND);
public void getEnd() {
Calendar now1 = Calendar.getInstance();
stopTime = (now1.get(Calendar.MINUTE) * 60) + now1.get(Calendar.SECOND);
totalTime = stopTime - startTime;
setLabel();
if(bestTime < totalTime) bestTime = totalTime;
public void setLabel() {
if((totalTime % 60) < 10) {
jLabel1.setText(""+totalTime/60+ ":0"+(totalTime % 60));
} else {
jLabel1.setText(""+totalTime/60 + ":"+(totalTime % 60));
if((bestTime % 60) < 10) {
jLabel3.setText(""+bestTime/60+ ":0"+(bestTime % 60));
} else {
jLabel3.setText(""+bestTime/60 + ":"+(bestTime % 60));
private void ButtonClicked(java.awt.event.ActionEvent evt) {
JButton temp = (JButton) evt.getSource();
if(temp.equals(jButton1)) {
start();
getStart();
if(temp.equals(jButton2)) {
getEnd();
myThread = null;
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new StopWatch().setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
// End of variables declaration
}Although I appreciate this information, it still doesn't actually solve the problem. I can't see an error in the logic (or the code). The fact that the formatting works most of the time suggests that the problem does not lie there. As well, I use the same basic code for other time related displays e.g. countdown timers where the user sets a maximum time and the computer stops when zero is reached. I haven't had an error is these programs.
For me, it is such a simple program and the room for errors seem small. I am guessing that I have misunderstood something about dates, but I obviously don't know.
Again, thank you for taking the time to look at the problem and post a reply. -
Problem with a simple GRE tunnel
Hello everyone:
I have a problem with a simple GRE tunnel, and can not make it work, the problem lies in the instruction "tunnel source loopback-0" if I use this command does not work, now if I use "tunnel source <ip wan >" if it works, someone can tell me why?
Thanks for your help
Router 1: 2811
version 12.4
no service password-encryption
hostname cisco2811
no aaa new-model
ip cef
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Tunnel0
ip address 10.10.1.1 255.255.255.0
tunnel source Loopback0
tunnel destination 217.127.XXX.188
interface Tunnel1
ip address 10.10.2.1 255.255.255.0
tunnel source Loopback0
tunnel destination 80.32.XXX.125
interface FastEthernet0/0
description LOCAL LAN Interface
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
interface FastEthernet0/1
description WAN Interface
ip address 195.77.XXX.70 255.255.255.248
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 195.77.XXX.65
ip route 192.168.3.0 255.255.255.0 Tunnel0
ip route 192.168.4.0 255.255.255.0 Tunnel1
ip nat inside source route-map salida-fibra interface FastEthernet0/1 overload
access-list 120 deny ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 120 deny ip 192.168.1.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 120 permit ip 192.168.1.0 0.0.0.255 any
route-map salida-fibra permit 10
match ip address 120
Router 2: 2811
version 12.4
service password-encryption
ip cef
no ip domain lookup
multilink bundle-name authenticated
username admin privilege 15 password 7 104CXXXXx13
interface Loopback0
ip address 4.4.4.4 255.255.255.255
interface Tunnel0
ip address 10.10.1.2 255.255.255.0
tunnel source Loopback0
tunnel destination 195.77.XXX.70
interface Ethernet0
ip address 192.168.3.251 255.255.255.0
ip nat inside
ip virtual-reassembly
hold-queue 100 out
interface ATM0
no ip address
no ip route-cache cef
no ip route-cache
no atm ilmi-keepalive
dsl operating-mode auto
interface ATM0.1 point-to-point
ip address 217.127.XXX.188 255.255.255.192
ip nat outside
ip virtual-reassembly
no ip route-cache
no snmp trap link-status
pvc 8/32
encapsulation aal5snap
ip route 0.0.0.0 0.0.0.0 ATM0.1
ip route 192.168.1.0 255.255.255.0 Tunnel0
ip nat inside source route-map nonat interface ATM0.1 overload
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 120 deny ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 120 permit ip 192.168.3.0 0.0.0.255 any
route-map nonat permit 10
match ip address 120Hello, thank you for the answer, as to your question, I have no connectivity within the tunnel, whether from Router 1, I ping 10.10.1.2 not get response ...
Now both routers remove the loopback, and the interface tunnel 0 change the tunnel source to "tunnel source " tunnel works perfectly, the problem is when I have to use the loopback. Unfortunately achieved when the tunnel work, this will have to endure multicast, and all the examples found carrying a loopback as' source '... but this is a step back ..
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Internet address is 10.10.1.1/24
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 2.2.2.2 (Loopback0), destination 217.127.XXX.188
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 09:04:38, output 00:00:19, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
11101 packets output, 773420 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out -
Help me, I have a problem with font when export report to PDF?
Hi everyone! Help me
I have a problem with font when export report to PDF
My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
when desige template no problem, error only happen when view report by PDF.
Edited by: user10236405 on Oct 15, 2008 11:23 PMgive it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.
-
Problems in using the driver coming with application in Crystal Report
Post Author: StrongWare
CA Forum: Data Connectivity and SQL
Hi! All,
I used the ADORecordSet to fetch data from tables, and pass it to ther report at runtime using AddADOCommand.
I got the ActiveConnection and ActiveCommand from ADORecordSet and passed them as parameters of AddADOCommand, it seems the AddADOCommand opens an addional connection, which can be told from the ODBC trace, instead of using the ActiveConnection I passed in.
Is that true?
It causes the big problem for me, since the ActiveConnection I passed in was opened using our OEM DataDirect driver and I assumed the AddAdoCommand uses it directly, but it is not the case!! The AddADOCommand just uses the connection information from ActiveConnection and opens an additional one. Since the connection string contains the driver name, so this connection is also opened via our OEM DataDirect Driver. But the Crystal Report tries to unlock it using its own license/password {qecr.lic,brahmabrahmabrahmabrahma} to unlock our OEM driver, which of course raises the license warning from DataDirect Driver 5.2!! After a certain grace period, any sql operations under the cover of AddADOCommand fail and thus causing the failure of AddADOCommand.
Now what is the solution?
1. how to avoid open an additional connection? or any other API I should call to avoid this?
2. How Crystal Report works with the driver coming with the application, and this driver needs to be unlocked before being used.
Thanks
StrongI don't have the any driver's source code (such as ividcpwr.dll source code), how can I modify the specific driver through labwindows.
Follow your advice I use I/O trace to get trace as follows:
1 IviDCPwr_InitWithOptions ("ke2303", VI_FALSE, VI_TRUE, "", 0x0C913064) VI_SUCCESS 14:45:10.675
2 IviDCPwr_ConfigureVoltageLevel (ke2303, "CHANNEL1", 3.8) VI_SUCCESS 14:45:11.405
3 IviDCPwr_ConfigureCurrentLimit (ke2303, "CHANNEL1", 0, 3) VI_SUCCESS 14:45:12.104
4 IviDCPwr_ConfigureOutputEnabled (ke2303, "CHANNEL1", VI_TRUE) VI_SUCCESS 14:45:12.824
5 IviDCPwr_Measure (ke2303, "CHANNEL1", 1, 0) VI_ERROR_TMO 14:45:16.207
6 IviDCPwr_GetError (ke2303, -1073807339, 0, "") 0x00000037 14:45:32.991
7 IviDCPwr_GetError (ke2303, -1073807339, 55, "Primary Error: ..................") VI_SUCCESS 14:45:32.991
8 IviDCPwr_close (ke2303) VI_SUCCESS 14:45:33.847
I cannot see any GPIB command in the trace but some IviDCPwr functions.
Besides, if I know any bug (eg. some wrong GPIB command) in ividcpwr.dll, how can I modify it before I get it's source code.
Pls teach me anytime in your conveneince.
thanks! -
Problem passing parameter to crystal report subreport from *.aspx page
Background:
I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Reports software that is bundled with Visual Studio 2005. I am passing one parameter from the asp.net page (utilizing the VB.net code-behind on the Print button) to the Crystal report. The report consists of a main report and 5 subreports. Both the main report and the subreports use the same parameter. Both the main report and the subreports are bound to stored procedures, each of which require a parameter.
Problem:
For some reason, the parameter is not being passed from the asp.net page to the report. I am receiving the following error: "CrystalDecisions.CrystalReports.Engine.ParameterField.CurrentValueException: Missing Parameter Values." However, when I remove the subreports, the parameter gets passed, and the report is invoked with no problem.
I have read in other forums that there may be an issue with the Crystal Reports software that is causing this problem. I have downloaded and run the suggested hotfix, but the problem remains unresolved. I have tried changing the linking of my main report to the subreport, but that doesn't help either. It is possible that I am doing something wrong with the linking, as this is the first time I have developed a report with Crystal Reports. I need a workaround or definitive solution. Below is the aspx code used to call the report:
Imports System
Imports System.Collections.Specialized
Imports System.Collections.ObjectModel
Imports System.Collections
Imports System.Text
Imports System.Configuration
Imports System.Data.SqlClient
Imports System.Data
Imports System.Data.SqlClient.SqlDataAdapter
Imports System.Web.Configuration
Imports Crystaldecisions.crystalreports.engine
Imports Crystaldecisions.reportsource
Imports Crystaldecisions.shared
Partial Class OACIS_Award_or_Deny_BudgetSummary_PrintRpt
Inherits System.Web.UI.Page
Dim paramFields As ParameterFieldDefinitions
Dim paramField As ParameterFieldDefinition
Dim paramValue As ParameterValues
Dim paramDiscreteValue As New ParameterDiscreteValue
Public Shared idCase, nameRpt As String
Private PrintRpt As ReportDocument
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
idCase = Request.QueryString("id")
nameRpt = Request.QueryString("prtName")
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
Dim file As String = settings.File
Dim dSource, iCatalog, userIs, passUser, appString As String
dSource = Nothing
iCatalog = Nothing
userIs = Nothing
passUser = Nothing
appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
Dim AppArray() As String = Split(appString, ";")
Dim arrayLgth As Integer = AppArray.Length
Dim i As Integer
For i = 0 To arrayLgth - 1
Dim pairIs() As String = Split(AppArray(i), "=")
Dim firstItem As String = pairIs(0)
Dim secondItem As String = pairIs(1)
If firstItem = "Data Source" Then : dSource = secondItem : End If
If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
If firstItem = "UID" Then : userIs = secondItem : End If
If firstItem = "PWD" Then : passUser = secondItem : End If
Next
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim crconnectioninfo As ConnectionInfo
Dim crDatabase As Database
Dim crtables As Tables
Dim crtable As Table
Dim crtablelogoninfo As TableLogOnInfo
Dim Fname As String
Dim Prtname As String
Dim FPath As String
Dim crSection As Section
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim subRepDoc As New ReportDocument
FPath = Server.MapPath("") + "\"
Dim rptIs As String = nameRpt
crReportDocument = New ReportDocument
Prtname = FPath
Prtname = Prtname + rptIs
crReportDocument.Load(Prtname)
Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
crconnectioninfo = New ConnectionInfo
crconnectioninfo.ServerName = dSource
crconnectioninfo.DatabaseName = iCatalog
crconnectioninfo.UserID = userIs
crconnectioninfo.Password = passUser
crDatabase = crReportDocument.Database
crtables = crDatabase.Tables
For Each crtable In crtables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
Next crtable
For Each crSection In crReportDocument.ReportDefinition.Sections
For Each crReportObject In crSection.ReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
For Each crtable In subRepDoc.Database.Tables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
End Try
Next
End If
Next
Next
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
Dim parIDCase As ParameterValues = New ParameterValues
Dim disIDCase As ParameterDiscreteValue = New ParameterDiscreteValue
disIDCase.Value = idCase
parIDCase.Add(disIDCase)
crReportDocument.DataDefinition.ParameterFields("@ID_CASE_NMBR").ApplyCurrentValues(parIDCase)
crReportDocument.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()
System.IO.File.Delete(Fname)
Catch ex As Exception
lblMessage.Visible = True
lblMessage.Text = "Error Load
" & Convert.ToString(ex)
End Try
End Sub
End Class
Your help is greatly appreciated!Thanks for your help!
I've now gotten past the "missing parameter values" error, and the report renders fine in the report viewer. However, I've encounted another problem. The data in my main report displays correctly, but the data in my subreport does not display. Of course, when I view the report in the designer, both the main report and subreport display correctly. What am I doing wrong? Below is my vb.net code:
Try
idCase = Request.QueryString("id")
nameRpt = Request.QueryString("prtName")
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
Dim file As String = settings.File
Dim dSource, iCatalog, userIs, passUser, appString As String
dSource = Nothing
iCatalog = Nothing
userIs = Nothing
passUser = Nothing
appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
Dim AppArray() As String = Split(appString, ";")
Dim arrayLgth As Integer = AppArray.Length
Dim i As Integer
For i = 0 To arrayLgth - 1
Dim pairIs() As String = Split(AppArray(i), "=")
Dim firstItem As String = pairIs(0)
Dim secondItem As String = pairIs(1)
If firstItem = "Data Source" Then : dSource = secondItem : End If
If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
If firstItem = "UID" Then : userIs = secondItem : End If
If firstItem = "PWD" Then : passUser = secondItem : End If
Next
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim crconnectioninfo As ConnectionInfo
Dim crDatabase As Database
Dim crtables As Tables
Dim crtable As Table
Dim crtablelogoninfo As TableLogOnInfo
Dim Fname As String
Dim Prtname As String
Dim FPath As String
Dim crSection As Section
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim subRepDoc As New ReportDocument
FPath = Server.MapPath("") + "\"
Dim rptIs As String = nameRpt
crReportDocument = New ReportDocument
Prtname = FPath
Prtname = Prtname + rptIs
crReportDocument.Load(Prtname)
Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
crconnectioninfo = New ConnectionInfo
crconnectioninfo.ServerName = dSource
crconnectioninfo.DatabaseName = iCatalog
crconnectioninfo.UserID = userIs
crconnectioninfo.Password = passUser
crDatabase = crReportDocument.Database
crtables = crDatabase.Tables
For Each crtable In crtables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
Next crtable
For Each crSection In crReportDocument.ReportDefinition.Sections
For Each crReportObject In crSection.ReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
For Each crtable In subRepDoc.Database.Tables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
End Try
Next
End If
Next
Next
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)
crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")
crReportDocument.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()
System.IO.File.Delete(Fname)
Catch ex As Exception
lblMessage.Visible = True
lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)
End Try
Edited by: LaShandra Knox on Sep 17, 2008 7:59 PM -
Making jar file for java application with third party (Crystal Report)
Hi all,
I'm writing a java program that integrate with Crystal Report, I can run it in JBuilder fine, but when I try to make a jar file with JBuilder and run it, it either doesn't work or give me error.
Case 1: If i only include the "dependencies", the program run but it woun't call the report when I open it. It give me the following error:
com.businessobjects.reports.sdk.JRCCommunicationAdapter
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.reports.sdk.JRCCommunicationAdapter---- Error code:-2147215357 Error code name:internal
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ILjava.lang.String;)V(Unknown Source)
com.crystaldecisions.proxy.remoteagent.z.a(Ljava.lang.String;)Lcom.crystaldecisions.proxy.remoteagent.ICommunicationAdapter;(Unknown Source)
com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int()V(Unknown Source)
com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize()V(Unknown Source)
com.crystaldecisions.sdk.occa.report.application.ClientDocument.for()V(Unknown Source)
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.for()V(Unknown Source)
com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Ljava.lang.Object;I)V(Unknown Source)
com.crystaldecisions.reports.sdk.ReportClientDocument.open(Ljava.lang.Object;I)V(Unknown Source)
GOV.NE.REVENUE.LB775.CRYSTALREPORT.JRCViewReport.launchApplication(JRCViewReport.java:43)
GOV.NE.REVENUE.LB775.LB775$5.actionPerformed(LB775.java:1114)</message>
case 2: if I include the "dependence and resources" when create jar file, then the program won't run. It gives me a message:
Cannot find main class. Program will exit.
But I do have the manifest.mf file that contain the main class.
Thank you very much for any help.Hello, I have the same problem, did you solved it?
Thanks -
Problem viewing graph in Crystal reports using VB6
I have a report created in Crystal RDC Version 9 and it has a pie chart. The chart comes out fine in
Crystal but when I view it using Report-viewer OCX embedded in a VB6 application there are blank spaces
where the graph ought to be. Database used is SQL Server.
Does anyone know how to get past this problem?
Are there any specific dll files I need to download to be able to view the graphs ?Post moved to the Legacy SDKs - SAP Crystal Reports forum.
First a sort of a 'preamble" / FYI, then an attempt at some help
CR 9, being out of support for close to 10 years, it will be tough to get any help on this. My best suggestion would be to upgrade to CR 2008 and .NET (2005 or 2008) and use the CR SDK for .NET. Or use VS 2010 with Crystal Reports for Visual Studio 2010. E.g.; unfortunately, time to move to more recent builds of CR and development language.
BTW., the SDK you are using in CR 9 has been retired in CR XI R2 (11.5) which has been out of support since June 2009. E.g.; if this turns out to be a bug of some sort, no fixes...
The help (finally)
You say the following which is a bit confusing:
Crystal RDC Version 9 and it has a pie chart. The chart comes out fine in
Crystal but when I view it using Report-viewer OCX embedded
Not sure what you mean by "Report-viewer OCX embedded". The RDC SDK consists of essentially two files; craxdrt.dll and crviewer.dll. Craxdrt.dll is the engine, crviewer.dll is the viewer. Those should really be the only two CR references in your project. Assuming that this is the case, is the behavior you are describing on your development computer, or after you deploy the CR runtime? How did you deploy the CR runtime? Does the app work as expected anywhere?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Problem of deployment of crystal report on development client
Hi,
We have a issue with running crystal report on our development server.
After crystal report files (.rpt) is saved on the BOE server, when it
is opened through InfoViewApp or OpenDocument, the connection to MySQL failed, the error message "Failed to open the connection"
Both 32-bits and 64-bits MySQL ODBC connectors are installed on the machine and both system and user DSN has been added on the system. After setting the database configuration in the CmcApp, there is no connection problem when opening the rpt file directly with another crystal report development platform, data can be correctly drawn when previewing the report.
Can you help to trouble shoot the issue ?
Any help is highly appreciated.Hi Thomas
If you are facing issue with your report only from the enterprise, I would suggest you to post you question in the Expert Forums » Business Objects » BusinessObjects Enterprise Administration.
Regards
Sourashree -
Problem of Deployment of crystal report on a x64-development client
Hi,
We have a issue with running crystal report on our development server (with OS = 64-bit Window Server 2003).
After crystal report files (.rpt) is saved on the BOE server (32-bit), when it is opened through InfoViewApp or OpenDocument, the connection to MySQL failed, the error message "Failed to open the connection"
Both 32-bits and 64-bits MySQL ODBC connectors are installed on the machine and both system and user DSN has been added on the system. After setting the database configuration in the CmcApp, there is no connection problem when opening the rpt file directly with another crystal report development platform, data can be correctly drawn when previewing the report.
Can you help to trouble shoot the issue ?
Any help is highly appreciated.Hi Thomas,
I'm not sure it's related but we've run into other ODBC issues due to the 2 seperate REG keys where ODBC is managed in 64 bit windows.
"Copy your Business Objects ODBC-related registry keys to the Win64 branch of the registry. Open regedit.exe and copy the CMS and Audit DSN keys (manually, by re-creating them -- takes 5-10 minutes) from HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ to HKEY_LOCAL_MACHINE\Software\Wow6432Node\ODBC\ODBC.INI\ "
If you aren't familiar with editing your windows registry or backing it up please open a message with support as any mistaked could potentially cause worse problems with your OS.
Hope this helps...
Regards,
Tim
Maybe you are looking for
-
Is it possible to use both inputs of my AudioBox at the same time?
I was having issues last night, and I wanted to poll the community before I declared my device deffective. I have an AudioBox- USB and managed to hook it up to GB. I tried both guitar and a microphone in Input 1 and they both worked. I decided to t
-
Acrobat X defaults to imperial
Hi I run Windows 7 Pro and have Acrobat X installed. Everytime I set the preferences to millimeters under "page and ruler units". It defaults back to inches after closing and re-opening Acrobat. Can anyone tell me how to keep these preferences? Also,
-
Hi Friends, I have done Loan confg for the first time , now i was trying to create a loan for the Employee, I have entered all the three tabs Basic data,conditions, when i entered payemnts . i get a error message saying " The Employee is not elgible
-
I have recently been converted over to iTunes administrator. I have loads of issues where I can't seem to update any of the content as I don't see the edit button in the title column of the collections page. But worse of all I am now getting error me
-
Playbook camera icon disappeared!
My playbook camera icon disappeared leaving an empty space in the "All" menu. I looked in the "Media" subfolder, it was there but then I clicked on it and it disappeared as well. The camera still works indirectly through the picture folders. As this