Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all 3636 articles
Browse latest View live

Finding out which records were actually printed

$
0
0

Hi All,

 

I need to find out which records were ACTUALLY printed when a user prints a range of pages to the printer.

 

Here's a simple example:-

 

I have a report which runs from a table (SQL) - say Id, Name, Address & Postcode - the selection is for those that haven't yet been printed.

The report is run (using the Crystal Reports Viewer).

The user clicks the Print button - but only chooses to print Page 2 (of the 10 page report).

I need to know the Ids of those records that were actually printed on Page 2 (because I then need to update the fact that they were printed so they don't appear the next time I run the report).  Please note that the addresses are multiple lines (Can Grow) so I can't work out how many there are per page!

 

This is an overly-simplified version of what I'm trying to achieve but hopefully does illustrate my point!

 

I have already implemented my own Print button (by removing the Handlers for the Crystal Reports Print button on the toolbar and adding my own handler).

 

I have already considered a few ways of achieving this but haven't been able to get any of them to work!

 

1) Using an SQL Expression to launch a Stored Procedure which updates a flag in the record (on the detail line) - haven't really got past square one on this!).

 

2) Populating a Shared/Global variable (containing the relevant Ids) within the report and attempting to access this variable after the report has been printed (Report.PrintToPrinter) - but I'm struggling to access that variable (not sure if it can even be done!) - and anyway - I think it'll include ALL the Ids - not just the ones that were physically printed!).

 

Any help would be gratefully received!

 

John

Crystal Reports (for Visual Studio 2015) and VB.NET (or even C#.NET!)


Crystal Report version for Visual Studio 2015 or .NET 4.5+

$
0
0

Hi Guys,


We are currently migrating the application written in VB6 & .NET 1.1 to latest .NET Framework version. The applications extensively uses Crystal report (CR), version 8+), around 100+ rpt files exist. As part of migration, planning to upgrade the CR version and make it
compatible with migrated code.


Having said, What should be the appropriate CR version that fully compatible to VS 2013, VS2015 and with FW 4.5+ version? Is that version of CR does support 64 bit platform as well? this information would help us to decide the upgrade approach, license cost as well.


It would be very helpful if you can share the reference links.


Thanks.



 




No Printers are Installed - Printtoprinter problem from Scheduled Task

$
0
0

I'm writing a console application in C# and I'm being required to print out Crystal Reports to a printer rather than email them.  When I test the application in debug mode, the reports print to the printer.  When I create an executable and put it out on a network drive, I'm able to get the reports to print.  When I log into a remote server using the administrator account and run the executable off the network drive, I'm able to get the reports to print.

 

The problem I'm having is that when I try to run the executable as part of a scheduled task, I'm getting the "no printers are installed" error.  The scheduled task is being run under the domain administrator's account.  I set it to run even if the user isn't logged in (but we still leave the domain administrator's account logged into the server) and save the administrator's password with the scheduled task.

 

Does anyone have any idea of how I might resolve this?  Here's the offending code below, just in case anyone needs it:

 

if (isPrintedOut)

            {

                crystalReport.PrintOptions.PrinterName = "\\\\print_server\\printer";

                crystalReport.PrintToPrinter(1, true, 0, 0);

            }

.NET Graphic Location

$
0
0

I am using the graphic location to pull an image from the disk and place it in the report.  This works with 2013 crystal reports.  When I use the .Net Viewer I can show the path an it is correct but the image fails to show more often than not.  If I click previous and next and keep doing it sometimes one of the images will come back and the other are missing.  It works great except in the .Net Viewer. Please help. If I go to the need of the report then back to the beginning most of the time all the images on each page are missing.  Any ideas?

 

First time the report loads most of the images show until I change pages and then some will not show.

How to modify sub-report location with C#

$
0
0

Hi,

 

Is it possible to modify sub-report location with C#?

 

I use the following code to retrieve the locations of sub-reports. What if I need to update the SubreportLocation and save it back to the main template report?


We need this for our production deployment. Let's say we have two sets of Crystal reports, Dev and Prod. All Dev templates are stored in C:\Dev and all sub-reports are in C:\Dev\SubReport. All Prod templates and sub-reports are stored in C:\Prod and C:\Prod\SubReport. If we need to update a template, we will do it in Dev and test it, then deploy to Prod. What is the best way to do the deployment? We don't want to update all sub-report locations every time. I don't think sub-report location suppports relative path right?

 

               ISCDReportClientDocument rptClientDoc = cryRpt.ReportClientDocument;

            var rptObjs = cryRpt.ReportClientDocument.ReportDefController.ReportObjectController.GetAllReportObjects();

 

 

            var textBox1 = "";

            try

            {

                foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject rptObj1 in rptObjs)

                {

                    // look for sub report object and display info

                    if (rptObj1.Kind == CrReportObjectKindEnum.crReportObjectKindSubreport)

                    {

                       

 

 

                        CrystalDecisions.ReportAppServer.ReportDefModel.SubreportObject subObj1;

                        subObj1 = (CrystalDecisions.ReportAppServer.ReportDefModel.SubreportObject) rptObj1;

 

 

                        SubreportController subreportController = rptClientDoc.SubreportController;

                        var location =

                            ((CrystalDecisions.ReportAppServer.ReportDefModel.ISCRSubreportObject)(subObj1))

                                .SubreportLocation;

                        SubreportClientDocument subreportClientDocument =

                            subreportController.GetSubreport(subObj1.SubreportName);

 

 

                        textBox1 = textBox1 + "Imported: " + subObj1.SubreportLocation + "\n";

                    }

                }

            }

            catch (Exception ex)

            {

               

            }

