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

Crystal Reports template in VS2013

$
0
0

after installed the latest update of cr2013, developer version for Visual Studio,

i tried to find the crystal reports template in Visual Studio 2013, but couldn't

can anyone help me?

 

 

thanks

 

- Kate


Cannot print B&W with Crystal Reports API

$
0
0

I am unable to print black and white using Crystal reports .NET object model.

I am using 'Cute PDF' printing driver which is able to print B&W/color correctly using Windows API directly (with DEVMODE/dmColor+dmFields).  Trying to do the same via Crystal does not work. Two attempts have been made:

  1. using SetDevMode (PrinterSettings::SetHdevmode() and PageSettings::SetHdevmode() with DEVMODE structure filled as in case of direct Windows API direct call)
  2. using PrinterSettings/PageSettings Color field

None of these seem to work and the report is printed in color regardless of parameters set.

 

Powershell script used for test:

 

#load the assemblies

[reflection.assembly]::LoadWithPartialName('System.Drawing.Printing')

[reflection.assembly]::LoadWithPartialName('CrystalDecisions.Shared')

[reflection.assembly]::LoadWithPartialName('CrystalDecisions.CrystalReports.Engine')

 

$ReportLocation = "C:\Test\chequereport.rpt"

$PrinterName = "CutePDF Writer"

 

#setup Crystal Document object

$Report = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument

 

#load the Crystal Report

$Report

.Load($ReportLocation)

 

#create the required printer and page settings

$PrintOptions = New-Object System.Drawing.Printing.PrinterSettings

$PageOptions = New-Object System.Drawing.Printing.PageSettings

 

#add the desired printer or it will print to the default printer

$PrintOptions.PrinterName = $PrinterName

$PrintOptions.Copies = 1

 

$PageOptions.Color = $false

$PrintOptions.DefaultPageSettings.Color = $false

 

#print

$Report.PrintToPrinter($PrintOptions, $PageOptions, $false)

 

$Report.Dispose()

Export to pdf differs from viewer

$
0
0

Hello,

 

I have a ASP.NET (v4.5) application which uses Crystal Reports (v. 13.0.14), report files are created using Crystal Reports IX.

 

One of the reports contains two OLE Objects every one of them containing an image. Depending on the data source one of the images gets suppressed.

 

When viewed in the viewer everything looks OK. But when exported as an PDF file the visible image is replaced with resized copy of an image contained in the report's footer and not the correct one. It seems it retains the objects size but the content is replaced.

 

Any idea?

 

Kind regards,

Lyuboslav Asenov

Missing Parameter values error while exporting to PDF (crystal report)

$
0
0

Hello everyone,

I am humbly asking for anybody's help in a matter that seems to go way beyond my understanding. I am trying to load a .rpt file based on a stored procedure that receives only one parameter,  Connect to a SQL server database to get a dataset for the report and then export the report in PDF format. But the code always breaks in the line where export to PDF occurs. I would like some help in that regard since I tried almost everything advised online in that regard.

 

Thanks so much.

 

 

