Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all 2556 articles
Browse latest View live

How to dynamically display images at runtime in CR

$
0
0

So I have a need to dynamically display images at runtime for a company project.

 

However, I am not really sure what is the best way to go about doing this.  Currently the images, are stored on the iis server.  So I can either display them via the image path or upload and store images in the database.  Also I am using VS 2013..... please advise how best to start or what to do as I have not done this before and do not know the best way or even how to set this up in a CR.

 

 

thanks

 

 

doug


Yet Another Sub-Report Parameter Problem

$
0
0

Hi,

 

I'm trialling CR2013, and using version 13.0.2000.0 of the CrystalReports.Engine under VS2013 under Windows 7 Ultimate.

 

I'm having trouble setting parameters on a report that has a sub-report with two parameters that are linked to the similarly-named parameters in the main report.

 

When I run the report in the designer it only prompts for the two parameters on the main report, and these are successfully passed to the sub-report.

 

I'm using the SetParameterValue method on the parent report’s ReportDocument object and, at first, I got the usual “Missing Parameter Value” exception thrown when calling ExportToDisk.

 

If I look at the ReportDocument.ParameterFields collection, I can see that there are four ParameterField objects, but only the first two (presumably the two from the main report) have values.

 

Can somebody please tell me what I've missed? Surely there’s no need to explicitly set the values on the sub-report parameters?

 

Many thanks,

 

Peter

 

P.S. Apologies if the question has been answered, I had a look, but couldn't find a thread that described my problem.

Problem in crystal report field miss align in Asp.net Web App

$
0
0

hi all,

 

i am facing a strange problem of header alignment. it has problem with display

only print and pdf export does not effected with this problem

see the attached images first image shows display in a web page witch is not

proper .second image shows pdf exported by crystal viewer .

please guide me how to solve this problem.

 

 

 

crystal1.jpg

crystal2.jpg

Crystal Report display blank in Google Chrome and IE

$
0
0

may I know why my Crystal Report will not being display in this two browser after publish to local? It only work in FireFox after publish but show blank if I execute in Visual Studio. Image below is show the sample in FireFox(after publish to local), and follow by google chrome.

Crystal Report printing error "Attempted to read or write protected memory..."

$
0
0

Hello,

I developed in Visual Studio 2010 application that prints Crystal Reports. One of my clients after displaying report want to print it and get an error (if more precise this is notification message):

"Attempted to read or write protected memory. This is often an indication that other memory has been corrupted."
Client works on Windows 7 x64 so Crystal Reports runtime also installed x64 version.

I hope for your help.

Thanks,

CR4VS2010 & CRRuntime v.13.0.14.1720 - EoL (End of Life) and EoVS (End of Vendor Support) confirm Dates

$
0
0

Hi All,

 

I am looking for confirm EoL (End of Life) and EoVS (End of Vendor Support) dates for CR4VS2010 & CRRuntime v.13.0.14.1720.

Thanks in advance.

 

Regards

Rupak

Database logon Error Through IIS

$
0
0

I'm using the push method to create an xml and load it in the reportdocument object.

 

l_objReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, strAppPDFFileName)

l_objReportDocument.Load(l_strReportFileName)

 

So to simulate load, i'm batching a certain scenario through my app, with multiple instances running simulataneously.

 

When i run multiple instances of the app in "desktop mode" (not through IIS), there are no issues.

 

However, when the same is done through IIS, i get a database logon error randomly throughout the run.

 

Are there any known issues with IIS and crystal with regards to multiple instances and high loab

Field not found when modifying it

$
0
0

Hello,

 

I'm getting quite an odd exception: "Field not found. at CrystalDecisions.ReportAppServer.Controllers.ReportObjectControllerClass.Modify"


Dependencies cannot be deleted from Crystal Reports 2013 SP2

$
0
0

Dear All,

 

A default SAP report has been modified, and old dependencies remained in the report, which are no longer used (and would use connected tables which are no longer present in the report).