can parent report share dataset with sub-reports in CR?

$
0
0

I am creating a CR report where data from a single source but  needs to be presented in the report in 3 different ways (summary, details and charts). I have to insert 2 sub-reports to do that. It's working but the performance is bad because it queries DB 3 times. So my question is  Can the parent report share the data results with the sub-reports so I only need query database one time?

Thank you!

Custom legend text in chart ok in preview but not in production

$
0
0

Hi to all, I've got a problem in customizing legend text in my chart. I followed this instructions

 

1. Open report in CR.

2. Set report do "Preview Mode" by clicking View -> Print Preview

3. When in "Preview Mode", select the Legend label you want to change the text of.

4. Right click on the Legend label and select "Edit Axis Label"

5. Then, select the chart, right click and select Chart Expert -> Apply template to group.

6 Save the modified report.

 

till number 5 because I haven't found this command (Apply template to group) in my version of CR (I use CR 2013 support pack 4 in italian language).

Anyway in preview mode inside CR all it's ok. But when I produce the report inside my application (Visual Studio 2015) or in production the legend text is not what I wrote but the standard one. I use runtime 13.0.6 32 bit, the application is compiled x86. Where am I wrong?

 

Thanks in advance,

Massimo

Crystal does not delete its temporary files in Win-Temp-folder

$
0
0

Hi,

 

a website creates PDFs with Crystal R. on the fly and delivers the files via ExportToHttpResponse()-Method to the browser.

 

The website runs on Windows Server 2012, IIS.

 

I'm using Crystal Report v13.0.13 for .NET (x64 , Framework 4.5.2) with visual studio 2013.

 

 

Accourding to the "Fixed issues" at http://scn.sap.com/docs/DOC-7824 this problem has not been fixed until v13.0.16.

 

The problem exits since we migrated the project from 32-bit to 64-bit and from VS 2008 to VS2013.

 

 

We realised that bug when there had been more than ~32000 PDF-files in the temp-folder of Windows, Crystal became unable to create new PDFs.

 

Is this a bug in Crystal Reports or in .NET 4.5.2?

 

 

Thank you for your help!


Crystal Report Single Page Duplicates

$
0
0

Hi Everyone, Please I am using Vb.Net 2015 with Crystal Report CRforVS_13_0_15.

Now I have two problems.

1) I have designed a report in Landscape with a single page but when I preview the report, the same page duplicates to 11 pages. I just can't figure it out.What could please be the problem?

 

2) I have a problem with a date field on the report with a datatype in the SQL database as date. This date field on the report comes with time portion. I right-clicked on the date field on the report and selected format object and clicked on "01-Mar-1999" format but still the time portion appears. Please what am I doing wrong? Thanks in advance

 

Message was edited by: Ben Sebuabe

CR2013 Can't open dBase files, Previous vs. CR8.5, 9,10,11 work fine.

$
0
0

I am stuck. I have been using Crystal 8.5, 9, 10, and 11 for years but now Office 2016 is cause MAPI issues so I need to fine a new solution. I have a large customer base who have many custom reports using the above versions. We generate report and Exports including PDF, Excel, etc. My native programming language is Delphi 5, Xe7.  The MAPI problem specifically happens when the user tries to export a PDF twice from CR11 when Office 2016 has been installed.

 