public static void GeneratePhoneReportMemberServicesReport()

        {

          

        ReportDocument objReportDocument = new ReportDocument(); //Report document

            ConnectionInfo connectionInfo = new CrystalDecisions.Shared.ConnectionInfo();

 

 

            //Step 1. Connection to WEB2 to execute the script EXEC_rptPhoneAnswerPerformanceEx_Com.sql

            string crystalPhoneReportPerformancePath = System.Configuration.ConfigurationManager.AppSettings["CrystalPhoneReportsPath"].ToString();

            string crystalPhoneReportOutputMemberServicesPath = @"C:\Users\pma\Documents\Temp\Reports\";

            string crystalPhoneReportSetonPath = System.Configuration.ConfigurationManager.AppSettings["SetonReportPath"].ToString();

            string crystalSetonPhoneReportName = System.Configuration.ConfigurationManager.AppSettings["SetonPhoneReportM17"].ToString();

            string crystalNHPNYPrototypePhoneReportPath = System.Configuration.ConfigurationManager.AppSettings["NHPNYPrototypePhoneReportsPath"].ToString();

 

 

            //Step 3. Go to the report location \\bhs05wd001\dev\CrystalReportsDev\Phone Reports and refresh every single Crystal Reports

            // a) Retrieve the partial connection string from Web2 ReportsProduction

            SqlConnectionStringBuilder serverConnectionInfo = new SqlConnectionStringBuilder(DataAccess.GetConnectionString(Constants.WEB2_REPORTSPRODUCTION));

            connectionInfo.ServerName = serverConnectionInfo.DataSource; ;

            connectionInfo.DatabaseName = serverConnectionInfo.InitialCatalog;

            connectionInfo.UserID = serverConnectionInfo.UserID;

            connectionInfo.Password = serverConnectionInfo.Password;

 

 

            //b) Generate each Phone report

           

            try

            {

 

 

                string filterExtension = "*.rpt";

                string substringInFileName = "M1_2_PhoneAnswerPerformance";

                List<ReportFile> reportFiles = Utilities.GetFilesFromDirectory(@crystalPhoneReportPerformancePath, filterExtension, substringInFileName).ToList();

                foreach (ReportFile reportFile in reportFiles)

                {

                   

                    string reportFileNameWithoutExtension = Path.GetFileNameWithoutExtension(reportFile.FileName);

                  

                    objReportDocument.Load(string.Format("{0}{1}",@crystalPhoneReportPerformancePath, reportFile.FileName)); //objReportBase.GenerateReport(reportFile.FileName, ParameterArrayList, crystalPhoneReportPerformancePath);

                    foreach(CrystalDecisions.CrystalReports.Engine.Table table in objReportDocument.Database.Tables )

                    {

                        table.LogOnInfo.ConnectionInfo = connectionInfo;

                        table.ApplyLogOnInfo(table.LogOnInfo);

                    }

                    //objReportDocument.SetDatabaseLogon(serverConnectionInfo.UserID, serverConnectionInfo.Password,serverConnectionInfo.DataSource,serverConnectionInfo.InitialCatalog);

                  

                   objReportDocument.SetParameterValue(0, "No"); // the parameter is passed here i.e Index and value

                    objReportDocument.SetDataSource(GetPhoneData(reportFileNameWithoutExtension, Constants.WEB2_REPORTSPRODUCTION));

                             

                    //Save output report

                    string outputDestination = string.Format("{0}{1}{2}", @crystalPhoneReportOutputMemberServicesPath, Path.GetFileNameWithoutExtension(reportFile.FileName), ".pdf");

                    objReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, @"C:\dell\file.pdf"); //This the line where the code breaks with the error "Missing parameter values".

 

 

                    //Export this file in Excel format as well

                    if (reportFile.FileName.Contains("CLHS_M1_2_PhoneAnswerPerformanceGraphs_Combined"))

                    {

                       // objReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.ExcelWorkbook, string.Format("{0}{1}{2}", @crystalPhoneReportOutputMemberServicesPath, Path.GetFileNameWithoutExtension(reportFile.FileName), ".xls"));

                        objCrystalReport.ExportToDisk(ExportFormatType.PortableDocFormat, string.Format("{0}{1}{2}", @crystalPhoneReportOutputMemberServicesPath, Path.GetFileNameWithoutExtension(reportFile.FileName), ".xls"));

                    }

                }

 

 

                //release those resources

                objReportDocument.Dispose();

                objReportDocument.Close();

                objReportDocument = null;

            }

Issue using Crystal Reports for Visual Studio

$
0
0

We have a web application (vb.net) that passes fields from a form to a Crystal Report and it exports the report to a pdf.  We have started to get tickets from customers and it looks like the issue has to do with the fact that newer versions of Acrobat see something in the header and think it is not secure.

 

I decided to go out and get the latest version of CR for VS and use it.  Now I am getting a separate error when trying to run the report.

 

An error has occurred: Retrieving the COM class factory for component with CLSID {F734A321-8381-4FFD-A614-139E8906DC83} failed due to the following error: 80040154.



Question. Is the older version CR (10.5.3700.0) have an issue with newer versions of acrobat. If so, what is the solution?




killing long running report viewer

$
0
0

my c# application runs the report viewer which has been placed on a winform. the problem we are having is sometimes a report is badly formed or uses a table scan and the report viewer just spins and spins while it is running. Is there any way to set up a time out so that the viewer will time out after a certain amount of time. Or is there any way to kill the report viewer?

 

Bill

Visual studio/Crystal Reports (2008)

$
0
0

Hello,

 

We are testing Visual Studio 2015. I can't find any useful information on the SCN regarding this topic.

 

Currently we are using Crystal Reports 2008 for Visual Studio 2008 for our application (using .NET Framework 3.5 and Visual basic).

The application is currently being used on Windows 7 computers.

 

We plan to migrate the computers to Windows 10.

