In a Windows Forms application written in C# in Visual Studio 2013 Pro, I created two different Crystal Reports reports for printing different labels on two different 'Zebra UPS 2348+' printers installed and connected via USB to my Windows 7 Pro 64-bit PC with 'CRRuntime_64bit_13_0_14.msi' installed. Each report has a SQL Server table as data source. the respective tables are populated programmatically prior to calling the respective print methods. When I run the application in Visual Studio and when I install and run the application on my PC, the labels print as expected with no errors. However, when I connect and install the printers, install 'CRRuntime_64bit_13_0_14.msi', and install and run the application on any other Windows 7 Pro 64-bit PC, one of the printers (see SlotLabel below) throws a 'Failed to open connection...' exception, while the other printer (see OrderLabel below) prints the label as expected with no errors. The printer names, drivers, and settings are exactly the same on the other PCs as they are on my PC, but the results consistently differ. Does anyone have any idea why? Code snippets follow.
using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared;
try { SlotLabel slRpt = new SlotLabel(); slRpt.PrintOptions.PrinterName = "SlotLabels"; slRpt.PrintToPrinter(1, false, 0, 0); slRpt.Close(); slRpt.Dispose(); } catch (Exception ex) { MessageBox.Show("PrintSlotLabel error: " + ex.Message); }
try { OrderLabel olRpt = new OrderLabel(); olRpt.PrintOptions.PrinterName = "OrderLabels"; olRpt.PrintToPrinter(1, false, 0, 0); olRpt.Close(); olRpt.Dispose(); } catch (Exception ex) { MessageBox.Show("PrintOrderLabel error: " + ex.Message); } |
odd Crystal Reports printing problem
Questions on moving XI R2 to 2013
Hi there,
I had a couple of questions about moving from Crystal Reports XI R2 Sp3 to 2013.
1. In XI R2 there was a limitation by process that no more than 2 Reports could be generated by the viewer object at a time. Is this throttle still implemented in 2013? If we need to spawn more RPT's at 1 time what is recommended. This is a .NET client/server application using the report viewer control, not web.
2.In XI R2 there was an option for using Multi select report parameters. In our tests last year with 2013 this option was grayed out not allowing multi select options. For example if you want to have a parameter by user name or a branch location, we would have a report parameter option to multiselect branch 1, 2, and 5. Is there a work around for this if we have older reports that used this feature, or is it fixed and allowed with the latest versions?
3. As far as the RunTime goes, is it possible to slowly migrate to 2013 having references to both versions of the Report Viewers? Or can you only have 1 version of the Report Viewer referenced at a time?
4. Has anyone tried an in-line ClickOnce app to launch an executable and if it doesn't find the Crystal 2013 runtime to download the clickonce app as needed?
5. I have asked this before without clarification that the 2013 version will remove the extra calls to SP Columns Rowset trying to pull down the schema of the tables for sub-reports. This really slows down the reports hitting SQL Server directly over the Wide Area Network (WAN).
Thanks!
Jeff
Microsoft Windows Update KB3078601 is giving errors in Crystal reports; 'Generic error occurred in GDI+'
The latest update from Microsoft has broken something in crystal reports. Update KB3078601. This is on Crystal Reports XI Release 2.
The report/form previews but throws up the error 'A generic error occurred in GDI+.' in a Crystal Report Windows Forms Viewer.
The form has bar codes. It will not print.
It's a patch that came out 8/15/15 marked as critical. Will there be a patch from SAP to fix this? currently the work around is to uninstall the Windows update.
Thank you for any help!
Monica
Logon Failed Error
Hi
I am running a c# .Net app which loads a Crystal Reports (2008) report with multiple subreports. I am able to run the report fine from Crystal Designer preview. But when I load the report from my code I get a login screen and when I supply the password, it gives me the Logon failed error and the report does not load.
Points:
1. My code is able to load other Crystal reports with no problems
2. Using SQL 2014 - other reports use this also and no issues
3. This report was working well until a couple of days ago - I have not made any major changes
Code Snippet:
Trouble loading image from disk at report runtime
Hello,
I am using Crystal Reports 2013, and have developed several reports that include graphics. Some of these graphics are intended to be replaced by our customers to customize the reports. My understanding from what I've read in response to this issue encountered by others is that it can be done in the following fashion:
- In the Crystal Reports editor, use the Insert | Picture... command to select an image from disk and place it in the report. I have read that the intent of this is to have a placeholder for an image, any image, to be loaded when the report is run.
- Select the image just inserted and select, Format Graphic..., from the image context menu. On the picture tab click the x-2 formula button on the Graphic Location: control.
- Enter a formula that uses a reference to specify the path to the image on disk that will be dynamically load at report run time. I have read that it is important to use a reference, like a formula or parameter field, to specify the image file. In my case I created a formula field that is defined as follows: Left (Filename, InStrRev (Filename,"\") - 1). Since my report graphics are all stored in a sub-folder under the reports folder, I simply combine, \Graphics\CustomerLogo.jpg, to the formula field.
- My image place holder is already in place because of step 2. My expectation from what I have read is that I can simply replace the graphic file on disk in the location I've specified with another graphic, then run the report and see the new graphic, same file name but new content, display.
The problem: I only see the graphic as it appeared when originally added to the report. It is my understanding that this may happen when the reference to the image, considered dynamic, is not found or there is some other issue.
Questions: Can images be loaded into a report at report runtime? How do I load an image into a report at report runtime?
Repectfully,
Jeff
Crystal Report Viewer hangs in IE 11 while trying to export reports
Hi
I am using crystal report viewer version 13.0 for reports in a asp.net web application.
When I deployed this application some of the users are facing the problem with crystal
report viewer while trying to export.
It happens to be that when a user clicks on export button the export dialog window opens up and freezes the browser,like it goes into 'Not responding' state.
Also I checked on the other threads which provided solutions like
>has access to temp folder.
>Do not save encrypted pages to disk->unchecked.
But nothing could solve this issue.
What could be the reason for this kind of problem?
Need help.
Thanks in advance.
[COMException (0x800001fb): Invalid file name.] error on arvixe shared host
am working on web application with vs 2010 and CR for VS 2010. am however having invalid filename error on display of crystal report. like i suspected it a permission issue. but my host can not give any more permission for share host.
i will like to know if it is technically possible for crystal report to bypass C:/ drive to display it report.
as my host claims crystal report works on the same server for others with same configuration.
like to know any possible way out of this error.
Out of Memory Exception when printing Crystal Report in C#.NET Web Service
I am receiving an out of memory exception while trying to print a crystal report. The report has about 10 barcodes on it and it will print about 1 in every 50 attempts. The error I am receiving is below:
Out of memory. - at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y, StringFormat format)
at CrystalDecisions.Shared.PageRender.draw_FieldObjectInstance(FieldObjectInstance fieldObject, Graphics g)
at CrystalDecisions.Shared.PageRender.draw_ReportObjectInstance(ReportObjectInstance instance, Graphics g, Rectangle clipRect)
at CrystalDecisions.Shared.PageRender.draw_SectionInstance(SectionInstance section, Graphics g, Rectangle clipRect)
at CrystalDecisions.Shared.PageRender.Render(PageObject page, Graphics g, Graphics device_g)
at CrystalDecisions.Shared.PrintingHelper.PrintPage(PrintPageEventArgs e, PageObject page, PrintLayoutSettings layoutSettings, Int32& currentPageNumber, Int32& currentHorizontalPageNumber)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintPageEventHandler(Object sender, PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
I am running SP14. I was able to move to a different web server running SP5 and it will print fine.
Has anybody else had this issue? And is it a known issue? I read that KB3078601 Windows update could cause it, but I have uninstalled and am still experiencing this issue.
PrintToPrinter: A generic error occurred in GDI+ everytime
Thanks.
Malayalam Consonants doubles while printing in Crystal Reports 9.22
Hi all, I am developing an Application software in VB.net 2008 and Crystal Reports 9.2.
I am printing the .rpt file directly.
the code is:-
Dim myReport As New ReportDocument()
myReport.Load("K:\H-Temple\TempleSoft\Reports\rptSaleBill.rpt")
myReport.PrintToPrinter(1, True, 0, 0)
the consonants always double while printing.
pls help me experts...
Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0
Hi,
I installed on my development machine Crystal Report 2011. I am using asp.net framework 4.5.1. I wrote a c# code that should basically load a crystal report on disk to export it in pdf. The code always breaks on the line where the ReportDocument is instantiated:
ArrayList ParameterArrayList = new ArrayList(); //Report parameter list
ReportDocument objReportDocument = new ReportDocument();//The line where the code always breaks.
ReportBase objReportBase = new ReportBase();
string sRptFolder = string.Empty;
string sRptName = string.Empty;
sRptName = "CusOrderHistory.rpt"; //Report name
sRptFolder = Server.MapPath(@"C:\Users\Admin\Documents\CrystalReports"); //Report folder name
/*The report with one parameters. */
ParameterArrayList.Add(0);
ParameterArrayList.Add("ALFKI"); //Parameter 1 with input 1. This is actually dept id according to report parameter
//ParameterArrayList.Add(1);
//ParameterArrayList.Add("1"); //Parameter 2 with input 1. This is actually team id according to report parameter
objReportDocument = objReportBase.GenerateReport(sRptName, ParameterArrayList, sRptFolder);
objReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, @"C:\Users\Admin\Documents\CrystalReports\CusOrderHistory.pdf");
The full message error is:
{System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at ReportBase..ctor() in c:\Users\Poincare\Documents\Visual Studio 2012\Projects\Reports\Reports\ReportBase.cs:line 21
at Reports.Controllers.WeeklyController.ExportCrystalReport() in c:\Users\Poincare\Documents\Visual Studio 2012\Projects\Reports\Reports\Controllers\WeeklyController.cs:line 32
}
I referenced the dll for CrystalDecisions.ReportAppServer.ClientDoc in my web application. But still the code always breaks on that particular line. I had also installed the Crystal Report Runtime 64 bit. My machine is a Windows 10 Pro 64 bit. Any help in that regard would be appreciated. I searched the internet but none of the solutions proposed solved my specific problem.
Thanks
Crystal report sub report not loading
In Crystal report with VS 2010 this below error comes with reporting and sub reporting
Failed to open connection
Deatsils: [Database Vendore Code:17]
Failed to open the connection.
temp_4fo467cf-5821-448d-9674.rpt
Deatils: [Database Vendore Code:17]
Please give me idea solve this problem soon
xml with schema merge issue
Hi,
I am having difficulty merging a XML with schema data source on the C# for CR 2013. I am setting the new data source via:
DataSet data = new DataSet();
if (schemaPath != null)
{
data.ReadXmlSchema(schemaPath);
}
data.ReadXml(path);
rpt.SetDataSource(data);
foreach (var report in rpt.Subreports)
{
if (report is ReportDocument)
{
var subreport = report as ReportDocument;
subreport.SetDataSource(data);
}
}
I am merging the report via GenerateReport call. It crashes at the call with
09-14-2015 04:04 : System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
at Delta360CrystalWrapper.ReportRoot.GenerateReport(String pFormat, String pFileName) in C:\Users\Thaban\Documents\!Projects\delta360crystaltest\Delta360CrystalWrapper\ReportRoot.cs:line 229
at Delta360DocMergeFile.Program.load2(String fileName) in C:\Users\Thaban\Documents\!Projects\delta360crystaltest\Delta360DocMergeFile\Program.cs:line 157
This supplied XML and schema works fine when i do throuyght the crystal merge "Database -> Set Datasource Location. It crashes only through visual studio c# calls. The output file is set to C:\temp\out.pdf, which has write/read permission.
Any suggestions?
Thaban
.Net Report Parameters
I have been using 11.5 for years. I switched to .NET this year. I am use to being able to use the print out method to print a crystal report without the viewer. If I have parameter under 11.5 the prompt popup comes up and asks for the parameters. Now it gives me an error about the values not being set. Is there a way to ask for the parameters rather than passing values behind. I just want the prompt to popup and ask them the values that are located inside the report. Thanks in advance.
Crystal Reports Crosstab overlapping issue
I need some assistance to diagnose an issue with crystal reports overlapping occurs in one of my reports where Cross tab is being used inside sub-report , the crosstab overlaps the next section, our current version of Crystal run time is 13_0_7 it run in 32 bit mode , the report was working fine in Crystal 2008 runtime SP3 before we upgrade our system to use the 13_0_7 version.
Thanks in advance !
visual studio 2013
Hello to Experts,
I've been getting solutions from discussions itself. so would like to thank you all.
I am using sap crystal report 13.0.1.2.1494 with visual studio 2013 pro
and installed this app using clickonce.
I have seen updates regularly.here -SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
My question is do we have to regularly update our sap crystal report version in visual studio and on user machines?
if I decide to finalize (that means no further changes the visual studio app ) my final app with above crystal report. will it still work at end user in 2020?
I am thinking for long run. very soon I am finalizing click once app for our end users just wondering how sap crystal report works?
apology if it is silly question for you
thanks
Ash!
Crystal ExportToPDF rendering Differently on Server vs Local
Hi
So in our software we use the crystal reports dot net runtime with the push method to create a pdf with the exporttopdf function.
However we see a lot of differences in the way the PDF is rendered in terms of font sizes, and spacing and runoff, even when the font is available on both systems (like Times New Roman).
On the server we have:
Windows Server 2008 R2 Datacenter
On Local we have:
Windows 7 Professional
What settings could cause these differences?
Of the things I've tried was the "No Printer" option to take the print drivers out of the equation and that did not help.
API to run reports with parameters in Business Objects
Hi Everyone,
I am working at a company that uses Business Objects XI Release 2 as a repository for Crystal Report reports. Some reports uses dynamic parameters for Start and End date that usually corresponds to the 1st day of previous month and last day of previous month. I want to know if there is an API in .NET that can be installed on a development client machine and that allows basically to access a folder on Business Object, and the reports inside that folder to run a Crystal Report report.
Thanks in advance Everyone for your help.
What 64bit CR Adavanced delveloper editions available
Hi all,
We've been using CR10.0 Advanced Developer for creating our reports for our 32bit DB application, which can/does run on 64bit OS systems (MS Win2012 R2) . We have now been asked to migrate our app to 64bit.
That part was simple, un-install 32 version, install 64bit and recompile. Problem now is 64bit what talk to 32bit automation objects (ie CrystalRuntime.Application.10).
What version(s) are available for 64bit systems?
Thanks,
Tony.
Reset report footer summary value to zero
In a visual studio 2010 vb.net desktop application that is using crystal reports, I am trying to determine how to reset a report summary amount back to zero. I want to change the report summary amount back to zero since the users keep running the same report without different parameters while the vb.net 2010 desktop application is still open.
I want to reset the value back to zero, since the summary total keeps changing regardless of how many times the same parameters are passed into the crystal report. I know that the problem is not in the vb.net application that passes the data to the crystal report since I have verified the sql in the associated Access 2013 database that comes up with the same result. Basically the vb.net desk app does a dataset fill command that passes the information to the crystal report. The crystal report then access the Access 2013 database from the applicable tables.
I would like to be able to edit the report summary value without creating a new summary value on the report. The following links show you how to set the summary values to zero when the summary amount is created:
1. http://www.teachucomp.com/using-running-totals-crystal-reports-2013-advanced-reporting-tools/
2. http://stackoverflow.com/questions/19149565/reset-variable-for-each-group-crystal-reports
Thus would you tell me and/or point me to link(s) urls that will tell me the following:
1. How to reset the existing report summary total back to zero?
2. If you think I have there is a different solution on how to solve my problem, would you tell me what the resolution is and how would I setup your resolution using crystal reports that is connected to visual studio 2010?
Create summary amount in report footer in visual studio 2010
In an existing Visual Studio 2010 desktop application that uses existing Crystal reports, there is a summary amount that appears in the report footer section of the current crystal report. The current calculation is usually close but it changes every time the crystal report is executed. Note I am new to working with Crystal reports and no one else at my company knows how to work with crystal reports. Since I have not been to figure how I can modify the calculation so that the amount is correct, I would like to create a new calculation for this field.
I have tried the following:
1. Running totals placed into the report footer but I get the result of #####.
2. I have tried formula fields placed into the report footer but I get the result of #######.
3. I have tried to use insert summary of the purchase amount in the report footer and I get the ##### message.
4. I have followed the directions in the following link and it did not work:
http://arstechnica.com/civis/viewtopic.php?t=111265
Thus can you tell me how to summarize the purchase amount from every detail that is placed into the report so the total appears in the report footer? Also I may need to also reset the value to zero everytime the report is executed. **I am not certain if I need this option.