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

TableLogOnInfo for Crystal Report not working in subreport

$
0
0

Following code working perfectly and showing perfect result of crystal report but when i click on sub report it ask me for crystal report login authentication:

 

 

 

 

 

     TableLogOnInfo logonInfo = new TableLogOnInfo();

                // Set the logon information for each table.

                foreach (Table table in report.Database.Tables)

                {

                    // Get the TableLogOnInfo object.

                    logonInfo = table.LogOnInfo;

                    // Set the server or ODBC data source name, database name,

                    // user ID, and password.

                    logonInfo.ConnectionInfo.ServerName = reportServerName;

                    logonInfo.ConnectionInfo.DatabaseName = reportDb;

                    logonInfo.ConnectionInfo.UserID = reportUserId;

                    logonInfo.ConnectionInfo.Password = reportPassword;

                    logonInfo.ConnectionInfo.IntegratedSecurity = reportIntegratedSecurity;

                    // Apply the connection information to the table.

                    table.ApplyLogOnInfo(logonInfo);

                }

 

 

above code only binding Connection Info to main report how can i bind Connection Info of subReport? I tried this code but it does not work:

 

 

 

 

 

    TableLogOnInfo logonInfo2 = new TableLogOnInfo();

   

                foreach (Table table in report.Subreports[0].Database.Tables)

                {

                    // Get the TableLogOnInfo object.

                    logonInfo2 = table.LogOnInfo;

                    // Set the server or ODBC data source name, database name,

                    // user ID, and password.

                    logonInfo2.ConnectionInfo.ServerName = reportServerName;

                    logonInfo2.ConnectionInfo.DatabaseName = reportDb;

                    logonInfo2.ConnectionInfo.UserID = reportUserId;

                    logonInfo2.ConnectionInfo.Password = reportPassword;

                    logonInfo2.ConnectionInfo.IntegratedSecurity = reportIntegratedSecurity;

                    // Apply the connection information to the table.

                    table.ApplyLogOnInfo(logonInfo2);

                }


Unspecified error on report export

$
0
0

Hi,  I am nearly there with my reporting app!  The final piece is to export reports, I have copied code found on the forum to complete this task but I am getting an error:

 

System.Runtime.InteropServices.COMException was caught

  ErrorCode=-2147467259

  HResult=-2147467259

  Message=Unspecified error

  Source=rptcontrollers.dll

  StackTrace:

       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.FormatEngine.Export()

       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()

       at TransLite_Browser.reportHost.TestReport() in C:\temp\TransLite_Browser\TransLite_Browser\reportHost.xaml.vb:line 89

  InnerException:

 

 

The code I am using is below and is running in the same function that loads the report:

 

CyrstalRptsViewer.ViewerCore.ReportSource = cryRpt

  Try

                Dim CrExportOptions As ExportOptions '= cryRpt.ExportOptions

                Dim CrDiskFileDestinationOptions As New  _

                DiskFileDestinationOptions()

                Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions

                CrDiskFileDestinationOptions.DiskFileName = "C:\jobreport.pdf" 'pdfFile

                CrExportOptions = cryRpt.ExportOptions

                With CrExportOptions

                    .ExportDestinationType = ExportDestinationType.DiskFile

                    .ExportFormatType = ExportFormatType.PortableDocFormat

                    .DestinationOptions = CrDiskFileDestinationOptions

                    .FormatOptions = CrFormatTypeOptions

                End With

                cryRpt.Export()

 

 

            Catch ex As Exception

                MsgBox("Error exporting report: " & ex.ToString)

            End Try

 

Why the error is something out of place?

What .NET frameworks does 13.0.16.XXXX version supports?

$
0
0

Hello,

 

Based on my research, it appears that all crystal reports versions 13.0.16.XXXX (from service pack 12 to 16) will work just fine no matter what .NET 4.X framework version I target. This includes frameworks 4.0 (excluding client profile), 4.5, 4.5.1, 4.5.2, 4.6, 4.61).

 

Is this assumption correct?

 

