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

CrystalReports -- Problem with updating

$
0
0

Hello all..

 

I have designed crystal reports few months back(around 4 months). Now, i need to make some minor changes to reports(increasing field width, removing a sub report..etc).when i do so., the report is showing an error

 

(This field name is not known. Details: errorKind Error in File temp_68ea8e5d-1d73-4e63-9745-4c2eaf65a93f {B6E26D75-B192-43A2-BB98-145A9CB1813D}.rpt: Error in formula Sorting: 'select {?@SortField} ' This field name is not known. Details: errorKind ).,

 

then i tried removing particular error showing field.,result is empty report. The only change then and now is sql server instance. due to some problems, our admin re installed server and changed its instance to pspl-15\sql2008r2 from pspl-15., the database is same as it was.

 

I did 'Set Datasource Location' with new instance., no use. and one more thing, report is working fine with any new database( changing connection at runtime) until no changes to report at design level.

 

crystal reports(13.0.7.1158).sql server r2, enterprise edition.

 

Thanks..


Failed to load database information. Error in {GUID}.rpt

$
0
0

Hi

 

 

I have a C# windows service that load a rpt file and export it to PDF

 

I am required to use XML as data source for the rpt file, and in the IDE of CR 2013 it always works fine via local XML file, and also I create a http/https pages which returns a XML stream, it still works,  preview fine.

 

And then I debug into my unit test project, load the rpt file, set the necessary parameters, and at last call the ReportDocument.Export(), the PDF was generated successfully.

 

But when I deploy the windows service in my local machine, it always throw out an exception with the error message of “Failed to load database information. Error in {GUID}.rpt” at ReportDocument.Export().

 

 

Here is the environment of my local machine:

 

    Windows 7 (64 bit)

    NET framework 4.0 / VS2010 build with “Any CPU”

    CR2013 with the latest run-time packages for VS

    I also have crdb_xml.dll in both of the following paths:

 

 

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64

 

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86

 

 

I doubt that I missed something in my environment, is there any suggestions? Thanks a lot!

Cannot ApplyLogOnInfo on a table in a Read-Only RPTR Report

$
0
0

I'm using a Crystal Report Viewer in my .Net app and i use the following code to relocate tables in my 'normal' RPT reports:

 

           With crConnectioninfo

                .ServerName = <<DSN Name>>

                .DatabaseName = <<Database Name>>

                .UserID = <<ODBC User ID>>

                .Password = <<ODBC User Password>>

            End With

 

            crRpt.Load(<<Full path to Crystal Report>>)

 

            crTables = crRpt.Database.Tables

            Dim crTable As CrystalDecisions.CrystalReports.Engine.Table

 

            For Each crTable In crTables

                crTableLogoninfo = crTable.LogOnInfo

                crTableLogoninfo.ConnectionInfo = crConnectioninfo

                crTable.ApplyLogOnInfo(crTableLogoninfo)

            Next

 

              ReportViewerCR.ReportSource = crRpt

 

 

It all works perfectly when i use a 'Normal' Crystal report i.e. any RPT file

 

However, when i use a Read-Only Crystal Report, RPTR, the code fails at the line

 

crTable.ApplyLogOnInfo(crTableLogoninfo)

 

and i get the following error message:

 

"Illegal operation on Crystal Reports Read-Only (RPTR) report. Please check release notes to get more information"

 

Can anyone please help?

 

Many thanks,

 

Jan

How to hide gray borders in Crystal reports Visual Studio 2013

$
0
0

Hi All,

 

I have a web application in ASP.NET 2013.

I'm using latest developer version of Crystal reports.

When I run the report, I see gray borders around the actual report.

This was not the case with Crystal reports in Visual Studio 2005.

How can I hide these gray borders in Crystal reports ASP.NET Visual studio 2013?

 

Please see the attached image for more info.

 

Thanks,

CR for VS SP09 - Embedded images not showing in CrystalReportViewer

$
0
0

Good Morning Everyone,

 

I am using Visual Studio 2013 as my IDE, I have installed the CR for VS SP09 and have been able to create a basic web form that displays a report. The report I am using has images embedded in it that display fine within my SAP Crystal Reports 2013 application when I run the report from within it. The images also show up when I export from the web form's crystalreportviewer and print just fine. The problem I am having is more related to the web form report viewer as runtime on the page.

 

The web form pulls up the report, the data is there all looks great but the images are not showing.

 

I added the following line to my web.config....

 

"<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>"

 

but to be honest I do not think the "CrystalImageHandler.aspx exists anywhere on my machine.... am I missing something?

 

All help is appreciated, thanks!

 

-Zack

Printing Directly To Printer Does Not Work