Also we are testing/planning to upgrade the developer environment to Visual Studio 2015 and updating the application to .NET Framework 4.6.

 

My questions are;

 

  • Do we need a newer version of Crystal Reports?
  • When are you expecting to support Visual Studio 2015, Windows 10 and .NET Framework 4.6?


Because while testing the application on .NET 4.6 in a Windows 10 environment we ran into a couple of issues.

 

  • Our application is loading a report file, but the data from the database isn´t correctly shown or not at all in the report file.

 

See also:

KB2198788

 

Kind regards.

What dll(s) do I need to reference in Visual Studio's to connect to CR 2013?

$
0
0

What dll(s) do I need to reference in Visual Studio's to connect to CR 2013?


Problem with windows 10, VS 2015 and SP15

$
0
0

Hello everyone !!!
I'm with the problem
when I'm working as Visual Studio 2015 and run the application in debug mode, clicking the report visual studio shows this message. I already put the aspnet_client folder in my application anyway the message below.


0x800A1391 - JavaScript runtime error: 'BobJ' is not defined

 

shows in internet explorer and the edge goes blank

 

 

Win10
VS2015
CR - SP15

 

thank you all

Andre Martins

Crystal Designer is NOT integrated into Visual Studio 2015

$
0
0

Symptom: no "Crystal Report" item found in "Add new item" -> "Reporting" page. Existing .rpt files open with binary editor.

 

Re-installed both (Visual Studio and CRforVS_13_0_15.exe) few times to no avail.

 

Environment: Windows 10 x86, Visual Studio 2015 Enterprise, SQL Server 2014 Developer.

 

Please help.

 

Thank you,

 

Eugene

Crystal Report for VS 2013

$
0
0

Hi,

 

I  have some reports developed in CR 11 and .NET 2.0, Now we have migrated the project to .NET 4.5 and we want to edit one of Crystal Report.. While double clicking on .RPT file it opening in NotePad.. We tried to search a lot for Crystal Report Editor for VS2013 but in vain.

 

Please advise how to edit  RPT files in VS2013.

 

Thanks in advance.

Ram

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

$
0
0

Dear Experts,

 

I refer many of the discussion from SAP community for above problem.

 

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

 

but i can't solve this problem.

 

My problem is in development pc is, i install CRforVS_13_0_5.exe version : 13.0.5.891

 

it is working properly but when i host that report on server then it will give above error.

 

previously i refer that in server you must install same version of crystal report.

 

So, i install CRRuntime_64bit_13_0_5.msi version : 13.0.5.891 in my server system.

 

But this can't working for me.

 

Please help me for this problem.

 

Thanks & Regards,

Nishit Makadia

Error loading a Crystal Report in Visual Studio 2012

$
0
0

I have an application in Visual Studio 2005 that I converted to Visual Studio 2012. I installed the new Service Pack for Crystal Reports from this website (http://scn.sap.com/docs/DOC-7824). The application complies fine, but the Crystal reports wouldn't open when I run it.  It says "Problem opening the report".


The application log is below:


 

"Application: FlowSheets.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException Stack: at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean) at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean) at System.Reflection.RuntimeAssembly.InternalLoadFrom(System.String, System.Security.Policy.Evidence, Byte[], System.Configuration.Assemblies.AssemblyHashAlgorithm, Boolean, Boolean, System.Threading.StackCrawlMark ByRef) at System.Reflection.Assembly.LoadFrom(System.String) at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr) "


 

I cannot figure out what the issue is. I can open the report in Visual Studio 2012 and edit the report. I just cannot make the report run.

Load Report Failed

$
0
0

Greetings Crystal Reports for Visual Studio community,

We have an ASP.net Intranet site the utilizes the Crystal Reports for Visual Studio DLLs version 13.0.2000.0 We are experiencing an intermittent problem with report requests coming back with a “Load report Failed” message. The issue will happen for all Crystal reports all day then overnight the problem will go away and reports will work normally again. We cannot reproduce the issue on our Test platforms and we cannot really “experiment” with possible solutions on our Production site. The .Net error comes back as:

 

Source Project: CrystalDecisions.CrystalReports.Engine

 

Page Url: http://xxx/EDS/Reports/ViewCrystalReport.aspx?ReportID=74&ModuleID=3

 

Error Message: Load report failed.

 

Stack Trace:    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

   at xxx.WebUI.Reports.ViewCrystalReport.LoadCrystalReport() in C:\xxx\EnterpriseDataSystem\Release\EDS Main\2.3.1\xxxWEDSWebApps\xxx.WebUI\Reports\ViewCrystalReport.aspx.cs:line 339

   at xxx.WebUI.Reports.ViewCrystalReport.ConfigureCrystalReports() in C:\xxx\EnterpriseDataSystem\Release\EDS Main\2.3.1\xxxEDSWebApps\xxx.WebUI\Reports\ViewCrystalReport.aspx.cs:line 475

 

Server Event Log (Application):

 

Process information:

    Process ID: 4064

    Process name: w3wp.exe

    Account name: NT AUTHORITY\NETWORK SERVICE

 

Exception information:

    Exception type: FileLoadException

    Exception message: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)

   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)

   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)

   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)

   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)

   at System.Web.Configuration.HandlerFactoryCache.GetTypeWithAssert(String type)

   at System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type)

   at System.Web.Configuration.HandlerFactoryCache..ctor(String type)

   at System.Web.HttpApplication.GetFactory(String type)

   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