Thanks.

SetDataSource(DataSet) Web Page Errors

$
0
0

Hello,

 

I have a successful Website I have been running which uses Crystal Reports IIS runtime to generate PDF Reports.

It is running on Windows 2012 Server Standard - ASP.NET 4.5.

 

Now I am trying to move it to new server and cannot get the Crystal working

The new server is Windows 2012 Server Standard R2 Server - ASP.NET 4.5.

 

When I try to run a Crystal Page it comes back with standard Page Not Found Error.

(see screen shot attached)

 

I isolated it to the exact line where the page crashes:

crystalReport.SetDataSource(DS.Tables[0])

 

The line is in a TRY/CATCH but it never catches the error and it looks like the page just crashes.

 

Please advise how to fix?

 

Thank you

 

I looked through the Windows Application log and I think I found the error being generated so maybe that helps.

 

SOURCE: APPLICATION ERROR

Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96

Faulting module name: ntdll.dll, version: 6.3.9600.18202, time stamp: 0x569e7d02

Exception code: 0xc0000374

Fault offset: 0x00000000000f1b70

Faulting process id: 0x418

Faulting application start time: 0x01d17bf4b098e08b

Faulting application path: c:\windows\system32\inetsrv\w3wp.exe

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Report Id: f21d8438-e7e7-11e5-812a-0e78effe7143

Faulting package full name:

Faulting package-relative application ID:

 

SOURCE: VSJITDEBUGGER

An unhandled win32 exception occurred in w3wp.exe [1048]. Just-In-Time debugging this exception failed with the following error: The operation attempted is not supported.

 

Check the documentation index for 'Just-in-time debugging, errors' for more information.

 

 

SOURCE: Micorsoft-Windows-WAS

A process serving application pool 'DefaultAppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '1048'. The data field contains the error number.

Crystal report parameters page not Cancel button is not being displayed.

$
0
0

Hi Team,

 

When i try to load the rpt file inside the crystal report viewer, the Viewer window is displaying the parameters page of the RPT file with only OK button and Cancel button is missing. I am not pretty sure whether Cancel button exist or not in the parameters page, but our clients are more concerned that they want even Cancel button to be displayed in the Parameters page. Any workaround or a sample project is highly appreciated to fix this issue.

 

sap error.png

 

Thanks,

Deepak.

Crystal Reports 2008 SP4 Issues with .NET 4.6

$
0
0

Hello everyone

 

We have a critical issue with our WebForms application. We integrated the Crystal Reports WebViewer and we've seen that it doesn't work on a machine with .NET 4.6. We need a solution for this as soon as possible. We always get JavaScript errors and the design of the parameter prompt is rubbish.

 

We use Crystal Reports Version 12.4.0.966 (Should be CR 2008 with SP4). Is there a solution for this problem?

 

Thank you for your help.

Detect Invalid Printer message programmatically for crystal report RPT files without opening

$
0
0

I would like to if it is possible to detect Invalid Printer message programmatically (writing code) for crystal report RPT files instead of opening those. I have 1000s of RPT file. I don’t know which ones of these are having the issue.

 

 

I get this below message when opening some of the Crystal report RPT files on developer tool:

 

Pop Up Message window: Invalid Printer pop up with OK button

 

Message : This report uses an invalid printer. The default printer will be used instead

CR for VS SP16, Align Objects not available?

$
0
0

In Visual Studio 2015, with CR for VS SP16 installed, having difficulty with alignment tools.  I have similar objects selected (2 lines) but all of the alignment choices in the toolbar are greyed out.  Both items selected are in the same section.

 

Additional Info:

Just opened the report in Crystal Reports Designer 2013 SP7 with same result.

 

Update 2:

I was able to manually adjust with 400% zoom.

 

Checked a few things, some of the objects had extend to bottom of section when printing.  I turned off that property with no effect.

 

This is not a big deal, thought it might be worth discussing since the align feature is very handy.


Runtime error on wpf xbab Application

$
0
0

