Crystal report broke
Post Author: Davearia
CA Forum: .NET
Hi,
Firstly apologies if this is a stupid question but I have hit a brick wall.
I have a crystal report that fails on a formula field but I cannot see why.Here is my code:
Code:Public Function CreateReportPDF(ByVal dsReport As DataSet, ByVal CrystalReportPath As String, _ ByVal reportSize As String, ByVal landScape As Boolean, _ ByVal dsParameters As DataSet, ByVal filePath As String, _ ByVal fileName As String) As Boolean Try 'Load report including report path etc. _report.Load(CrystalReportPath, OpenReportMethod.OpenReportByTempCopy) _report.SetDataSource(dsReport) 'Deal with any report parameters. Dim crParameterDiscreteValue As ParameterDiscreteValue Dim crParameterFieldDefinitions As ParameterFieldDefinitions Dim crParameterFieldLocation As ParameterFieldDefinition Dim crParameterValues As ParameterValues 'Get the report's parameters collection. crParameterFieldDefinitions = _report.DataDefinition.ParameterFields For counter As Int32 = 0 To (dsParameters.Tables("ReportParameters").Rows.Count - 1) crParameterFieldLocation = crParameterFieldDefinitions.Item(dsParameters.Tables("ReportParameters").Rows(counter).Item("Key").ToString) crParameterValues = crParameterFieldLocation.CurrentValues crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue crParameterDiscreteValue.Value = dsParameters.Tables("ReportParameters").Rows(counter).Item("Value").ToString crParameterValues.Add(crParameterDiscreteValue) crParameterFieldLocation.ApplyCurrentValues(crParameterValues) Next Dim CrExportOptions As ExportOptions Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions() Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions() 'Set the destination path and file name. CrDiskFileDestinationOptions.DiskFileName = "c:\Test.pdf" 'Set export options. CrExportOptions = _report.ExportOptions With CrExportOptions 'Set the destination to a disk file. .ExportDestinationType = ExportDestinationType.DiskFile 'Set the format to PDF .ExportFormatType = ExportFormatType.PortableDocFormat 'Set the destination options to DiskFileDestinationOptions object. .DestinationOptions = CrDiskFileDestinationOptions .FormatOptions = CrFormatTypeOptions End With 'Export the report. _report.Export() Catch ex As Exception Dim strEx As String = ex.ToString End Try End Function
The code throws an exception on the _report.Export() line.The details of the exception are:
Quote:
A string is required here.Error in File C:\DOCUME1\me\LOCALS1\Temp\Snapshot {179546E4-7F1E-419C-944C-16C97E961CF0}.rpt:Error in formula <fWeight>. 'iif({Snapshot.snapshot}=1,"",cstr({Snapshot.weight},3))'
A string is required here.Here is the dataset:
Code:<?xml version="1.0" standalone="yes"?><NewDataSet> <Snapshot> <snapshot>1</snapshot> <stage>Drawing Office</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Planning</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Released to Sub Fab</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Sub Fabrication</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Own Treatment</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Treated</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Loaded</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>In Packages</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>In Containers</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>At Site</stage> <fcode /> <stcode /> <weight>28.604</weight> </Snapshot> <Snapshot> <snapshot>1</snapshot> <stage>Erected</stage> <fcode /> <stcode /> <weight>0</weight> </Snapshot></NewDataSet>
If have hacked the field formula in the report to eliminate other problems to from this:
Quote:
iif({Snapshot.snapshot}=1,"",cstr({Snapshot.weight},3))
To this:
Quote:
iif({Snapshot.snapshot}=1,"Yep","Nope")
This gives me the same error, however:
Quote:
iif(1=1,"Yep","Nope")
Does not error, So some how the values in the dataset are not coming through.This has had me stumped all this afternoon. In the code I originally set the datasource on my report after I added the parameters. I changed this as the parameters values got wiped.Has anyone got any suggestions as to what I am doing wrong?I really struggle with crystal Thanks, Dave.
Post Author: robarahz
CA Forum: .NET
Is the Snapshot.snapshot actually IN the dataset? I mean, can you see it in the DatabaseFields in the Field Explorer? If so, is that data an integer or some type of char, becuase you're testing it for being = 1. If it's a char, this could be a problem.
Also, try right clicking on the Database Fields in Field Explorer and choose "Verify Database" or "Set Datasource Location" to make sure it's pointing to the datasource that you modified.
It's very quirky in Visual Studio. Good luck.
Similar Messages
-
Crystal Reports xi r2 integrating with vs2005
Hi,
I'm having a problem getting these two integrated and working properly with all the functionality that I need.
I installed vs2005 and then CRXIR2, and now in vs2005 when I have a report open, I have 2 Crystal Report tabs at the top and in each the options are repeated 4 times for each menu item, makes for a very cluttered menu.
Also, when I an existing report to a vb2005 asp project in the property pages/web config it adds 2 assemblies for each items, one for version 10.2.3600 and one for 11.5.3700. Is there a way that I can eliminate this.
And lastly, I use ODBC connections to a database and with the 10.2.3600 assemblies it was disconnecting right away and closing the session after the queries, while the new 11.5.3700 ones do not seem to kill the sessions and fills up the connections until I manually go out and clear them up.
I know thats a lot to deal with, but I'm sure that they are all related.
Thank you very much for your help.
JamesHi James,
Microsoft released an update for VS.NET 2005 which broke the integration of Crystal XI R2 with .NET 2005 when applied. Just do an uninstall/reinstall of Crystal XI R2 and that should fix the multiple tab and drop down issue as well as it putting in both 10.2 and 11.5 assemblies.
You should probably create a new thread for the 2nd problem if it persists after the uninstall/reinstall.
Jason -
Exporting a crystal report as PDF and Attaching to an email via code - Filename Issuses?
Post Author: alynch
CA Forum: .NET
I need to export a crystal report as a pdf and send it out via email. I have created a subroutine that works but the attached filename come up as "untitled.txt" so the receiving machine believes it is a text file. If I rename it on the recipients machine to a ".pdf" I can open it with acrobat and it looks OK. Does anyone know how to rename the file as a pdf prior to sending it out?
Thank You.
al
I have included a copy of the subroutine:
Dim repdoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
Dim diskOpts As New CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim ExpOpts As CrystalDecisions.Shared.ExportOptions
Dim MailOpts As New CrystalDecisions.Shared.MicrosoftMailDestinationOptions()
repdoc = Me.CrystalReport11
repdoc.Load("C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplication3\CrystalReport1.rpt")
ExpOpts = repdoc.ExportOptions
With ExpOpts
.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.MicrosoftMail
.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End With
With MailOpts
.MailMessage = "Message"
.MailToList = "enter email adress here"
.MailSubject = "Attached is a PDF file - .net Export test "
End With
ExpOpts.DestinationOptions = MailOpts
Try
repdoc.Export()
Catch err As Exception
MessageBox.Show(err.ToString())
End Try
End SubPost Author: Knight
CA Forum: .NET
I had this same problem today, here's what I used. Its built in 2 parts. Step one loops throught and exports PDF copies of a traking report. Step 2 builds an email list from a SQl query and sends it.STEP ONE:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'Declare the some variables Dim row1 As DataRow Dim brokerID As String Dim brokername As String Dim brokerEmail As String Dim shipdate As String Dim crParameterFieldDefinitions As ParameterFieldDefinitions Dim crParameterFieldDefinition As ParameterFieldDefinition Dim crParameterValues As New ParameterValues() Dim crParameterDiscreteValue As New ParameterDiscreteValue() Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions Dim crParameterFieldDefinition1 As ParameterFieldDefinition Dim crParameterValues1 As New ParameterValues() Dim crParameterDiscreteValue1 As New ParameterDiscreteValue() Dim CrReport As New CrystalReport1() ' Report Name Dim report As ReportDocument = "O:KNIFormats_ReportPrivateSMStageShipmentInfo" Dim CrExportOptions As ExportOptions Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions() Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions() Dim SHIPDATE123 As String SHIPDATE123 = _month & "/" & _day & "/" & year Dim db As String db = System.Configuration.ConfigurationSettings.AppSettings("Datalogin") Dim sqlCon As New SqlConnection sqlCon.ConnectionString = db Dim strsql1 As String strsql1 = "SELECT tblSOOrd_Hdr.BrokerCd, tblSO_Ord_Hdr.BrokerName, tblSM_Ship_Hdr.ShipDate " strsql1 &= "FROM tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND " strsql1 &= " tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd " strsql1 &= "GROUP BY tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSO_Ord_Hdr.BrokerName " strsql1 &= "HAVING (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') " Dim da1 As New SqlDataAdapter(strsql1, sqlCon) Dim worktbl1 As DataTable worktbl1 = New DataTable("tblEmail") da1.Fill(worktbl1) da1.FillSchema(worktbl1, SchemaType.Source) If worktbl1.Rows.Count > 0 Then For Each row1 In worktbl1.Rows brokerID = CStr(row1("BrokerCd")).Trim brokername = CStr(row1("BrokerName")).Trim shipdate = CStr(row1("ShipDate")).Trim CrReport.Load() crParameterDiscreteValue.Value = shipdate crParameterFieldDefinitions = CrReport.DataDefinition.ParameterFields crParameterFieldDefinition = crParameterFieldDefinitions.Item("ShipDate") crParameterValues = crParameterFieldDefinition.CurrentValues crParameterValues.Clear() crParameterValues.Add(crParameterDiscreteValue) crParameterFieldDefinition.ApplyCurrentValues(crParameterValues) crParameterDiscreteValue1.Value = brokerID crParameterFieldDefinitions1 = CrReport.DataDefinition.ParameterFields crParameterFieldDefinition1 = crParameterFieldDefinitions1.Item("Broker") crParameterValues1 = crParameterFieldDefinition1.CurrentValues crParameterValues1.Clear() crParameterValues1.Add(crParameterDiscreteValue1) crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1) CrDiskFileDestinationOptions.DiskFileName = "c:Test_Folder20" & _year & "-" & _month & "-" & day & "" & brokername & ".pdf" CrFormatTypeOptions.FirstPageNumber = 1 ' Start Page in the Report CrFormatTypeOptions.LastPageNumber = 1000 ' End Page in the Report CrFormatTypeOptions.UsePageRange = True CrExportOptions = CrReport.ExportOptions With CrExportOptions .ExportDestinationType = ExportDestinationType.DiskFile .ExportFormatType = ExportFormatType.PortableDocFormat .DestinationOptions = CrDiskFileDestinationOptions .FormatOptions = CrFormatTypeOptions End With Try CrReport.Export() Catch err As Exception MessageBox.Show("DID NOT EXPORT") End Try Next MessageBox.Show("All PDF's exported succesfully") End If End SubSTEP 2: Private Sub Button3Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim row2 As DataRow Dim SHIPDATE123 As String SHIPDATE123 = _month & "/" & _day & "/" & year Dim db1 As String db1 = System.Configuration.ConfigurationSettings.AppSettings("Datalogin") Dim sqlCon As New SqlConnection sqlCon.ConnectionString = db1 Dim strsql2 As String strsql2 = "SELECT tblSOOrd_Hdr.BrokerCd, tblSys_Cust_Broker.BrokerName, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail " strsql2 &= "FROM tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND " strsql2 &= " tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd " strsql2 &= "GROUP BY tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail, tblSys_Cust_Broker.BrokerName, tblSys_Cust_Broker.Email_ASN " strsql2 &= "HAVING (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') AND (tblSys_Cust_Broker.Email_ASN = 1) AND (tblSys_Cust_Broker.ContactEmail <> '') " Dim da1 As New SqlDataAdapter(strsql2, sqlCon) Dim worktbl2 As DataTable worktbl2 = New DataTable("tblEmail12") da1.Fill(worktbl2) da1.FillSchema(worktbl2, SchemaType.Source) Dim brokerID As String Dim brokername As String Dim brokerEmail As String Dim shipdate As String If worktbl2.Rows.Count > 0 Then For Each row2 In worktbl2.Rows brokerID = CStr(row2("BrokerCd")).Trim brokername = CStr(row2("BrokerName")).Trim brokerEmail = CStr(row2("ContactEmail")).Trim shipdate = CStr(row2("ShipDate")).Trim Dim mail As New MailMessage Dim att As String att = "c:Test_Folder20" & _year & "-" & _month & "-" & _day & "" & brokername & ".pdf" 'set the addresses mail.From = New MailAddress("[email protected]") mail.To.Add(brokerEmail) mail.Attachments.Add(New Attachment(att)) 'set the content mail.Subject = "Shipment Tracking report from Knox Nursery for " & SHIPDATE123 mail.IsBodyHtml = True mail.Body = "
" mail.Body &= "This shipment update has been requested by:
" 'send the message Dim smtp As New SmtpClient smtp.Send(mail) ' MessageBox.Show("No Records Found", "Failed to send", MessageBoxButtons.OK, MessageBoxIcon.Stop Next Else MessageBox.Show("No broker have opted in", "No Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) End If MessageBox.Show("Emails sent... ", "Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) End Sub -
Crystal Report and Oracle SDO_GEOMETRY
Hi,
<br />
<br />
I'm using Crystal Reports for Eclipse version 2.0.4.r825 with Eclipse 3.5 and Oracle 11g as database. I configured the database connection using ojdbc14.jar. Some of the tables i want to use in the report contains columns using the SDO_GEOMETRY data type and if i try to drag this table in the data tab of the report i get the following "Unexpected ValueType" error:
<br />
<br />
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Could not Add Object.
Unexpected ValueType: ValueType=[255]---- Error code:-2147215362 Error code name:unknownError
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:65)
at com.businessobjects.crystalreports.designer.core.commands.ReportCommand.throwExecFailure(ReportCommand.java:253)
at com.businessobjects.crystalreports.designer.core.commands.ReportCommand.internalDoCommand(ReportCommand.java:126)
at com.businessobjects.crystalreports.designer.core.commands.ReportCommand.execute(ReportCommand.java:237)
at com.businessobjects.crystalreports.designer.uibase.gef.commands.CoreCommand.execute(CoreCommand.java:70)
at com.businessobjects.crystalreports.designer.dseintegration.DSEDropHandler.drop(DSEDropHandler.java:114)
at org.eclipse.jface.util.DelegatingDropAdapter$3.run(DelegatingDropAdapter.java:211)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.util.DelegatingDropAdapter.drop(DelegatingDropAdapter.java:209)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:456)
at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:258)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:363)
at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:289)
at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:172)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType: ValueType=[255]---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:741)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
<br />
<br />
I tried the same with the Crystal Reports 2008 trial version and i'm having the same problem.
<br />
<br />
I don't wanna use the geometry column in my report but because of this error i can't use the whole table. Is there a way to avoid this error and still use the other columns of the table. Or maybe there is another way to connect to an Oracle database which can handle this special data type.
<br />
<br />
Thanks in advance,
<br />
<br />
Jens KellerHi Jens,
Views would work also as you noted.
No, if DB manufacturers change/update their Servers/clients they need to follow ANSII 92 standards. If they don't return the correct data type then CR will not "hack" our drivers to fix their issues. We did that for years and was a code nightmare, when they got around to fixing the problem it broke CR again. We decided to follow the standards, it may be our issue sometimes but in this case unique data types typically are not supported by CR. If you want support and it's not a client issue then add your request to the Enhancement Request2 post.
So yes in your case it would make it easier but for others they'll be asking why CR doesn't show all fields. Same reason.... not a CR issue.
Thanks agian
Don -
How to create user editable Crystal Report with dynamic dataset
What I would like to achieve:
A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
What I do:
CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
CrReport.Load(TemplateFilename)
Dim Results As DataTable
DataTable is filled from a database
CrReport.SetDataSource(mResults)
CrReport.SaveAs(NewReportPath, True)
The NewReportPath is opened in the default program.
What are the problems
The report is open in preview mode (not in design).
When the field is added to the report the designer asks for XML datasource on preview.The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?
-
Broken install of Crystal Reports Server XI R2
Hi
In attempting to install some .NET applications I inadvertantly broke our Crystal Report Server (CRS) XIR2 installation, which was at SP2..
The problem caused the following services to fail:
CMS
CR Cache Server
CR Page Server
Input Fle Repository Server
Output file repository Server
Report Application Server
The changes made to the server that caused the problem involved installing and removing different Crystal client and .NET packages. I also ran out of disk space but that was resolved withiout it fixing my CRS issue.
I have tried to resolve this by installing SP5, in the hope that any invalid DLLs will be replaced during the SP5 install.
However, we still have the problem and I am wondering what to look at next. All the servers have moved from 11.5.8.826 to 11.5.11.1470 as a result of the application of SP5, but I am guessing the objects causing the problem are outside the scope of the SP5 install.
Any suggestions? Can anyone who has CRS XI R2 installed give me a list of ancillary Crystal applications and versions they depend on?
Thanks Jack, London UKA detailed review of the Windows Application Event log shows this sequence of events
I was trying to get a .NET Crystal automation program to run and it was not working - it looked to me like I need to install a Crstal runtime client to make this work. I realise we should use a test server but this is a small business with no VMs and only a few servers.
Up to 15:49:49 - Crystal Reports Server was running normally. At that time Crystal Reports Basic Runtime was reconfigured - I think I tried using Repair from within Add/Remove Programs. This attempt failed, so I removed it Product Name: Crystal Reports Basic Runtime for Visual Studio 2008. Product Version: 10.5.0.0. Product Language: 1033. At that point the log records application errors for the BO Page Server - full text:-
Event Type: Warning
Event Source: BusinessObjects_pageserver
Event Category: Transport
Event ID: 34700
Date: 20/01/2010
Time: 17:33:48
User: N/A
Computer: <server name removed>
Description:
Transport error: Invalid object reference.
In addition there were Job Server child errors like this:-
Event Type: Warning
Event Source: BusinessObjects_jobserverchild
Event Category: Transport
Event ID: 34700
Date: 20/01/2010
Time: 17:34:10
User: N/A
Computer: <server name removed>
Description:
Transport error: Invalid object reference.
At that point Crystal Reports Server had stopped working -
If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as belowFirst: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Sales quote layout rows doubled in crystal report layout
Dear All,
Sales quote layout rows doubled in crystal report layout.
In sales quote layout the rows are doubled. Even in the standard layout. If the quote contains only two rows. Then it is doubled as 4 rows in the crystal report layout.
It is happening in the particular database. Other database are working fine. I request you people to help me to overcome this issue.
Regards,
SivaHi Siva,
If this is regarding CR in SAP B1 then please repost to the SAP Business One Application space.
-Abhilash -
Sale Order Query Print layout/Crystal Report Query required
Hi Experts,
I created a Sale Order. Items included in it are service and material.
(I created a BOM, bound the child material item to the parent service item. Moreover child item will have unit price where as parent item will not have unit price)
I need the report on it please let me know how i can do it.
I tried with below query
select a.DocEntry, a.DocNum, a.CardCode, a.CardName, b.DocEntry,b.ItemCode, b.Dscription, b.Quantity, b.Price, b.LineTotal, a.DocTotal, a.VatSum
from ORDR a inner join RDR1 b on a.DocEntry = b.DocEntry
--and b.TreeType <> 'N'
where a.docnum = '14240621'
output of above query is
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
2493.76
43940.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0001
Material for PROVIDING & LAYING
17.62
2800
49336
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
1980
19908.9
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0002
Material for BM CM INCLUDING CEMENT
10.055
1650
16590.75
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
116.5
7572.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0003
Material for P/APPLYING
65
65
4225
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
31625.05
70618.74
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0004
Material for P& FIXING
2.233
44000
98252
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
3593
10779
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0005
Material for PROVIDING RMC
3
4847
14541
354652
18888.46
and my desired output is
Unit price of both child item and parent item should be display in single column. ie. cumulative in Unit Price Column and Linetotal respectively.
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
5293.76
93276.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
3630
36499.65
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
181.5
11797.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
75625.05
168870.7
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
8440
25320
354652
18888.46
please let me know the update on this.
with regardsHi Nagarajan,
thanks for reply..
1) Yes, i.e i have taken into BomType: Template
2) i did not get any helpful output by using treetype by keeping 'S' and 'N', i kept in comment.
3) Actually MT0001-05 - these are material item- unit prices are fixed. see in attached image
for parent item, unit prices are not fixed. I give the price for them in Sale Order.
I want unit price for parent and child should be summed/cumulative for Sale Order print.
(in my above post, first matrix exactly same as sale order line items plz check it)
Please help me, how i can achieve this by query(for PLd or Crystal report)
With Regards -
SQL Connections remain open after Crystal Report closes
I am wirting an interface to use the crystal report viewer to print reports, connecting to a Progress Open Edge 10.1B database. From our application we declare the application, report, exportoptions and connectionproperties objects and pass these to the crystal reports viewer. Once the report is printed we release the objects and set their variables for null. However we are finding that the SQL connection to the database is remaining connected and we can only release the connection by manually going in a disconnecting.
I have read in forums that people use .dispose or .close to release the connection, however we do not have access to these methods as we do not use .NET. Are there any methods we can use to disconnect these sql connections?Hi Dean,
Moved to the Legacy Application forums. Likely using the RDC as your report engine.
You should still be able to close and dispose of the report objects. They are not specific to .NET.
In VB it would look something like these lines::
crReport.Close
Set CrystalActiveXReportViewer1.ReportSource = Nothing
Set crReport = Nothing
Once the report is closed it should disconnect from the DB. If you close the application does that disconnect?
Have you looked on 4GL's site for info on how to?
Thank you
Don -
Dunning Letter as Crystal Report: What tables? (SAP B1 9.0)
Dear Experts,
I am being asked to revise the Dunning Letters for our clients. The existing PLDs for each Dunning Letter shows most data fields as system variables. The existing Crystal Report for Dunning Letter 1 is a conversion from the PLD and doesn't show table information for most of the report's main items. There are tables in the report but they are standard ones (OADM, OADP, OCRD, OHEM, OSLP). It also includes a "table" called "PLD__ITEMS" which has all the PLD system variables and no B1 table or field/column information.
As I'm just now starting to work with dunning letters, I see that I can't even run this report in Crystal. The PLD__Items datasource prompts me for a file path and class name. Any ideas what one enters here to run the report outside of B1 (from the Crystal report designer)?
The main focus of my question is: Has anyone created a Crystal Report to replicate the Dunning Letter and if so, what tables are involved and how are they connected? If I can create a Dunning Letter entirely in Crystal, I can replicate it across all clients and get the correct fields/columns of data the clients want. The inclusion of the PLD__Items apparently limits my ability to test the results. I would prefer to avoid the PLD limitations.
Thanks for any assistance.Thank you Nagarajan. I have a dunning letter created in Crystal Reports for our client. It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer? Typical document layouts run for the document that's on the screen. In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP". I have to limit the report to one customer at a time. Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables? Thanks.
Michael
Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer. While it works fine in Crystal itself, it doesn't work in B1 at all. I had thought that by limiting the report in this way, it would only create dunning letters for a single customer. -
Exporting Crystal Report to HTML is not working in Windows 7
Hi Sir,
I am trying to export Crystal Report to HTML format using VB.NET code. Functionality is working fine at Windows XP Environment (Save to Disk, Open an Application and Email Attachment). But the same functionality is not working at Windows 7 Environment (both 32-Bit as well as 64-Bit).
Below is the code to Exporting Crystal Report to HTML in VB.NET.
Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions
Dim CrFormatTypeOptions As New HTMLFormatOptions
Dim vFormat As Integer
Dim CrExportOptions As New ExportOptions
Dim vRdReport As New ReportDocument
Dim sfd As SaveFileDialog
Dim vFileName As String = Nothing
vRdReport = vRptSource
sfd = New SaveFileDialog
If Not (vRptPath = "") Then
sfd.InitialDirectory = vRptPath
End If
sfd.Filter = "Webpage, Complete(.htm;.htm)|.htm|Web Archive, Single file(.mht)|.mht|Webpage, HTML only(.htm;.html)|.html"
If sfd.ShowDialog = DialogResult.OK Then
' Set the disk file options.
CrDiskFileDestinationOptions.DiskFileName = sfd.FileName.ToString()
Else
Return
End If
CrExportOptions = vRdReport.ExportOptions
CrFormatTypeOptions.HTMLFileName = vFileName
CrFormatTypeOptions.HTMLEnableSeparatedPages = True
CrFormatTypeOptions.HTMLEnableSeparatedPages = True
CrFormatTypeOptions.HTMLHasPageNavigator = True
CrFormatTypeOptions.UsePageRange = True
With CrExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.HTML32
.DestinationOptions = CrDiskFileDestinationOptions.DiskFileName
.FormatOptions = CrFormatTypeOptions
End With
vRdReport.Export()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Code working fine at Windows XP, But it is not woking in Windows 7 environment.
Please can anyone share your valuable thoughts or ideas reg. this.
Thanks in Advance
Deivanayaga Perumal D.user13509659 wrote:
Run this code to reproduce the issue.Which issue?
It looks like inheritance is broken in the component hierarchy for JFrame in Windows 7 JDK 1.6.0_23-b05. The only thing remotely related to inheritance in your code snippet is the WindowListener, which does little. See camickr's advice about built-in exit management.
EDIT - using the post title as a clue, I realize you may be talking about the component hierarchy, and whether the contentPane's background is visible through the upper layers. Instead of guessing, I'd prefer you describe your "issue" accurately (observed vs expected behavior).
Edited by: jduprez on Feb 10, 2011 1:01 PM -
Print crystal report without using the print button on toolbar
Hi,
I am working on Crystal report XI. I need to print the report w/o using the toolbar. So I have inserted a print icon in the report. On clicking that icon it should call a jsp page which will print the report. I am not able to call any print methods provided by JRC to do this.
Can someone help me with this problem.
Is there some other way to implement it ?
Thanks
Message was edited by:
CR_newbiePrint the report where? On what printer? The server's printer?
Java code runs on the server. You can't affect the client's computer from JSP.
You can write javascript code which can call window.print() but that is working through the browser to display the print dialog box (as if the user selected file:print) -
Performance issue - Open a Crystal Report from SAP BW
Hi,
I have an general question on the performance of Crystal Reports: We are using Crystal Reports 2008 SP 2 in context with SAP BW 7.0. We don't have a BO XI. We use the BW as a central storage for our reports. Now we have the problem that the opening of some reports takes a long time. For expample one report needs ~13 secound an another > 5 minutes.
Where can be the problem? What happens in SAP BW when a report is called? And what can we do to make it faster?
Thanks for your informations!Hi Ingo,
the value of MaxPickListSize is "c8".
Yesterday I have spent a lot of time to find the bottleneck. I have traced the SQL statements, which are performed from Crystal Reports / Integration Kit when I open a report. It might be the values for the parameters. That's our situation:
Crystal Reports
|
Query (restriced on Cube 1)
|
MultiProvider
- Cube 1
- Cube 2
- Cube 3
- DSO 1
The slow report is based on the BW Query and in the filter restricted to the Cube 1. If I open the report, all values for the parameters are read from all the InfoProviders under the MultiProvider (Cube 1, Cube 2 Cube 3 and DSO 1). The very big DSO 1, which is not used, increases the duration extremly. This may not be the desired behavior?! Is this a bug? I would expected that only the values are loaded from Cube 1. -
Huge delay in Printing Crystal Report Layout
Good Day Experts,
I am experiencing big delays when printing a document that makes use of a Crystal Report Layout Design.
For example,
The Sales Quote is set to automatically print when added by the user.
When clicking 'Add', SAP freezes up and only about 30 seconds later does the printer finally print the document.
During that time, the user cannot use SAP at all.
The layout does have a lot of fields and a few formulas here and there.
Logically, I am thinking that that is the reason for the delay, as SAP needs to calculate and populate those fields.
Is there any other way that I could speed up this process? Or if you know what might be causing this speed issue?
Your assistance will be appreciated,
Thanks
Regards
DarioHi Dario,
Pl Try the Below Threads and Ref SAP Notes Provided by NagaRajan.
http://scn.sap.com/message/13419121#13419121
http://scn.sap.com/thread/2024941
Regards,
Vamsi
Maybe you are looking for
-
Sale order stock de-assigning.
Dear Gurus, Please address this scenario: Suppose I have a strategy which consumes from stock every time a sale order is raised. Imagine the situation that I have a stock of 50kg for a material and I receive a sale order for 30 kg, so automatically 3
-
Having an issue printing in Adobe Reader XI
I am trying to print a PDF that was created with Bluebeam in Adobe Reader XI. When it prints the first page is fine but all following sheets are shift down and to the left. This is the first time I have had this issue with a print created with Blue
-
Can't convert PDF to .doc or .docx
I just purchased ability to convert files to Word. One PDF worked (1 page). I am trying to convert another PDF to word and it is saying conversion failure. I have tried using Send to Word and Adobe Document Cloud. Any advice?
-
Text data source and Info object?
Hi I have created Texts data source in R/3 and our onsite folks have asked me to create relavant info objects in BW as well.I need to validate against the data source created in R/ 3for use short med or long text all should support mulilang.Can any b
-
Hi, I would like to know what is the maximum JMS connections weblogic server can handle anytime. And where do we set this parameter? we have a group of Message Listeners listening to a Queue on weblogic by open