Please assist.

Crystal reports Record Selection Formula on VS2012/2013 is not working, its shows all records

$
0
0

  Hi Experts,

 

 

I have just upgrade my VS 2008 application to VS 2012 and facing a critical situation with Crystal reports.
My reports worked accurately on the previous versions and now when I build my solution on VS 2012 , reports that I have made using report wizard on previous VS2010 are not working at all.

In runtime it just select all the records ignoring the Record selection conditions.

 

I have installed   Support Pack 15 (v.13.0.15.1840

downloaded from SAP suggested site but the issue still remains. My formula to view report in run time is as under :

 

Dim Report As New LPOReport

        Me.WindowState = 2

        Report.Refresh()

 

        Report.RecordSelectionFormula = ("{PRINFO.PRNo}='" & Trim(txtPA.Text) & "'")

        RpT1.ReportSource = Report

   

        RpT1.Show()

        RpT1.Zoom(95)

        'RpT1.Dispose()

        Report = Nothing

 

 

Please help me to sort this out .

 

Thank you very much.


Download Connect Error (Please Check~)

$
0
0

Crystal Report For VS.NET download error.

 

http://scn.sap.com/docs/DOC-7824

 

Please check

 

 

Error Message

"Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here."

Unable to download service pack

$
0
0

Hi,

 

I need to download CR service packs, but I am not authorise to view below  page.

scn.sap.com/docs/DOC-7824


it always says "Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here."


I have attached screen-shot for your reference.

 

Please help.

 

Thanks,

Kumara

custom search Crystal Report

$
0
0

Hi Team,

 

 

I am trying to implement custom search in Crystal Report and for that I have done the below steps

 

a) get the report data document.getElementById('DivReort').innerHTML

 

b) manipulate the report data with by adding style to text 

 

(for example if am searching text 'Annual', I will

find the text from the innerHTMl and replace the value with "<FONT style='BACKGROUND-COLOR: yellow'>Annual </FONT>"

and update the document.getElementById('DivReort').innerHTML with the modified value.)

 

 

But the above logic is not working , could you somebody help me on what went wrong.

 

Thanks

Jibi

How to download SAP Crystal Reports, developer version for Microsoft Visual Studio 2015

$
0
0

Please I'm suing Visual Studio Developer Version 2015 and I downloaded CRforVS_redist_install_64bit_13_0_14 but does not seem to load crystal report in the project. Is there anything I have to do which I'm not doing right? Could someone link me to the right place and download it? Thanks to all.

Error with reports since upgrading to 64

$
0
0

Upgraded to 64 bit.  I am able to run the report on my local box with Visual studio 2013.

Once installed on client workstation it does not work.

When try to open the report I get:

"Unable to find the report in the manifest resources.  Please build the project, and try again."

 

Funny thing is I put a Messagebox at certain points and moved the dll to the client (a test box).  When I did this

I got my messagebox messages and the report worked.  Take out the messageboxes and again broken with above error.

 

Seems like it has a problem in this part of the code:

 

TableLogOnInfos crTableLogonInfos = new TableLogonInfos();

foreach (crystalDecision.CrystalReports.engine.Table table in report.Database.Tables)

(

    TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();

    crTableLogonInfo.TableName = table.name;

    crTableLogonInfo.ConnectionInfo = crConnectionInfo;

    crtableLogonInfos.Add(crTableLogonInfo);

    table.ApplyLogOnInfo(crTableLogonInfo);

 

Can anyone give me a better way to code this?

By the way this is not code I wrote.  This is old code.

Viewing all 2556 articles
Browse latest View live