Hi I have a wpf xbab application which is hosted on our local web server which is throwing an error:   The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. The app has to be compiled with the AnyCPU setting selected.  I have installed the Sap Crystal Reports runtime engine for .Net Framework (64bit) Can you please advice me on this the app runs correctly in the developer environment. 

Where to find installation file for SAP Crystal Reports, developer version for Microsoft Visual Studio

$
0
0

Please help me on these two questions:

 

1. Where to fine installation file for SAP Crystal Reports developer version for Visual Studio?

2. The corresponding Service Pack or updates required for Visual Studio 2013?

 

This http://scn.sap.com/docs/doc-7824 tells to install SP16 for VS 2013, however it DOES NOT tells where to find the installer file for SAP Crystal Reports developer version for Visual Studio?

 

 

PLEASE HELP ME to find installer file as well as correct service pack file for VS 2013. Please....

Create XML from dataset

$
0
0

I am trying to create the XML for a dataset in C#.  Here is my code:

 

crdoc1.Load("F:\\ReportPath.rpt");

string xmlpath="F:\\TestXML.xml";

biddataset.WriteXML(xmlpath,XMLWriteMode.XMLSchema);

crdoc1.Database.Tables[0].SetDataSource(payrolldataset);

crdoc1.Database.Tables[1].SetDataSource(employeedataset);

crdoc1.Database.Tables[2].SetDataSource(biddataset);

 

The XML document is empty.  I am trying to figure out why the biddataset is not being linked to the report at runtime.  The first two datasets are working properly.  Any idea why I cannot get the XML to write so I can test it?

Crystal reports 2008 12.3.3.812 - Runtime installation customer skips pages

$
0
0

We've integrated the Crystal Report viewer in our software using the SDK.

 

A customer has a report were the result of the report in the previewer shows 5 pages. If I export the report to PDF it shows the same 5 pages. If I export the report to Crystal Report with the saved data and I open the report in my Crystal Report 2008 designer I see 7 pages.

 

I looked closely at the differences and some data is missing at the customer compared to the version in the designer. If I however export the report to Excel all the data is shown in Excel even the rows missing.

 

What might be the cause and how can I resolve this.

 

Thanks for any help

 

Btw I have an example PDF and the corresponding RPT file with the data, but I'm not able to attach these file types.

Crystal report to print ID card

$
0
0

Hi,

I have a report which prints the client's name, image, address and his ID in bar code format on a report.

The report is generating good and no issues with printing.

Now we want to use this same report to print ID cards.

We have a ID Card Printer and when i try to print, the details are printed to the top left.

Not sure how to fix this.

We are using VS 2008 and Crystal report 10.5.

 

Any suggestions on what changes have to be made to print the ID card?

 

Thanks in Advance.

Crystal viewer 2008 requires internet access

$
0
0

Hi,

 

I am a novice here. But we need urgently a solution for one of our customers.

 

We use our application specific Crystal viewer built on Crystal 2008 redistributables. One of our customers experiences report previewing performance problem. Namely there is a serious delay ~1+ min. in report generation and rendering on most of computers. The common characteristic of these ("slow") computers is that their access internet is blocked (this is a factory policy to block internet access for most part of workstations). The only workstation having internet access don't experience this delay and the report execution takes ~10 sec. comparing 1+ min. on "slow" computers.


We succeeded to reproduce this situation in lab.


Following investigations show that Crystal viewer executes several operations accessing internet on the viewer startup:

1.PNG

And then couple of operations on each report execution:

2.png\


Even when there is no internet access, the reports are complete and shown correctly. This means that internet operations are not vital for generating and viewing reports by Crystal viewer.


InPlanCrystalViewer is our application built on Crystal 2008 redistributables and we have the ability to change parameter programmatically when calling API methods of Crystal. So we would appreciate if anybody can help us locate any parameters (or registry settings)  that are responsible for initiating these internet operations so that we can turn them off.


The customer is threatening to return the software, so we need to solve this problem ASAP.


Thanks in advance,

Ilia