My plan was to create a print engine, that my original program would call, using VS 13/15 Express to run CR 2013 and run reports previously written with one of the above.

 

When I try to open a report which uses dBase Files, I receive this message...  I have tried all version of dBase files a few of the open but none open which have a memo field in them.

 

(See attached file.) "Database Connector Error:"   and lots of oriental letters....

 

I have also tried creating a new report with dBase files and all fail.

 

Suggestions????

 

Thanks Tony Nasca, Dove Net Software.

 

Don't laugh... (I know this is old technology...)

FileNotFoundException on ReportDocument.SetDataSource method

$
0
0

Hello,

 

I am using crystal report viewer in my WPF application. It is working fine on my system. But when I am trying to open this application from othermachine, then applicationis crashing while generating the report.

 

In my local system, I have installed SAP crystal report forvisual studio 2010.

 

On the client system, I have installed CRRuntime_32bit_13_0_14.msi.

 

Following error is captured in event viewer.

 

 

Exception Info: System.IO.FileNotFoundException

Stack:

   atSystem.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)

   atSystem.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)

   atSystem.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)

   atSystem.Reflection.RuntimeAssembly.InternalLoadFrom(System.String, System.Security.Policy.Evidence, Byte[], System.Configuration.Assemblies.AssemblyHashAlgorithm, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)

   atSystem.Reflection.Assembly.LoadFrom(System.String)

   atCrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr)

 

 

I have added following tag in my app.configfile butstill it is not working.

 

<startupuseLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

  </startup>

 

Please let me know what I am missing here.

Remove time portion from a date field

$
0
0

I'm using Vb.Net 2015 with CRforVS_13_0_15 and I have a problem with a date field on the report with a datatype in the SQL database as date. This date field on the report comes with time portion. I right-clicked on the date field on the report and selected format object and clicked on "01-Mar-1999" format but still the time portion appears. Please what am I doing wrong? Thanks in advance

Crystal report not taking updated data, asking for parameter on refresh

$
0
0

Hi,

I created crystal report. Its working fine, but if new data is added to database (new sales bill for any customer) through form, then report dont show the newly added Sales bills of that particular customer, it shows old data. If i refresh the data then it asks for the parameters. I am sending 4 parameters to report namely custname, startdate, enddate, openingbalance. When report load for first time it takes all the parameters.

 

So please help me how i need to sort this out. Another thing is this option (/Design/Default Settings/Reporting/Discard Saved Data When Loading Reports) is not clicked . Still it is saving the data.

 

Thanks in Advance for the help.

All my reports created in Crystal Reports stop working

$
0
0

Good afternoon friends, I have a problem with my reports created in Crystal and .Net , when it reaches a certain number of reports generated these generate an error , even though the server to have configured the Crystal presentation of an unlimited number of reports. I send the generated error lines :


"

CrystalDecisions.Shared.CrystalReportsException: No se ha podido cargar el informe. ---> System.Runtime.InteropServices.COMException: Se ha alcanzado el límite máximo de tareas de procesamiento de informes configuradas por el administrador del sistema. en CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) en CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) en CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() --- Fin del seguimiento de la pila de la excepción interna --- en CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() en CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) en CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) en PROVIASDES.Presentation.Web.ReportViewer.WebReportViewer.loadCrystalReport(String nameReport, String nameProcedure, String fileLoc, String parameters) en D:\Personal\DEV\PRODES\PROVIASDES\PROVIASDES.Presentation.Web\ReportViewer\WebReportViewer.aspx.cs:línea 96

"


Thank you very much for your support...



Unable to start the print job. It may not be possible in the current security context

$
0
0

After upgrading to Crystal Reports 2013 (integrated with Visual Studio) we have problems with our clients that are using somekind of remote desktop when making a print report.

 

The exception: "Unable to start the print job. It may not be possible in the current security context." happens during a RDS Session being temporarily disconnected due to a bad internet Connection while making a print job. Hower if the user previews the document and from the preview window do the Printing it works as it should. This behaviour did not happen when using Crystal Reports XI Release 2.

Is this a known problem? Does anyone have any idea how to fix this problem?


memory leak with windows service

$
0
0

Hi,

 

comparable to description of memory leak, I still do have the same problem.

The application runs as a windows service on Windows Server 2012.

