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

How to used a blank delimiter when exporting CSV

$
0
0

Hello,

 

I would like to export crystal report into csv but withouter a delimter character around fields,

 

here is a snipper of my code:

ExportOptions exportOpts = new ExportOptions();
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
exportOpts.ExportFormatType = ExportFormatType.CharacterSeparatedValues;
DiskFileDestinationOptions DiskFileDestinationOpt = ExportOptions.CreateDiskFileDestinationOptions();
DiskFileDestinationOpt.DiskFileName = filename;
exportOpts.ExportDestinationOptions = DiskFileDestinationOpt;
CharacterSeparatedValuesFormatOptions csvOptions = new CharacterSeparatedValuesFormatOptions();
csvOptions.Delimiter = "";
csvOptions.SeparatorText = "";
exportOpts.ExportFormatOptions = csvOptions;
crystalReportDoc.Export(exportOpts);

 

the problem is whenever I use an empty string for the delimiter property, crystal report will use the default double quote character in the result csv file.

 

can someone please assist on how to export a csv document with a blank delimiter?


Error "Input string was not in a correct format." French viewer and IE Browser Zoom at 125%

$
0
0

Hello,

   We are using Crystal Reports for Visual Studio in a Web Application. I have tested this issues with SP13, SP15 and SP16.

   When I open a report with the Report Viewer in French(CultureInfo=fr-ca) and the IE11 Browser Zoom is set at 125% when I click on  chart section when the drill down Cursor is showing the following error is displayed "Le format de la chaîne d'entrée est incorrect."  Translation being "Input string was not in a correct format." If zoom is set to 100% no issue. I did not test with other zoom factorErrorFrench.png.

 

   I don't have this issue when the Viewer is set in English(CultureInfo=en-ca)

 

Thank you.

How to set Image in crystal report with Specified Size?

$
0
0

Hello all,

 

I have created report to generate a Question Paper and and for Maths Equation, I am using an Image

bt In report It shows its Actual Size is 2.54 cm and the content of Equation is in approx 1 cm.

 

So there is much space left.

 

What should I do?

 

With this Question I have attached a Screenshot for that..

 

Thank u in advance...

Webservice as Datasource in CR Runtime

$
0
0

Hi all,

 

I Need to write an application with a websevice as a datasource.

 

I created the Connection in the designer and it is working fine. Does anyone have an example where I can see what properties I have to use to connect to the webservice and to get the data from the webservice within the Crystal Reports runtime? I am using the reportclient document object model with the inproc ras.

 

thanks for the hlep.

regards

joerg

Crystal Report 13 : Report is not getting refreshed

$
0
0

We recently upgraded to Visual Studio 2015, and Crystal Report 13 from VS 2008 and CR XI

The Page that displays Crystal report also has a drop-down list and a radio button control.  When the page is loaded first time, the report is displayed for the default values of the list and radio button. This part works. 

If I change the values in the drop-down list or radio-button, report should get refreshed based on those selections.  However page does not display anything. It is blank where report should be displayed.

 

This is used to work before the upgrade.

Thanks in advance!

Bug in HTML Crystal Report Viewer

$
0
0

I've got a Crystal Report (which was designed in 2008) which displays correctly in my application, in Visual Studio 2015 and in the Crystal Reports 2008 designer.

 

I've since created a simple ASP.NET (4.0) webpage with the Crystal Reports HTML report viewer (Support Pack 16 (v.13.0.16.1954) 64 bit). On loading the report, any right aligned text shoots off to the left.

 