CrystalImageHandler.aspx?dynamicimage=cr_tmp_image

$
0
0

hi every one;

i have  big  problem when i try to load images from sql database to crystal report using vs 2010 (cr v 13.0.8 to 13.0.16)

Database Field is varbinary

when i view the report i got these errors

 

Errors:

====

 

"NetworkError: 404 Not Found - http://localhost:8034/aspnet_client/system_web/4_0_30319/crystalreportviewers13/allStrings_ar.js"

 

NetworkError: A network error occurred.

 

 

 

 

is that any way to solve this problem.

Need to size the model dialog .net viewer for prompts.

$
0
0

Want to make it wide enough for 2 prompts side by side. Currently if you have many prompts it has to scroll

Extremely long load times: After upgrading to 13.0.16

$
0
0

I have VS2010 installed with runtime and developer version of Crystal Reports v13.0.09, with absolutely no problems and has good speed for loading reports.

 

We installed VS2015 as we plan on converting over to it. With that said, we couldn't use 13.0.09 CR Dev anymore. We had to install 13.0.16.

 

After doing so, everything seemed okay. We could now add/edit reports in VS2015.

 

That's where the pleasant usage stopped. All reports, no matter how simple I make them, take forever. "Please wait while the document is processing" almost non-stop. If the report literally only has one line of data to show from a single database table, it still takes 10 seconds. I'm just looking at a very basic table with very basic data. There's literally nothing special going on here. I'm fairly comfortable with CR.

 

I figured maybe this was an issue with 2015, so I started up a new 2010 project. Lo and behold, I couldn't add the necessary .NET CR components to the project to be able to put a CrystalReportViewer object on my test form. After many hours of uninstalling all versions of CR, including runtimes, I solo-installed CR 13.0.16 dev and runtime.

 

Now I can add/edit CR documents/controls in both 2010 and 2015. Unfortunately however, now BOTH are insanely slow when its "processing" a report, sometimes never finishing processing. I end up crashing the program. Keep in mind that the same look-up in SQL would be instantaneous.

 

What am I missing? Is there some serious issue with 13.0.16 I'm unaware of?

Crystal Reports .NET runtime engine product GUIDs.

$
0
0

Hello,

 

Do you guys have a link where I can find out the MSI installation GUID for the various Crystal Reports .NET runtime engines (or at least for the most resent runtime engines)?

 

There is a post here: http://scn.sap.com/thread/3209451 where someone lists some of the old GUID but not the new ones.

 

I am particularly interested on the GUID for the latest release: Support Pack 16 (v.13.0.16.1954).

 

I need the GUID because the setup application we use to install the Crystal Reports runtime engine uses the GUID to determine if the runtime engine is already installed or not.

 

Thanks.

Application crashes on ReportDocument.Close()

$
0
0

Happens on a some specific report templates.

Using Crystal Reports for Visual Studio ASP.NET Project

Change report data source from SQL Server to DataSet

$
0
0

Hi everyone,

 

I have a ready report that points to database (via stored procedure).

Now I want to use DataTable/DataSet with the same field set as a data source. My code looks like this:

 

        var table = repository.GetPackingSlipData(jobNumber);        var document = new ReportDocument();        var path = HostingEnvironment.ApplicationPhysicalPath + @"\Reports\PackingSlip_BarcodeTAG_Batching.rpt";        document.Load(path);        var dataset = new DataSet("Enterprise1");        table.TableName = "usp_PackingSlip_Batching";        dataset.Tables.Add(table);        document.SetDataSource(dataset);        document.PrintToPrinter(1, false, 0, 0);

However, I get exception at the line with ReportDocument.PrintToPrinter call:

Failed to open the connection.

PackingSlip_BarcodeTAG_Batching 18280_14884_{57969E1F-EC62-47F3-A075-6B9CD630EBA8}.rpt

Details:  [Database Vendor Code: 17 ]

I think the report still points to the old datasource. What would be a correct way to achieve my goal?

 

Thanks!

Viewing all 2556 articles
Browse latest View live


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