$
0
0

Dear Friends,

 

We have a label report that can only be printed when it has been previewed first.

However, printing this report directly to the selected printer raises the error message ' Protocol Error' and printing stops.

What could be the problem and how can that be resolved ?

Thank you in advance for your help.

Load Error Due to Invalid Grid Function

$
0
0

Hello Jamie Wiseman assisted me with solving this previous issue with grid functions. See Re: Average In CrossTab Report but now when trying to load the report on a browser via Visual Studio I receive this error on the browser which prevents it from loading. See below:

 

Untitled.png

Can anyone please advise why am I receiving this error? As mentioned it works fine under Crystal Reports but generates an error under Visual Studio when trying to load it into browser.

 

I can't seem to get this piece working for some time now. Can anyone please assist?


Thanks,

AB

"Database logon failed" error while trying printing a document

$
0
0

Hi, recently I went from CR Basic for VS2008, to CR 13.0.2 (for VS 2010) on Windows 7 (64 bit) and Iam using .NET 4.5 framework.

In VS2008 all was working fine, now I get the "Database logon failed" error, and I DO NOT use any database! I only fill Parameter and Formula fields on the Crystal Report, and try to print it out. As mentioned, in VS 2008 all was woking OK, now its not. Why so??

 

Here is my simple code:

//passing data to parameters like (one example):

cr1.SetParameterValue("ParameterName", Actual_Parameter);

 

//and my code for prinitng:

PrintDocument doctoprint = new PrintDocument();

doctoprint.PrinterSettings.PrinterName = objPrinter.Value.ToString();

cr1.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize;

CrystalDecisions.Shared.PageMargins margins = new CrystalDecisions.Shared.PageMargins(0, 0, 0, 0);

cr1.PrintOptions.ApplyPageMargins(margins);

crystalReportViewer1.ReportSource = cr1;

cr1.PrintToPrinter(1, false, 0, 0);  //and here i get the error!

 

Can someone help me out? I really have no idea what to do.

Mitja


Error HTTP Error 404.15 when export report

$
0
0

Hi All,

Need on help this issue.

 

I am able to view the report in ASP.NET application, can move next page and previous page without any error.

But when I export the report to either PDF or other format, the HTTP Error 404.15 is appears.

 

I am using Windows 2012 R2 x64, MS Visual Studio 2012 and CRVS 13_0_9.

Trying to find the solution in google and scn forum, but still no luck.

Thank you for any help.

Untitled.png

Crystal Report process hangs till the large Crystal reports get rendered

$
0
0

Hi