Also, there is a text field in the Page Footer (width of the entire report width) which contains a formula whose contents are centre aligned. On loading the report, this field is displayed on the left of the page (but it's contents is still centre aligned.)

 

On export of the report, all fields display as designed. This leads me to believe that the web report viewer either has a bug or you require to do something special to these fields in order for them to display correctly.

 

Has anyone seen or replicated this type of behaviour?

How and What version on CR to Install for Windows 10

$
0
0

Hi,

 

I am using VS2008 Pro with CR2008 for development of a Windows based program.  The program all works fine on my 64bit Win 8.1 development pc.

 

I wish to install the program on a 64 bit Windows 10 pc and have tried to download and install CR on this but have failed so far.

 

I have Enabled Windows features to Turn the .Net 3.5 options as per the notes on SCN.

 

Can someone please tell me what files are required for Windows 10 and how best to install these.

 

Also, what version of CR service packs can I install on both machines.

 

Many thanks,

 

John

Print, Export, Not working in Crystal Report 2008 Runtime

$
0
0

Hi,

 

 

We have environment in the below configuration.

 

OS Version:          Windows Server 2012 R2 64 bit

Crystal Version:     Crystal Report 2008 Runtime

Application:          ASP.NET

Framework:          .NET Framework 4.0

 

After launching report in asp.net while try to export, print, page navigation in report viewer is not responding in IE 11, Google Chrome and Firefox Browsers

after enabling script debugging while launching report before rendering it show the script error as "Error: 'WebForm_InitCallback' is undefined" in IE 11

 

After the script error report getting launched but i cannot do any tasks in report viewer print, export, next, previous. in fiddler also there is not trace

for these events.

 

May i know how to overcome this issue.

 

Thanks in advance.


Crystal Report exporting PDF cannot display Vietnamese!

$
0
0

Dear all,

 

Please help me to advise this issue, a report show Vietnamese comment with many dots under words and some question marks above words, so users cannot understand those comments. Maybe it's just display problem on PDF, because when i copy and paste this comment to a MS Word file then the result like data in database, dots and question marks are disappear. It just happen in PDF format only, another exporting formats are work fine.

 

PDF-error.png

 

I use:

- Windows Server 2008 R2.

- Crystal Report Basic Runtime for VS 2008 version 10.5.1.0.

- SAP Crystal Report runtime engine .net framework 4 32bit version 13.0.1.220.

 

Please kindly help me to advise a solution.

Can't connect to Oracle from a Crystal Report after Microsoft Security Update KB3126587 was installed.

$
0
0

After our PCs got the KB3126587 security update from Microsoft, each time we try to view a report, we get prompted for a username and password.  The user name and password are filled in the box already but the logon keeps failing.  We are passing the logon credentials to the crystal report from a vb.net application written in visual studio 2013.  The code that we are using was taken from the following knowledge article: 1905423 How to pass Database logon information to a crystal report....

 

If we remove KB3126587, the crystal report will once again work.

 

Apparently the security update updates msorcl32.dll and msdaora.dll among other files.

 

Anyone else experiencing this?

Crystal Reports Runtime Version 16 CSV Delimiter Issue

$
0
0

We use Crystal Reports for Visual Studio in our application and we recently updated to Crystal Reports Runtime Version 16. When we export a report CSV without defining a delimiter, the exported file now contains a default delimiter of " ". As we do not require a delimiter for this file, is there something we can do to override the default?

 

We used to be able to export the CSV file without defining a delimiter under version 13.

 

Thank you.

Crystal Reports in a .NET Application ignores Printer Tray

$
0
0

Hello,

 

we have developed an application with Visual Studio .NET 2015 to print our Crystal Reports files. We deliver the application to several customers, but when they try to print to a printer with more than one printer tray, the Report is printed always on the paper of tray one, although the printer driver in windows is configured with printer tray 2, e.x.

 

We already tried to install the newest version of Crystal Reports Runtime on the Clients, but the problem occurs

 

Does anyone of you also has this problem and knows how to solve it? Do we have to develop it within the source code?

 

Sorry for a possible double post.

Print is scaled when printing from .NET Application

$
0
0

We have an application which prints a report file (a purchase order) via Crystal Reports. When I print the purchase order within the application my print is scaled down (logo is smaller than within Crystal Reports Designer, left edge, top edge, bottom edge, right edge are bigger...).
When I print the same purchase order directly from Crystal Reports via the Pageview then the edges and the images are of the correct size.

 

Do you have any hints how I can fix this problem or where I have to start my research?

 

Regards!

Crystal Reports take 78 seconds to open

$
0
0

Dear Support,

 

A customer is using Crystal Reports Assembly version 10.5.3700. Crystal report is used by their primary business application and is used to print reports out of the business application. But when they choose the option for Crystal report print or Crystal report print preview, it takes about 78 seconds to process the request. The problem doesn't occure when the user is a local administrator, but you won't want to give these rights on a Citrix/Terminal Server environment.

 

EventViewer doesn't help us further and we can't find the source of the problem. Do you have any possible solutions for this issue?

 

It is a virtual Windows Server 2012R2 environment.

 

Thanks in advance.

 

Kind regards,
Stefan van Ree

Problem while deploying a crystal report application

$
0
0

Hello

 

I post this thread because, i'm in despair.

 

 

I have developped a C# application which uses Crystal Report to generate a *.doc file. The application works on my developpement station but i can't make it work on client station.

 

 

When i am executing the application on client station, the application crashes with the following message : "MyApplicationName.exe stop working". I have installed Visual Studio on the client station for viewing the line crash the application and the line is :

 

rpt.ExportToDisk(ExportFormatType.WordForWindows, destinatedPath);

 

The line is extracted from this code :

 

ReportDocument rpt =  rpt = new ReportDocument();
rpt.Load(rptPath);
rpt.ExportToDisk(ExportFormatType.WordForWindows, destinatedFilePath);

When i debug the application with Visual Studio, the error is :

 

0x00000000 in MyApplicationName.exe :

0xC0000005: Access Violation

 

I deployed my application with Installshield. I used MergeModule to add SAP Crystal Reports runtime engine for .NET Framework in the prerequisites. Moreover, i included to prerequisites Microsoft .NET Framework 4.5 Full and Windows Installer 4.5 for Windows Vista(x86).

 

 

My developpement configuration and client configuration : Windows 7 64 bits, Net Framework 4.5, SAP Crystal Reports runtime engine for .NET Framework 13.0.15 , Visual Studio 2012.

 

 

I am on the problem for 4 days so i need your help.

 

 

Thank you in advance for your help.


RTF vs HTML

$
0
0

Taking into consideration the types of Crystal Reports interpretations, Rich Text Format (RTF) and HyperText Markup Language (HTML), which option offers greater support and why?

 

 

I could see that Crystal Reports does not support :

<p style = "text-align: justify;"> ... </ p>

 

The text is not justified!

 

But after converting this code to RTF:

 

"{\\rtf1\\ansi\\ansicpg1252\\uc1\\htmautsp\\deff2{\\fonttbl{\\f0\\fcharset0 Times New Roman;}{\\f2\\fcharset0 Segoe UI;}}{\\colortbl\\red0\\green0\\blue0;\\red255\\green255\\blue255;}\\loch\\hich\\dbch\\pard\\plain\\ltrpar\\itap0{\\lang1033\\fs18\\f2\\cf0 \\cf0\\ql{\\f2 {\\ltrch ...}\\li0\\ri0\\sa0\\sb0\\fi0\\qj\\par}\r\n}\r\n}"

 

The text was justified perfectly!

 

Crystal Reports is best to RTF?

 

I'm using version 13.0.2000.0.

Exporting RPT to PDF through Visual Studio/VB - Bookmarks Missing

$
0
0

I am trying to convert a crystal RPT to PDF format, with the PDF having bookmarks from the RPT using Visual Studio (VB).

Whilst the RPT does convert to PDF, there are no bookmarks in the resulting PDF.

 

However, when I follow these steps, the resulting PDF does contain the bookmarks:

  • Open the RPT file in Visual Studio
  • Go to CRYSTAL REPORTS
  • Preview Report
  • Export Report (Format: PDF, Destination: Disk File, select "Create bookmarks from group tree")

 

My VB code is taken straight from SCN:

 

     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument

        Dim exportFilePath As String = "C:\crystal_PDFs\bookmark.pdf"

        Dim myExportOpts As New ExportOptions

        Dim diskOpts As DiskFileDestinationOptions

        diskOpts = ExportOptions.CreateDiskFileDestinationOptions()

        Dim pdfOptions As CrystalDecisions.Shared.PdfFormatOptions = New PdfFormatOptions()

        crReportDocument.Load("C:\crystal_PDFs\gary.rpt")

        crReportDocument.SummaryInfo.ReportTitle = "Hello World"

        myExportOpts.ExportFormatType = ExportFormatType.PortableDocFormat

        myExportOpts.ExportDestinationType = ExportDestinationType.DiskFile

        myExportOpts.ExportDestinationOptions = diskOpts

        diskOpts.DiskFileName = exportFilePath

        pdfOptions.CreateBookmarksFromGroupTree = True

        'Export the report

        crReportDocument.Export(myExportOpts)

        'Display a message letting the user know the export is complete

        MessageBox.Show("Report exported to: '" & exportFilePath & "'")

    End Sub

 

PDF_Bookmarks.png

 

 

Environment:
  • Visual Studio 2013
  • Crystal Reports for Visual Studio 13.0.9
  • I do not have Crystal Reports designer installed
  • I believe that the RPT file (provided by a colleague) was built using Crystal Reports 8

 

Could the reason for the bookmarks not being included in the resulting PDF be because I only have CR for VS and not the full Crsytal Reports Designer installed?

 

Many Thanks

Gary

ERROR LOGIN CR13 ON SERVER2012R2

$
0
0

Hello,

 

I have to install a software (created by VS2012 and CR13 (13-0-16)) on a machine RDS SERVER 2012.

 

The installation is OK and the software is running. I have install too the CR REDIS X64 version 13-0-16 and the SQLNCLI X64 for SQLSERVER 2012 R2.

 

My question is :

 

When i try to print a report, an error occurd : Login failed.

 

I have try differents solutions (with or without DLL .NET) but it's the same error.

 

An idea?

 

 

Thank you.

 

 

David

Error Creating ReportDocument in VS2010

$
0
0

I'm not terribly familiar with using CR in VS, so I apologize if any of this is inaccurate.  I have a VB.NET application that uses Crystal Reports 2013 report viewer.  I inherited a development machine from another developer that has everything installed and was working under his account.  When I debug this application and get to the following line:

Dim crReportDocument As New ReportDocument

 

I get an error:

The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.

With the InnerException:

Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=14.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I do see CrystalDecisions.ReportAppServer.CommLayer.dll in C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet\iPoint along with all the other dlls.


I've been Googling and trying things for two days now, any help is appreciated.

Not possible to change database in runtime. C#, CR 13.0.16, VS 2010, Oracle

$
0
0

Hi,

 

I'm trying to change database for a report in runtime.

We had a working solution for this. But when upgrading from CR 12.3.2000 (CR 2008) it stopped working.

 

The problem I can see is that when changing the values for ServerName, UserID and Password on the ConnectionInfo object and then try to set the new values to each table in the report by calling ApplyLogOnInfo the values from the report file are reinstated.

 

I have reade dosens of threads and discussions on similar problems and I have tried to make the changes by using several different methods described in this forum and in other. I have used the code generating utility (KB - 1553921).

I also downloaded sampels from this site that is suppose to be able to connect to another Oracle database. The sample is called (csharp_win_oraclelogoninfo).

 

Non of the code or the sample application i have tried works.

 

Independent of what way I try i get a COM exception like this:

error.jpg 

To translate from Swedish, the error message is saying: It's not possible to load the database information. Error in file PickList_EL.........rpt


Here is the original code used:


private void SetReportConnectionInfo(ConnectionInfo connectionInfo, ReportDocument reportDocument)

        {

            foreach (Table table in reportDocument.Database.Tables)

            {

                table.LogOnInfo.ConnectionInfo.ServerName = connectionInfo.ServerName;

                table.LogOnInfo.ConnectionInfo.UserID = connectionInfo.UserID;

                table.LogOnInfo.ConnectionInfo.Password = connectionInfo.Password;

                table.ApplyLogOnInfo(table.LogOnInfo);

            }

        }

 

The ConnectionInfo passed to the function is just a new instance of ConnectionInfo containing the new ServerName, UserId and Password

 

I have tried different versions of this method where I create new objects for LogOnInfo and ConnectionInfo and allso setting the Attributes collection and so on. Nothing of this works.

 

I also implemented the code generated by the utility tool like this:

 

private void SetReportConnectionInfo(string DB_Name, string DB_user, string DB_password, ReportDocument reportDocument)

        {

 

 

            //Create a new Database Table to replace the reports current table.

            CrystalDecisions.ReportAppServer.DataDefModel.Table newTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();

 

 

            //newMainPropertyBag: These hold the attributes of the tables ConnectionInfo object

            PropertyBag newMainPropertyBag = new PropertyBag();

            //newInnerPropertyBag: These hold the attributes for the QE_LogonProperties

            //In the main property bag (newMainPropertyBag)

            PropertyBag newInnerPropertyBag = new PropertyBag();

 

 

            //Set the attributes for the newInnerPropertyBag

            newInnerPropertyBag.Add("Server", DB_Name);

            newInnerPropertyBag.Add("Trusted_Connection", "False");

 

 

            //Set the attributes for the newMainPropertyBag

            newMainPropertyBag.Add("Database DLL", "crdb_oracle.dll");

            newMainPropertyBag.Add("QE_DatabaseName", "");

            newMainPropertyBag.Add("QE_DatabaseType", "");

            //Add the QE_LogonProperties we set in the newInnerPropertyBag Object

            newMainPropertyBag.Add("QE_LogonProperties", newInnerPropertyBag);

            newMainPropertyBag.Add("QE_ServerDescription", DB_Name);

            newMainPropertyBag.Add("QE_SQLDB", "False");

            newMainPropertyBag.Add("SSO Enabled", "False");

 

 

            //Create a new ConnectionInfo object

            CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo newConnectionInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();

 

 

            //Pass the database properties to the connection info object

            newConnectionInfo.Attributes = newMainPropertyBag;

            //Set the connection kind

            newConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;

            //Set the User Name and Password if required.

            newConnectionInfo.UserName = DB_user;

            newConnectionInfo.Password = DB_password;

            //Pass the connection information to the table

            newTable.ConnectionInfo = newConnectionInfo;

 

 

            //Get the Database Tables Collection for your report

            CrystalDecisions.ReportAppServer.DataDefModel.Tables existingTables;

            existingTables = reportDocument.ReportClientDocument.DatabaseController.Database.Tables;

 

 

            //For each table in the report:

            // - Set the Table Name properties.

            // - Set the table location in the report to use the new modified table

            foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table table in existingTables)

            {

                newTable.Name = table.Name; // "PBHEAD";

                newTable.QualifiedName = table.QualifiedName; // "OWUSER.PBHEAD";

                newTable.Alias = table.Alias; // "PBHEAD";

 

 

                reportDocument.ReportClientDocument.DatabaseController.SetTableLocation(table, newTable);

            }

 

 

 

 

            //Verify the database after adding substituting the new table.

            //To ensure that the table updates properly when adding Command tables or Stored Procedures.

            reportDocument.VerifyDatabase();

     }

 

This fails at "reportDocument.ReportClientDocument.DatabaseController.SetTableLocation(table, newTable);"

 

Now I'm all out of ideas at the moment. But I hope someone else is not.

 

Best regards

Anders Rongby

Viewing all 2556 articles
Browse latest View live


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