How can I remove old dependencies, since I can't find the "Dependencies" window in the Field Explorer (as I can recall, 2011 version had this). Was this changed or I'm missing something?

 

Of course, I'm getting the normal error message, stating that I do not have the necessary database connections:

dependencies_crystal_2013_sp2.png

 

Thanks,

Zoltán

Crystal Reports Viewer 2013 Adding Dashed Line and Cutting Off Pages in Display

$
0
0

Hi,

 

I have a report that is 27 inch wide and 11 inch high. It displays fine in Crystal Reports Devleoper 2013, but in Crystal Reports Viewer 2013, it displays a dashed line as well as cuts off the pages and causes them to go to the next page. I tried checking the 'No Printer (optimize for screen display)' box on the page setup for the .rpt file, as well as the 'Dissociate Formatting Page Size and Printer Paper Size', but it is still not working in Crystal Reports Viewer.

 

I attached screenshot of the way that the report displays in Crystal Reports Viewer. You can see that the first page displays normal width, but there is a dashed line added on it. The second page cuts off after what would be the dashed line. I put the blacked out some private information that the report displays.

 

Please let me know how to resolve.

 

Thanks,

Brianna

Invalid exception message: The system cannot find the path specified.

$
0
0

Using the SAP runtime for Visual Studio, service packs 13 and 14, we have found that exception messages are returned with an invalid error:

 

The system cannot find the path specified.

 

This occurs no matter what the actual underlying error is and has caused us enormous amounts of time in trying to track down the actual error. This was working properly with SP 8 of the runtime.

 

To duplicate this problem, create a Crystal report that connects using Ole DB to a server. In code, pass an invalid server name to the report login method. Execute and you will get the error above.

 

When using SP 8 of the runtime, the correct error message was returned regarding data connectivity.

 

Please advise as to a workaround or a fix as this is causing a tremendous amount of wasted time.

How to dynamically display images at runtime in CR

$
0
0

So I have a need to dynamically display images at runtime for a company project.

 

However, I am not really sure what is the best way to go about doing this.  Currently the images, are stored on the iis server.  So I can either display them via the image path or upload and store images in the database.  Also I am using VS 2013..... please advise how best to start or what to do as I have not done this before and do not know the best way or even how to set this up in a CR.

 

 

thanks

 

 

doug

Generate crystal report in excel format directly in C#

$
0
0

My crystal report has more than 90 columns, so while on generating the crystal report some columns are only visible. so my client ask me to, generate the crystal report in excel format directly, that is while on pressing the generate button, the report should download in excel format directly, that is without exporting the file to an path. so can you please provide the C# asp.net code for that and explain how to achieve that. Thanks in advance.


C# code :


<%@ Page Language="C#" enableViewState="true" Inherits="VWReports.AVWReport" %>

<%@ Import Namespace="System" %>

<%@ Import Namespace="System.Web" %>

<%@ Import Namespace="VWReports" %>

 

 