I am using SAP Crystal Runtime Engine (for .NET 4.0 - version 13.0.1.220) for ASP.NET(C#) web service. When a report is requested from client, this service finds the rpt file, loads data and send back to the client.

Recently I came across with a situation where I need to wait to get a small report rendered, until the ongoing long-running reports finish rendering.

 

For testing purposes, I created a view in database which delays 2 minutes to return data, and referred that view from the report. So that, the report delays 2 minutes to get rendered after requested. I opened 10 clients, ran the long-running report from each at once (means 10 long running requests) and when they are processing, the 11th request with the "small" report gets hung for 2 minutes, i.e. till those large reports get rendered. (The "small" report gets rendered normally within seconds.)

 

I came across with some forum posts where setting the Maximum Job Limit to 9999, and dispose\close all the disposable objects, which weren't helpful. My customer's case is bit more critical since he faces the issue with three long-running reports. Can anyone help me to understand what is the limitation here, how to overcome and any other infromation which maybe helpful?

 

Thank you in advance.

- Manulak Dissanayake

how to run a report from WCF

$
0
0

hi,
I am trying to run a report from a WCF service application, and then render it in PDF Format to a caller WPF application. But I cant get it! In more detail, this is what my app should do

1. from WPF, call a web service procedure, pass a report name, report path and parameters. Report is store at the same server where Web Service is installed

2. WCF procedure loads report, set parameters, retrieve data from DB and renders it as an array of bytes

3. WPF gets the array, save it into a PDF file, then open it.


this is the code of the WCF procedure.

    Function DownloadCRReport(codEnte As String, connString As String, reportDir As String, reportName As String, Parameters As Dictionary(Of String, Object)) As Byte() Implements IGesiService.DownloadCRReport

        Try

            Dim bytes As Byte()

            Dim infile As BinaryReader


            Dim fs As FileStream


            Dim rep As New ReportDocument

            Dim RepAddress As String


            logPath = reportDir & "log\"


            sb = New StringBuilder()


            timestamp = Now.Year.ToString & Now.Month.ToString & Now.Day.ToString & Now.Hour.ToString & Now.Minute.ToString & Now.Second.ToString

            logFileName = timestamp & "_" & reportName & ".txt"

            logFile = New StreamWriter(logPath & logFileName, FileMode.CreateNew)


 

            logFile.WriteLine("----


Date and time: " &amp; Now.ToString &amp; " -


")



            If My.Computer.FileSystem.FileExists(reportDir & reportName & ".rpt") = False Then

                Throw New Exception("file RPT non found in: " & reportDir)

            End If


            RepAddress = reportDir & reportName & ".rpt"

            logFile.WriteLine("rep address: " & RepAddress)


            rep.Load(RepAddress, OpenReportMethod.OpenReportByDefault)

            logFile.WriteLine("load rep")


            If rep.DataSourceConnections.Count > 0 Then

                rep.DataSourceConnections.Item(0).SetLogon("usr", "pwd")

                logFile.WriteLine("data source connection")

            End If

            For Each i In Parameters

                rep.SetParameterValue(i.Key, i.Value)

                logFile.WriteLine("param: " & i.Key & " - " & i.Value)

            Next

            Try

                fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)

                logFile.WriteLine("export to stream")

                infile = New BinaryReader(fs)

                logFile.WriteLine("created binaryreader")


                bytes = infile.ReadBytes(CInt(fs.Length))

                logFile.WriteLine("render pdf. fine")

                logFile.Close()

                Return bytes

            Catch ex As Exception

                logFile.WriteLine("vbCrLf & ex.Message & vbCrLf & ex.InnerException.Message)

                logFile.Close()

                Return Nothing

            End Try


        Catch ex As Exception

            logFile.WriteLine("vbCrLf & ex.Message & "-" & vbCrLf & ex.InnerException.Message)

            logFile.Close()

            Return Nothing

        End Try

    End Function


I detected that error occurs on rep.ExportToStream(ExportFormatType.PortableDocFormat). I should point out that the same procedure works under WPF application. In the WCF server I installed CR Runtime engine for .NET framework (13.0.9.1312) and CR version for Microsoft Visual Studio (same version). Moreover, all DB operations are stored into the report, so I should not pass any dataset, just parameters.

Anyway, just to begin, I tried to call a simple report with just two string parameters and no queries, but I alwais get error ("An exception of type 'System.NullReferenceException' occurred in MyApp... Object reference not set to an instance of an object)!

How can I make it work? thanks for help



 

Text objects and field objects of subreports are not displayed in the exported Excel

$
0
0

Hi,

 

We are using crystal report 13.0.7 version

In a report we have 3 subreport within which there are various fieldl and text object's but on export to excel the values of text an dfield object are not seen in the excel.

 

Kindly give the solution for the problem discussed.

 

Regards,

Praseeda

Total No of pages different in report printed using Crystal Report XI R2 vs SAP Crystal Reports, developer version for Microsoft Visual Studio (File Version 13.8)

$
0
0

Currently in our application, we are using Crystal Report XI R2 for generating the reports. We are in the process of upgrading the Crystal Report to SAP Crystal Reports, developer version for Microsoft Visual Studio (File Version 13.8). I updated that on my machine and all the reports work fine. I didn't have to modify any of the reports.

 

However when comparing the reports, we found that there are few reports on which the total no. of pages differ from the report displayed using Crystal Report XI R2 vs SAP Crystal Reports, developer version for Microsoft Visual Studio (File Version 13.8). Comparing the reports, it looks all the data that were fit on one page earlier with version XI R2 doesn't fit on the same page with version 13.8, thereby increasing the page counts.

 

The fonts, page margins everything set on report itself. Nothing being set in the code.

 

Both the application is using the same report that is pulling the data from the same database. Our application is a web application.

 

Any suggestion, why this is happening.

 

Thanks.

Sanjay

Support for Visual Studio 2013

$
0
0

Hi there,

 

I just installed a new system (VMWare, Windows 7 Ultimate) with Visual Studio Professional 2013. I registered the license as a Trial Version for 90 days.

 

Now I try to install CRforVS_13_0_7 that I downloaded today (oct. 18 2013) from the SAP website.

 

When running this exe as administrator, after accepting ACL, =Choosing Setup Language English, Windows installer pops up with a message box.

This message box has the title : SAP Crystal Reports, vesion for Microsoft Visual Stuido Setup

The text of the message is :

"You must already have Visual Studio 2010 or Visual Studio 2012 installed to proceed with this installation."

It only gives me the option OK.

When clicking the OK button, the installation is cancelled.

 

Does anyone know of a fix for this issue because I need CR Reports for Visual Studio and we have to migrate to Visual Studio 2013.

Has anyone actually fixed the "bobj is undefined" problem?

$
0
0

We just installed Crytal Reports for Visual Studio SP9 into our Visual Studio 2013 environment which was supposed to fix the problem, NO it doesn't.  I have tried all the "copy this to that" directories I can stand, we still have the problem.  We waited on SP9 for months, hoping for a breakthrough.  The same code works in VS 2012 environment but pops up the infamous "bobj" when debugging in VS2013.  Any serious fix we can try?


ExportToStream - MULTI USER ENVIRONMENT - ABOUT 20 concurrent users

$
0
0

Hi:

  1. Does  Report.ExportToStream(ExportFormatType.PortableDocFormat)
    cause problems in a MULTI USER / CONCURRENT USERS environment?

 

  2 Namespaces being used are :

     using  CrystalDecisions.CrystalReports.Engine;

     using CrystalDecisions.Shared;

    

     Example:

 

     -There is a report called “Performance.RPT” in a “Reports” folder under the website named “PKSSSystem”.

 

         - In production, 20 concurrent users are accessing the same report ““Performance.RPT” , and the report is exported to Stream

           with Report.ExportToStream(ExportFormatType.PortableDocFormat), resultant byte[] array is stored in the database

           and pulled back as an pdf file on a button click “SavePDF”, “GeneratePDf” etc…

 

     are there any concurrency issues expected as given in the support forums below.

      http://search.sap.com/notes?id=0001892901&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031383932393031. 

 

3. Also what are 1CPL and 3 CPL. Do we need to have
a concern with CPL stuff while using ExportToStream in the code??

4) Environment: Ms Visual studio 2008, CR reports Engine Version 12.x.CR Engines are available on webserver and directly accessed from the aspx - c# page.

 

Your quick response is greatly helpful - Thanks

Load Error Due to Invalid Grid Function

$
0
0

Hello Jamie Wiseman assisted me with solving this previous issue with grid functions. See Re: Average In CrossTab Report but now when trying to load the report on a browser via Visual Studio I receive this error on the browser which prevents it from loading. See below:

 

Untitled.png

Can anyone please advise why am I receiving this error? As mentioned it works fine under Crystal Reports but generates an error under Visual Studio when trying to load it into browser.

 

I can't seem to get this piece working for some time now. Can anyone please assist?


Thanks,

AB

CR datasource as xml and dataset

$
0
0

Hello All..

 

I need to generate a crystal report based on xml file and a dataset. xml file contains all the headers and have to map this with respective dataset( where actual data is).

 

what i've done so far: added xml file to report( add--new item -- CrystalReport1 -- using the report wizard -- create new conection(ADO.NET xml) )

 

file path -- my xml file path

class name --- empty

use dataset from class --- (checked it)

dataset names --- showing empty dropdown   and clicked on 'Finish' button .

 

the report is opened up with xml fields --- dragged 2 fields on to the report. (end of report design)

 

now with aspx page :

 

            CrystalReportInstance.SetDataSource(ds);   // dataset contains data with same headers as xml file

            CrystalReportViewer1.ReportSource =CrystalReportInstance ;

            CrystalReportViewer1.DataBind();

 

Result received after executing above:  report with only  headers

 

Using :  crystal reports(13.0.7.1136)

            windows 7 ultimate

            sql server 2008 r2, enterprise edition.

 

and i did search on this here.. really have not seen any similar threads answering. is this the correct way to do this.. please suggest me!! 

Textbox Wrap but Keep some Fields Together when Wrapping

$
0
0

I am using CR for VS2010 with a winforms app and SQL 2008 R2.

 

I have a two column report that has a textbox with multiple fields (Con1Name Con1HmPhone Con1WkPhone Con2Name Con2HmPhone Con2WkPhone) in it in one section of the report.

 

The problem is that when all of these fields are full it needs to wrap down to another line, however I want control of where it wraps.  So if it needs to wrap I want it to keep all of Con2's together on the second line.

 

So it would look like this...

Stacy 651-555-1234 651-222-1111 momo@gmail.com

Emily 651-555-5678 651-333-2222 kid@gmail.com

 

instead of this...

Stacy 651-555-1234 651-222-1111 momo@gmail.com Emily 651-555-5678 651-333-2222

kid@gmail.com

 

Does Crystal Reports allow this kind of control in a textbox?

 

Thanks,

Stacy

Could not load file or assembly 'CrystalKeyCodeLib, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

$
0
0

I am getting following error message when I publish my code on server. I am using VS 2010 as development tool and we are using framework 2.0.

Could not load file or assembly 'CrystalKeyCodeLib, Version=9.1.5000.0,

Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies.

The system cannot find the file specified.

Viewing all 3636 articles
Browse latest View live