I'm using Crystal Report v13.0.13 for .NET (x64 , Framework 4.5.2) with visual studio 2013.

Accourding to the "Fixed issues" at http://scn.sap.com/docs/DOC-7824 this problem has not been fixed in th newer releases.

 

The problem exits since we migrated the project from 32-bit to 64-bit and from VS 2008 to VS2013.

It is definitly Crystal R. that does not free the memory correctly.

 

Which further informations do you need to fix this bug?

 

Thanks in advance!

Invalid Parameter value on client computers that upgraded to win 10

$
0
0

Hi everyone, Im using Visual Studio 2012 with crystal reports

 

So everything was working fine and then all of a sudden some client computers are getting this error when opening the reports AFTER choosing parameter values (so the crystal reports window opens and the parameter window pops up)

 

 

InvalidParameter value: exceeds the Min or Max or conflicts with existing value or edit mask


I searched online for answers but all i could find is this


http://stackoverflow.com/questions/18812849/why-does-it-generates-an-error-saying-invalid-parameter-value-when-i-pass-an


The thing is everything works fine on my computer (win 8) and worked fine on other computers. We upgraded to win 10 maybe a month ago (i still haven't) so maybe that is the cause? It seems to be something to do with regional settings but ive changed just about everything on my computer trying to reproduce the error with no luck.


To give a bit more info the report doesn't pass the parameters in code, I set it in visual studio crystal support surrounding. So the user chooses the date values in the prompt window.


Any help on this would be appreciated


UPDATE


It definitely seems to be a problem with Win10 cos another computer that uses windows 7 works just fine. I have tried reinstalling crystal reports and installing the newest version (16) on the problem computer I have tried manually adding the newest version of CrystalDecision references but the problem persists.

.rpt won't open after modifying

$
0
0

Hi everyone,

 

I'm new to the crystal reports, after modifying the rpt files directly by opening in Visual Studio 2015, changing the Database path also, when I open the project (a VB6 that I've converted to work in VS2015), and try to open the file, i get this error message 'one or both of these files are not text files and cannot be opened une the comparison window' indicating two different paths for the file to be registered.

Please need your help. PS, i didn't compile the project yet.

 

Many thanks in advance.

Failed to render page - Crystal Stack Trace

$
0
0

Hi,

 

We have a intermittent error on occasion our reports do not render and so far there is no obvious reason or temporary/perm workaround.

 

We have noticed this on two different servers using version 13.0.3 and 13.0.16 running Windows server with Crystal Reports 2013.

 

Failed to render page.jpg

 

Attached more detailed information.


<!--

Inner Stack Trace:

   at CrystalDecisions.Web.HtmlReportRender.ReportRenderBase.Render(Object reportContent)

   at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)

Stack Trace:

   at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)

   at CrystalDecisions.Web.CrystalReportPageViewer.RenderPage()

   at CrystalDecisions.Web.CrystalReportPageViewer.Render(HtmlTextWriter output)

   at CrystalDecisions.Web.CrystalReportPageViewer.GetHTML()

   at CrystalDecisions.Web.Render.ReportPageRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.Render.ReportViewRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.Render.ReportAlbumRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.CrystalReportViewer.GetJSONObject()

   at CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output)

-->

Export Crystal Report Crash Application from C# 4.0 App. Throw Unhandled exception

$
0
0

Using C# 4.0 Winform Application(32 bit) with Crystal Report 2011 with Crystal report .Net runtime "CRRuntime_32bit_13_0_16".

During exporting report into PDF. An unhandled win32 exception occurred.

 

A few time this works and next time throw unhandled error as below

Problem signature:

Problem Event Name: APPCRASH

Application Name: Application.vshost.exe

Application Version: 10.0.30319.1

Application Timestamp: 4ba2084b

**Fault Module Name: MSVCR80.dll**

Fault Module Version: 8.0.50727.6229

Fault Module Timestamp: 4ec352ab

Exception Code: c0000005

Exception Offset: 000173c1

OS Version: 6.1.7601.2.1.0.256.48

 

I am exporting this first then sending the file in mail as attachment.

Then I delete the file after export to pdf process end.

Once this process finished only then user is able to do another process.

 

The sample code is as below

 

    if (m_ReportDocument != null)

    m_ReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, fileName);

    if (!File.Exists(fileName))

    { if (m_ReportDocument != null)

    m_ReportDocument.Dispose();

    return false;

    }

Viewing all 3636 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>