<script language=cs runat=server>

  string strSessionVariable = "";

  public void Page_Init()

  {

  IVWReport Report = null;

  VWSegment NewSeg = null;

  try

  {

  if (!IsPostBack)

  {

  strSessionVariable = "objReport_" + Guid.NewGuid().ToString();

  ReportMetaData ReportData = new ReportMetaData("empinduction_report", "empinduction_report.rpt");

  ReportData.ReportSessionId = strSessionVariable;

 

 

  ReportData.ExcludeUserPreference = true;

  NewSeg = new VWSegment("erpempl_empl_r_rep_hr_hsg", SegmentType.Single);

  NewSeg.AddDataItem("hractualdojfrom1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hractualdojto1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hradjdatefrom1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hradjdateto1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrbuid", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrbusinessunitdesc2", VWDataType.Character, 60);

  NewSeg.AddDataItem("hrclaimdatefrom1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrclaimdateto1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdeptcdx1", VWDataType.Character, 10);

  NewSeg.AddDataItem("hrdobfm1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdobto1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdopftrust1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdopm1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrempcdfrom1", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrempcodeto2", VWDataType.Character, 20);

  NewSeg.AddDataItem("hremployeestatus2", VWDataType.Character, 40);

  NewSeg.AddDataItem("hremployeestatuscd", VWDataType.Character, 5);

  NewSeg.AddDataItem("hremptype2", VWDataType.Character, 40);

  NewSeg.AddDataItem("hremptype2cd", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrgradesetshdescx1", VWDataType.Character, 30);

  NewSeg.AddDataItem("hrjobcd142", VWDataType.Character, 10);

  NewSeg.AddDataItem("hrlocalityname2", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrlocalitynamecd", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrposidx2", VWDataType.Character, 10);

  NewSeg.AddDataItem("hrqualifications4001", VWDataType.Character, 400);

  NewSeg.AddDataItem("hrrepdate2", VWDataType.Date, 11);

  ReportData.MapSegment(NewSeg);

 

 

  NewSeg = new VWSegment("erpemplempl_rgrd1_repgrmsg", SegmentType.Multiple);

  NewSeg.AddDataItem("hr11mscs1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hr12mscs1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hr13mscs1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hr14mscs1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hr15mscs1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hractualamt11", VWDataType.Double, 15);

  NewSeg.AddDataItem("hractualamt21", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrageyrsfrom1", VWDataType.Integer, 4);

  NewSeg.AddDataItem("hrallowance11", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrallowance2", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared11", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared21", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared31", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared41", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared51", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared61", VWDataType.Double, 15);

  NewSeg.AddDataItem("hramtdeclared71", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrassgnefffrom1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrauthleaveunits1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrbasicpay1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrbntotalcr1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrclhra1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrcommentstext111", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext121", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext131", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext141", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext151", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext161", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext171", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext181", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext191", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcommentstext211", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrcompanycd1", VWDataType.Character, 4);

  NewSeg.AddDataItem("hrcompdesc", VWDataType.Character, 50);

  NewSeg.AddDataItem("hrcompyear1", VWDataType.Integer, 4);

  NewSeg.AddDataItem("hrconvamtpaid1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrctctotal1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrcurrexp2", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrdepartment2", VWDataType.Character, 25);

  NewSeg.AddDataItem("hrdepartmentdesc2", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrdeptqual1date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdeptqual2date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdeptqual3date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdeptqual4date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdeptqual5date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdob3", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdoj4", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdolprevorg11", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdop1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrdort1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrefbook1", VWDataType.Character, 80);

  NewSeg.AddDataItem("hremail3", VWDataType.Character, 50);

  NewSeg.AddDataItem("hrempcode", VWDataType.Character, 20);

  NewSeg.AddDataItem("hremplname1", VWDataType.Character, 77);

  NewSeg.AddDataItem("hremptype11", VWDataType.Character, 40);

  NewSeg.AddDataItem("hresi2", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrexgratpay1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrexperience1", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrfathername1", VWDataType.Character, 77);

  NewSeg.AddDataItem("hrfileid1", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrgenderqcdm", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrgrade3", VWDataType.Character, 25);

  NewSeg.AddDataItem("hrgradedescl2", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrgradesetcdx1", VWDataType.Character, 10);

  NewSeg.AddDataItem("hrgradesetdescl2", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrhodcd1", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrinstitutionm1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrintc111", VWDataType.Integer, 5);

  NewSeg.AddDataItem("hrintc121", VWDataType.Integer, 5);

  NewSeg.AddDataItem("hrintc131", VWDataType.Integer, 5);

  NewSeg.AddDataItem("hrintc141", VWDataType.Integer, 5);

  NewSeg.AddDataItem("hrjob1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrjobcd6", VWDataType.Character, 10);

  NewSeg.AddDataItem("hrleaveunits1", VWDataType.Double, 8);

  NewSeg.AddDataItem("hrlleavebalanceunits11", VWDataType.Double, 8);

  NewSeg.AddDataItem("hrlocaldetails1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrlreqleaveunits3", VWDataType.Double, 8);

  NewSeg.AddDataItem("hrmaritalstatus1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrmedamtpaid1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrmedical1", VWDataType.Character, 50);

  NewSeg.AddDataItem("hrmgrcdmltmscs1", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrmlamount1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrmonthsyears1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrotherfee11", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrotherfee21", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrpan3", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrperkamt1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrperpay1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrpfappno2", VWDataType.Character, 20);

  NewSeg.AddDataItem("hrpfindivfund1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrposition4", VWDataType.Character, 25);

  NewSeg.AddDataItem("hrpositionlgdesc2", VWDataType.Character, 80);

  NewSeg.AddDataItem("hrprevexp2", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrprobtype1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrqualification2", VWDataType.Character, 25);

  NewSeg.AddDataItem("hrr1date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrr2date1", VWDataType.Date, 11);

  NewSeg.AddDataItem("hrreason11", VWDataType.Character, 255);

  NewSeg.AddDataItem("hrrefundeeamt11", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrrefundeeamt21", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrrefundeeamt31", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrretirementage1", VWDataType.Integer, 5);

  NewSeg.AddDataItem("hrrptempstatml", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrsafcon1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrseparationreason1", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrsepreasons11", VWDataType.Character, 40);

  NewSeg.AddDataItem("hrsickdayleave1", VWDataType.Double, 5);

  NewSeg.AddDataItem("hrsrlno1", VWDataType.Integer, 10);

  NewSeg.AddDataItem("hrtotalamt3", VWDataType.Double, 15);

  NewSeg.AddDataItem("hruser4", VWDataType.Character, 25);

  NewSeg.AddDataItem("hrw2amount12a1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrw2amount12b1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrw2amount12c1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrw2amount12d1", VWDataType.Double, 15);

  NewSeg.AddDataItem("hrw2amount14a1", VWDataType.Double, 15);

  ReportData.MapSegment(NewSeg);

 

 

  Report = VWReports.Utilities.CreateReport();

  Report.Configure(ReportData);

  Session[strSessionVariable] = Report;

  }

  }

  catch (Exception e)

  {

  Response.Write (e.Message);

  }

  }

 

 

  public void Page_Load()

  {

  if (!IsPostBack)

  {

  hdnSessionVariableName.Value = strSessionVariable;

  }

 

 

  IVWReport Report = (IVWReport)Session[hdnSessionVariableName.Value];

 

 

  try

  {

  if (Report != null)

  Report.RenderReport(this);

  }

  catch (Exception e)

  {

  Response.Write (e.Message);

  }

  }

 

 

</script>

 

 

<html>

  <title>Report</title>

  <body style="margin:0px;" oncontextmenu="return false;" scroll="no" >

  <form id="reportform" method="post" runat="server">

  <input id="hdnSessionVariableName" type="hidden"  name="hdnSessionVariableName"  runat="server">

  </form>

  </body>

</html>

Is this line of code not needed in VS.NET 2008 and Crystal Reports 2008?

$
0
0

I spent a lot of time reading and searching this site for an answer, and it was hard to come up with a title for this. I'm using Visual Studio .NET 2008 and Crystal Reports 2008. The VB.NET Windows app loads and runs .rpt files and was upgraded from VS.NET 2003 and Crystal Reports 9. In the below code, if I don't comment out the line of code in red, I get "The table [tablename] does not exist in the document." If I do comment out this line, all reports load and run just fine.That line of code had to be there in VS.NET 2003 with Crystal 9. Can anyone shed light on this and confirm that I'm doing this right for the 2008 environment? Thanks.

 

' loop through all the tables and pass in the connection info

For Each crTable In crTables

    crTableLogOnInfo = crTable.LogOnInfo

    crTableLogOnInfo.ConnectionInfo = crConnectionInfo   

    crTable.ApplyLogOnInfo(crTableLogOnInfo)   

    crTable.Location = crTable.Location.SubString(crTable.Location.LastIndexOf(".") + 1)
Next

Crystal Report Strange Behaviour with .Net WCF Web Services

$
0
0

Hi,

 

We were porting some of our crystal reports to use .Net WCF web services as data source. The whole work flow of reports execution is as follows:

 

1. From a WPF UI we provide reports parameters values and start report execution.

2. There is a set of web services which validates the reports parameters values and then calls Crystal Report server to execute the intended crystal report.

3. The report has the Web Service connection details with response types mapped to report fields.

4. Report calls the web service and the web service returns a response which is later used to render the report.

5. The response returned by the web service is a container object which contains master data object and a collection of details objects. Both (master, details objects) types are available to the report and mapped to master and details portion of report.

 

6. Besides that we have a page header and a footer. The header is implemented in a sub-report which has static text with no connection to any external data sources. Same it true for the footer as well. We have done it to reuse same header and footer in all of our reports consistently (Its a requirement).

 

Now our observation is:

1. The Crystal Server makes 2 duplicate calls to the same web service with same parameters when it executes the crystal report. We have no idea why it is doing it. There is only one definition of web service defined in the report. Can some one please expleain.

 

2. The report performance is very poor. But strangely most of CPU time consumed, is by Crystal Report Server. The Web service, once contacted, returns the data in milliseconds, despite of the duplicate calls. (The duplicate calls are made next to each other, so whole data retrieval is done in like less than a second)

 

The poor performance becomes more evident when same report is requested by users more than 5 and the simple report start getting printed in 10-15 minutes.

 

We have seen that the time when the report was submitted, started and finished has big gap in above mentioned multiple users scenario. e.g. if a reported is submitted @ like, 11:00 pm. it will be started at 11:01 pm. and finished at 11:10. pm. Strangely the Web Service is contacted, close the finishing time i.e. for aforementioned example the web service would have been called at almost 11:10. pm.

 

The report itself is not very complex and besides header there are usually 2-3 rows in details with around 6-7 columns.

 

Can someone please explain any reasons why Crystal Server is consuming too much CPU and not contacting web service until very late?

 

Note: Please note that we are using Crystal Reports 2008 (both designer and server).

 

Thanks


Crystal Report for VS2013, data connection for Oracle

$
0
0

Hello,

 

The default data connection for the reports are Microsoft OLE DB Provider for Oracle, which is discontinued by MS, and no 64bit verison.

May i know how to enable oracle driver for <Crystal Report for VS 2013>, it seems that there is no such option for selection,

even, I have set PATH to %ORACLE_HOME%\instant client, pointing to ORAOCI*.dll or have install ODAC, it is no use.

 

Since i has the following error,

 

Logon failed.
Details:
ADO Error Code: 0x80004005
Source: Microsoft OLE DB Provider for Oracle
Description: Oracle client and networking components were not found.
These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation

 

Platform used:
Windows 2012R2 64 bit
Oracle client 64 bit 12c Release 1
Visual studio 2013
Crystal report for VS 2013(x64) version 13.0.2

 

so, i has to change to Oracle Driver, but there is no such option provided. thank you for your help.

How to copy Visual Studio Crystal Report to another PC?

$
0
0

I need to copy Crystal Reports from Visual Studio Pro 2010 on a Windows XP PC to Visual Studio Pro 2013 on a Windows 7 PC. The reports are integrated into solutions I am recreating in the new environment. Does anyone know a way copy a complete report from the old PC to the new PC and upgrade it to the Visual Studio 2013 Crystal Reports version. I dread having to create the reports from scratch. Thanks.

Problems with the Crystal Reader for .NET Overlapping Fields

$
0
0

SAP Crystal Reports runtime engine for .NET Framework (64-bit) version 13.0.14.1720.

 

We are using a report scheduling suite called rePORTAL.  It is a .NET web application and uses the .NET Crystal Reports Viewer to view Crystal Reports.  We have some reports that work fine when sent to PDF.  But when we save them as Crystal Reports and try to view them in the viewer, some of the large fields bleed over into the text below them.  These fields have "can grow" checked and "0" selected for the lines, so they should not be limited in size.  The fields are placed in separate Detail sections so that they won't overlap the next section.  Nevertheless, they do overlap.

 

Has anyone had this problem and is there a solution?

Re: Database logon failed when exporting Crystal Report to PDF

$
0
0

I've been chasing a CR error for a while and finally FOUND the answer and I'd thought I'd relay the information to you.

 

A windows application built and deployed using VB in Visual Studio 2010, .net framework 4.

originally using CR for VS 13_0_1.  I was getting intermittent "null reference" exceptions on the EXPORT or getting the infamous "database login" error too ( on export).

 

I inherited the application and the CR reports that were developed for it but eventually I found that despite using the same exact method to load, set the database connection, set the export options and set the report parameters the cause of the Exceptions was...

...

...individually each report was using different underlying connections type.

one report used OLEDB (ADO) and the one that failed was SQLNCLI10.

..

it would be nice to know why when the Connection types were different it would cause the subsequent report to crash.

 

my code is below. I've removed any code not related to Crystal Rpt processing.

 

    Friend Sub CreatePDF_Orig(ByVal zReportName As String, ByVal zInspType As String, ByVal zApplNmbr As String, ByVal zInspNmbr As String, ByVal zCreateDateTime As String, ByVal zIsCOrpt As Boolean)

 

 

        Dim crzReport As New ReportDocument

        Dim sTempPath As String = Nothing, sDocOutPath As String = Nothing

        Dim sCreatePDFDebug As String = Nothing

 

 

        Dim CrzPdfOptions As New PdfFormatOptions

        Dim CrzExportOptions As New ExportOptions

        Dim CrzDiskFileDestinationOptions As New DiskFileDestinationOptions()

        Dim CrzFormatTypeOptions As New PdfRtfWordFormatOptions()

 

 

        Dim sReportOutName As String = Nothing, sReportOutSuffix As String = Nothing

        Dim sImageDocFiles As String() = Nothing

        Dim zFileInfo As IO.FileInfo = Nothing

        Dim bAlreadyExists As Boolean = False

        Dim bAExistsOverwrite As Boolean = False

        Dim bImagesMoved As Boolean = False

 

 

        Dim sDbServer As String = "(local)\SQLEXPRESS", sDbName As String = "DatabaseNameHere"

        Dim cnxInfo As ConnectionInfo = Nothing

 

 

        Try

           ' create directory structure for output documents and path.

            sTempPath = gsMyInspectionsRootPath & "\" & zInspType & "\" & zApplNmbr

            sTempPath = gsMyInspectionsRootPath & "\" & zInspType & "\" & zApplNmbr & "\" & zInspNmbr

 

            sReportOutName = zApplNmbr & "-" & zInspNmbr & "-" & gsUserName & "-" & zCreateDateTime

 

           If zIsCOrpt Then

                sReportOutSuffix = "-CO"

                sDocOutPath = gsMyInspectionsRootPath & "\" & zInspType & "\" & zApplNmbr & "\" & zInspNmbr & "\" & sReportOutName & sReportOutSuffix & ".pdf"

            Else

                sDocOutPath = gsMyInspectionsRootPath & "\" & zInspType & "\" & zApplNmbr & "\" & zInspNmbr & "\" & sReportOutName & ".pdf"

            End If

 

 

            crzReport.Load(zReportName)

 

 

            ' Removes saved data. This causes fresh data to be loaded when the report is subsequently viewed.-- probably not needed.

            ' crzReport.Refresh() '(zReportName)

 

 

            ' version 68... 6/12/2015

            If gsUserName = "ADPJA" Or gsUserName = "PDLDW" Then

                '---------------------------------------------------------------------------------------------------------------------------

                ' Explicit connection to each table in report(s) source from internet.

                '---------------------------------------------------------------------------------------------------------------------------

                Dim crTable As Engine.Table

                Dim crTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo

                Dim ConnInfo As New CrystalDecisions.Shared.ConnectionInfo

 

 

                ConnInfo.ServerName = sDbServer

                ConnInfo.DatabaseName = sDbName

                ConnInfo.UserID = gCnxDBUser

                ConnInfo.Password = gCnxUserPassword

 

 

                For Each crTable In crzReport.Database.Tables

                    crTableLogonInfo = crTable.LogOnInfo

                    crTableLogonInfo.ConnectionInfo = ConnInfo

                    crTable.ApplyLogOnInfo(crTableLogonInfo)

                Next

                '---------------------------------------------------------------------------------------------------------------------------

            Else

                'crzReport.SetDatabaseLogon(gCnxDBUser, gCnxUserPassword)

                crzReport.SetDatabaseLogon(gCnxDBUser, gCnxUserPassword, "(local)\SQLEXPRESS", "DatabaseNameHere")

            End If

 

 

            '' Checks whether the database connection is active for the report that is loaded by the ReportDocument object.

 

 

            CrzDiskFileDestinationOptions.DiskFileName = sDocOutPath                    'Set the destination path and file name

            CrzExportOptions = crzReport.ExportOptions                                  'Set export options

 

 

            With CrzExportOptions

                .ExportDestinationType = ExportDestinationType.DiskFile ' DiskFile, ExchangeFolder, MicrosoftMail, NoDestination

                .ExportFormatType = ExportFormatType.PortableDocFormat  'ExcelWorkBook, HTML32, HTML40, NoFormat, PDF, RichText, RTPR, TabSeperatedText, Text

                .DestinationOptions = CrzDiskFileDestinationOptions

                .FormatOptions = CrzFormatTypeOptions

            End With

 

 

            If IsNothing(crzReport) Then sCreatePDFDebug &= ", crzReport is Null b4 CRSetParms."

            CRSetParameters(zReportName, crzReport)

 

 

            If IsNothing(crzReport) Then sCreatePDFDebug &= ", crzReport is Null after CRSetParms."

            crzReport.Export()

 

 

 

 

        Catch exc As Exception

                MsgBox("Error in Module1.CreatePDF:" & vbCrLf & exc.ToString)

 

 

        Finally

            crzReport.Close()

            crzReport.Dispose()

 

 

            CrzPdfOptions = Nothing

            CrzExportOptions = Nothing

            CrzDiskFileDestinationOptions = Nothing

            CrzFormatTypeOptions = Nothing

 

 

            Application.DoEvents()        ' 7/8/2015

        End Try

    End Sub

 

Message was edited by: Ludek Uher

Crystal Reports: Document print result

$
0
0

I create a simple receipt print program, when I done in the program I notice that the output of template print and code print are not same, I already adjust the margin via code also but still has different result.

 

 

I will attach sample output and code I use.

 

 

Code in class `ReportDocument`.

   

    Dim strPath As String = My.Application.Info.DirectoryPath & "\rptRyosyu.rpt"

    Dim rptDoc As New ReportDocument

 

 

    With rptDoc

        .Load(strPath)

        .SetDataSource(dsRyosyu)

        .PrintOptions.ApplyPageMargins(New CrystalDecisions.Shared.PageMargins(0, 0, 0, 0))

        .PrintOptions.PrinterName = "Printer Name(EPSON TM-T88V)"

        .PrintToPrinter(1, False, 0, 0)

    End With 

 

sir gary.png

Viewing all 2556 articles
Browse latest View live


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