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

Pass Parameters and Refresh Report Showing Current Values?

$
0
0

I've been spinning my wheels, and they are almost about to fall off, so hopefully someone has some advice for me. I've debugged this, tried every example on the web, and can't seem to get what I need. My situation is quite simple:

 

I have a report, using OLE connection, one string parameter, and it's used in the select expert. I'm using VS 2015 Update 2 w/ the latest Crystal 2013 service pack for .NET. This is the WinForms version.

 

PROBLEM: I load the ReportDocument, call SetParameterValue, and all functions as I desire after I assign the ReportDocument to the CrystalReportsViewer's ReportSource property. When using the viewer's default refresh functionality, the current values that were applied to the ReportDocument are not displayed in the parameter window.

 

METHOD:

ReportDocument reportDoc = new ReportDocument();

reportDoc.Load(@"C:\Users\test\Desktop\test.rpt");

reportDoc.SetParameterValue("TestStringParam", "teststring");

crystalReportViewer1.ReportSource = reportDoc;

 

Again, this loads the report properly, passes the parameter properly, and all is good. The parameter even shows in the parameter panel. Clicking refresh shows the parameter, but not populated with the current value, which in my case is "teststring".

 

Thanks for any help.


Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456]

$
0
0

I am really scratching my head with this.  I have been through the forums and found people have had the same issue but no matter what I try I can't get it working.

 

It all works as usual on my development machine.  I have since uploaded the application to my VPS running Windows Server 2012 and I get an issue when trying to run a report.

 

System.Runtime.InteropServices.COMException: Logon failed. Details:  [Database Vendor Code: 18456 ] Error in File PickListSingle 5656_6172_{2CCAD10E-6633-406A-9E03-67DA63A86214}.rpt: Unable to connect: incorrect log on parameters. Details:  [Database Vendor Code: 18456 ]

 

System.Runtime.InteropServices.COMException (0x8004100F): Logon failed.

Details:  [Database Vendor Code: 18456 ]

Error in File PickListSingle 5656_6172_{2CCAD10E-6633-406A-9E03-67DA63A86214}.rpt:

Unable to connect: incorrect log on parameters.

Details:  [Database Vendor Code: 18456 ]

   at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)

   at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)

 

I have installed Crystal Reports on the server and the reports work on there fine.

 

I read that a possibile issue could be authorisation on the stored procedure that runs for the report.  I am using the user that created it and don't need to grant any permission as it should be able to execute it.

 

I am running Crystal Reports 2013 and have installed CRforVS_redist_install_32bit_13_0_14 on the server.  I also installed the 64 bit version but still no good.

 

Any advice would be greatly appreciated!

 

THanks

 

Lee

How is different vb.net passing parameter to crystal report

$
0
0

How is the different method of passing parameter to crystal report by vb.net.

 

1)

            cryRpt.Load("c:\Program Files\Report\crystalreport.rpt")

            Dim crParameterFieldDefinitions As ParameterFieldDefinitions

            Dim crParameterFieldDefinition As ParameterFieldDefinition

            Dim crParameterFieldLocation As ParameterFieldDefinition

            Dim crParameterValues As New ParameterValues

            Dim crParameterDiscreteValue As New ParameterDiscreteValue

 

          crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields

 

          crParameterFieldLocation = crParameterFieldDefinitions.Item("parameter")

          crParameterValues = crParameterFieldLocation.CurrentValues

          crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue

          crParameterDiscreteValue.Value = parametervalue

          crParameterValues.Add(crParameterDiscreteValue)

          crParameterFieldLocation.ApplyCurrentValues(crParameterValues)

 

 

            rptviewer.ReportSource = cryRpt

            rptviewer.Refresh()

 

 

2)

cryRpt.SetParameterValue("parameter", "pararmetervalue");

rptviewer.ReportSource = cryRpt

rptviewer.Refresh()

Selection formula with more 64K

$
0
0

Hello,

 

sometimes in our program we get selection formula greater than 64K.

 

Is there a way to use this selection formula in crystal reports (variables etc.)?

 

Björn

selection of items behind current item

$
0
0

I thought we used to be able to select items behind the current item by slow clicking and it would cycle items to front and back.  Cannot seem to get anything to work.

 

Is there a particular chord or method to select an item that completely covered by another without moving the top item?

 

I see there is a context menu item to move to back and move to front, but that is not helpful in this regard.

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

$
0
0

1) Exception Information

*********************************************

Exception Type: System.TypeInitializationException

TypeName: CrystalDecisions.CrystalReports.Engine.ReportDocument

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

Data: System.Collections.ListDictionaryInternal

TargetSite: Void .ctor()

HelpLink: NULL

Source: CrystalDecisions.CrystalReports.Engine

 

 

StackTrace Information

*********************************************

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

 

 

2) Exception Information

*********************************************

Exception Type: System.IO.FileNotFoundException

Message: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

FileName: CrystalDecisions.ReportAppServer.CommLayer, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304

FusionLog: WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

 

Data: System.Collections.ListDictionaryInternal

TargetSite: Void .cctor()

HelpLink: NULL

Source: CrystalDecisions.CrystalReports.Engine

 

 

StackTrace Information

*********************************************

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

pass parameter to crystal report

$
0
0

Hi,

I having pass parameter to crystal report problem.

At the case 1), it is work, But at the case 2) isn't work. Why?

Something missed?

I am very interested this fact, please help....


1)

        Dim objRpt As New rptinvoice

        paramField.ParameterFieldName = "deliverynote"

        discreteVal.Value = deliverynote

        paramField.CurrentValues.Add(discreteVal)

        paramFields.Add(paramField)

        objRpt.SetDataSource(dsinvoice)

        CrystalReportViewer1.ParameterFieldInfo = paramFields

        CrystalReportViewer1.ReportSource = objRpt

        CrystalReportViewer1.Refresh()


2)

        Dim objRpt As New rptinvoice

        objRpt.SetParameterValue("deliverynote",dsinvoice)

        objRpt.SetDataSource(dsinvoice)

        CrystalReportViewer1.ReportSource = objRpt

        CrystalReportViewer1.Refresh()

Unable to change LogOnInfo at runtime

$
0
0

Hi.

 

I'm unable to change LogOnInfo properties at runtime. No error is showed, but data still pulled from the database used at design time.

I'm using CR 2013 for Visual Studio and Visual Studio 2012 (visual basic).

 

I read several articles, but still no success. Note 1553921(CodeBuilder-RasConnectionInfo (NET2010 CRVS2010).zip) is not working for me because I can't import "CrystalDecisions.ReportAppServer.DataDefModel" namespace.

 

Here is the code I use to change LogOnInfo.

Thanks in advance. Regards.

Damian.

 

    Private Sub SetDBLogonForReport(ByVal p_s_Conexion As String)

 

 

        Dim l_obj_ConnectionInfo As ConnectionInfo

        Dim l_obj_LogOnInfo As TableLogOnInfo

 

 

        Call RegistraEnArchivoLog("Ingresando", TraceEventType.Verbose, Me.Name, "SetDBLogonForReport")

 

 

        MessageBox.Show(f_rd_Reporte.Database.Tables.Item(0).Name)

        f_rd_Reporte.DataSourceConnections.Clear()

        MessageBox.Show(f_rd_Reporte.Database.Tables.Item(0).Name)

 

 

        l_obj_ConnectionInfo = New ConnectionInfo

        l_obj_ConnectionInfo.ServerName = p_s_Conexion 'p_s_Conexion.Substring(4)

        l_obj_ConnectionInfo.DatabaseName = ""

        l_obj_ConnectionInfo.UserID = ""

        l_obj_ConnectionInfo.Password = ""

        l_obj_ConnectionInfo.Type = ConnectionInfoType.CRQE

        l_obj_LogOnInfo = New TableLogOnInfo

        l_obj_LogOnInfo.ConnectionInfo = l_obj_ConnectionInfo

 

 

        For Each l_tab_Tabla As Table In f_rd_Reporte.Database.Tables

 

 

            MessageBox.Show("Tabla: " & l_obj_LogOnInfo.TableName & " (" & l_tab_Tabla.Name & ")" & vbCrLf _

            & "Servidor: " & l_obj_LogOnInfo.ConnectionInfo.ServerName & vbCrLf _

            & "Database: " & l_obj_LogOnInfo.ConnectionInfo.DatabaseName & vbCrLf _

            & "UserID: " & l_obj_LogOnInfo.ConnectionInfo.UserID & vbCrLf _

            & "Password: " & l_obj_LogOnInfo.ConnectionInfo.Password)

 

 

            'No estoy pudiendo limpiar la información de conexión que tiene el reporte en tiempo de diseño

            'https://scn.sap.com/thread/3343137

            'https://msdn.microsoft.com/en-us/library/ms227471(v=vs.80).aspx

            'http://vb.net-informations.com/crystal-report/vb.net_crystal_report_load_dynamically.htm

            l_tab_Tabla.LogOnInfo.ConnectionInfo.ServerName = ""

            l_tab_Tabla.LogOnInfo.ConnectionInfo.DatabaseName = ""

            l_tab_Tabla.LogOnInfo.ConnectionInfo.UserID = ""

            l_tab_Tabla.LogOnInfo.ConnectionInfo.Password = ""

            ''''''''''''''''''''''''''''''''''''''''''''''''''''

            l_tab_Tabla.LogOnInfo.ConnectionInfo = Nothing

            ''''''''''''''''''''''''''''''''''''''''''''''''''''

            l_tab_Tabla.ApplyLogOnInfo(Nothing)

 

 

            l_tab_Tabla.ApplyLogOnInfo(l_obj_LogOnInfo)

            'l_tab_Tabla.Location = p_s_Conexion

            MessageBox.Show("Tabla: " & l_tab_Tabla.LogOnInfo.TableName & " (" & l_tab_Tabla.Name & ")" & vbCrLf _

                            & "Servidor: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.ServerName & vbCrLf _

                            & "Database: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.DatabaseName & vbCrLf _

                            & "UserID: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.UserID & vbCrLf _

                            & "Password: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.Password)

 

 

        Next

 

 

        For Each subreporte As ReportDocument In f_rd_Reporte.Subreports

 

 

            For Each l_tab_Tabla As Table In subreporte.Database.Tables

 

 

                MessageBox.Show("Tabla: " & l_obj_LogOnInfo.TableName & " (" & l_tab_Tabla.Name & ")" & vbCrLf _

                & "Servidor: " & l_obj_LogOnInfo.ConnectionInfo.ServerName & vbCrLf _

                & "Database: " & l_obj_LogOnInfo.ConnectionInfo.DatabaseName & vbCrLf _

                & "UserID: " & l_obj_LogOnInfo.ConnectionInfo.UserID & vbCrLf _

                & "Password: " & l_obj_LogOnInfo.ConnectionInfo.Password)

 

 

                'No estoy pudiendo limpiar la información de conexión que tiene el reporte en tiempo de diseño

                'https://scn.sap.com/thread/3343137

                'https://msdn.microsoft.com/en-us/library/ms227471(v=vs.80).aspx

                'http://vb.net-informations.com/crystal-report/vb.net_crystal_report_load_dynamically.htm

                l_tab_Tabla.LogOnInfo.ConnectionInfo.ServerName = ""

                l_tab_Tabla.LogOnInfo.ConnectionInfo.DatabaseName = ""

                l_tab_Tabla.LogOnInfo.ConnectionInfo.UserID = ""

                l_tab_Tabla.LogOnInfo.ConnectionInfo.Password = ""

                ''''''''''''''''''''''''''''''''''''''''''''''''''''

                l_tab_Tabla.LogOnInfo.ConnectionInfo = Nothing

                ''''''''''''''''''''''''''''''''''''''''''''''''''''

                l_tab_Tabla.ApplyLogOnInfo(Nothing)

 

 

                l_tab_Tabla.ApplyLogOnInfo(l_obj_LogOnInfo)

                l_tab_Tabla.Location = p_s_Conexion

                MessageBox.Show("Tabla: " & l_tab_Tabla.LogOnInfo.TableName & " (" & l_tab_Tabla.Name & ")" & vbCrLf _

                                & "Servidor: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.ServerName & vbCrLf _

                                & "Database: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.DatabaseName & vbCrLf _

                                & "UserID: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.UserID & vbCrLf _

                                & "Password: " & l_tab_Tabla.LogOnInfo.ConnectionInfo.Password)

 

 

            Next

 

 

        Next

 

 

    End Sub


Disk full error while exporting crystal report to PDF - ver 10.2.3600

$
0
0

We are working on web application (ASP.NET) developed using VS 2013 + crystal report for reporting. As per our current requirement we are looping through around 10000+ invoices and generating PDF file using CR's export option, Everything works perfectly on our development environment but we get below exception on production sever quite often (almost 70% of time): Server Information: ------------------------------------------------------------------------------------------- Application Framework : 2.0 Application Build :          32bit IIS Version:                  7.0 CR Version:                  10.2.3600 RAM:                            8GB Exception Detail: ----------------------------------------------------------------------- Information.(2/29/2016 2:55:05 PM):PDF Creation error:82720:CrystalDecisions.CrystalReports.Engine.ExportException: Error in File C:\Windows\TEMP\ATB_Acct_Bills_PB {00D1D133-9907-4683-9506-C9EDB0EB9247}.rpt: Disk full. ---> System.Runtime.InteropServices.COMException (0x80000211): Error in File C:\Windows\TEMP\ATB_Acct_Bills_PB {00D1D133-9907-4683-9506-C9EDB0EB9247}.rpt: Disk full.   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)   --- End of inner exception stack trace ---   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)   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() We have verified that the Disk / drives as sufficient space. Also we checked that w3p process was using around 300-400 MB of RAM. I will appreciate if any information can be provided to tackle this issue or to find the root cause of this issue. Regards Kedar Khanderkar

Edge clarification

$
0
0

Hello,

We are using the SAP Crystal Reports runtime engine for .NET 32 bit (version 13.0.8.1216).  We understand that the way printing was done in IE was via the activeX print control.  We know that Edge will no longer support activeX controls.  When we try and print in Edge, it goes straight to pdf.  Do subsequent versions of the SAP Crystal Reports runtime offer any other print options - or will users continue to be directed to pdf?

Thanks for any help anyone can provide

[COMException (0x800001fb): Invalid file name.] I got this error in mocha host

$
0
0

[COMException (0x800001fb): Invalid file name.] CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +90 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +259  [CrystalReportsException: Load report failed.] CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +322 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +850 CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) +100 CrystalDecisions.CrystalReports.Engine.ReportClass.Load() +16

I cant resolve this error
please any help

thanks

Filtering Crystal Reports with Transact-SQL in Asp.NET MVC

$
0
0

I have more than two thousand Reports with Crystal Reports XI in my legacy system. I and all my Clients use SQL Server 2008 R2 database (different servers and database names)

 

So, I have my new application in ASP.NET MVC 5 that I would like to use my Crystal Reports. In my ASP.NET MVC application I have Grids with filters, and these filters I use to filter the Grid view and the Reports, my filters were developed using Linq to Sql.

 

My Problem is:

If the Report Select Command is:

 

select
Cart.Description,Cart.Value,Cart.Date,
CartItems.Description,CartItems.Value,CartItems.Quantity
fromCart inner join CartItems on Cart.codCart =CartItems.codCart

 

 

So, the Cart and CartItems tables have columns with the same name, which are: Description and Value. And when viewing the report, the result considers the Description and Value columns from the first table.

 

For example, I have these records on Sql Server database:

 

Cart.Description   Cart.Value     Cart.Date   |   CartItems.Description   CartItems.Value
SaleOne            $100          01/01/2015  |   ProductOne               $60
SaleOne            $100          01/01/2015  |   ProductTwo               $40
BigSale            $8000         02/01/2015  |   ProductThree             $8000

 

But the Crystal Reports data results is (see that the Description and Value columns show the data of first table -> Cart):

 

Cart.Description   Cart.Value      Cart.Date   |   CartItems.Description   CartItems.Value
SaleOne            $100           01/01/2015  |   SaleOne                 $100
SaleOne            $100           01/01/2015  |   SaleOne                 $100
BigSale            $8000          02/01/2015  |   BigSale                 $8000

 

I used this tutorial to open Crystal Reports in ASP.NET MVC Crystal report as a PDF ActionResult in ASP.Net MVC

 

But, instead of use the reportDocument.SetDataSource(dataSet) method, I did it in a different way:

 

1.Change the connection string in Report to connection string of the Client

 

pReportDocument.SetDatabaseLogon("user","Password","server","database");

PropertyBag connectionAttributes =newPropertyBag();
connectionAttributes
.Add("Auto Translate","-1");
connectionAttributes
.Add("Connect Timeout","45");
connectionAttributes
.Add("Data Source","server");
connectionAttributes
.Add("General Timeout","0");
connectionAttributes
.Add("Initial Catalog","database");
connectionAttributes
.Add("Integrated Security",false);
connectionAttributes
.Add("Locale Identifier","1040");
connectionAttributes
.Add("OLE DB Services","-5");
connectionAttributes
.Add("Provider","SQLOLEDB");
connectionAttributes
.Add("Tag with column collation when possible","0");
connectionAttributes
.Add("Use DSN Default Properties",false);
connectionAttributes
.Add("Use Encryption for Data","0");

PropertyBag attributes =newPropertyBag();
attributes
.Add("Database DLL","crdb_ado.dll");
attributes
.Add("QE_DatabaseName","database");
attributes
.Add("QE_DatabaseType","OLE DB (ADO)");
attributes
.Add("QE_LogonProperties", connectionAttributes);
attributes
.Add("QE_ServerDescription","server");
attributes
.Add("QESQLDB",true);
attributes
.Add("SSO Enabled",false);

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo ci =newCrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
ci
.Attributes= attributes;
ci
.Kind=CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
ci
.UserName="user";
ci
.Password="password";

//Update Conn on Tables
foreach(CrystalDecisions.ReportAppServer.DataDefModel.Table table in pReportDocument.ReportClientDocument.DatabaseController.Database.Tables)
{
  table
.QualifiedName="database"+".dbo."+ table.Name;
  table
.ConnectionInfo= ci;

  pReportDocument
.ReportClientDocument.DatabaseController.SetTableLocation(table, table);
}

//Update Conn on Tables of SubReports
foreach(ReportDocument subreport in pReportDocument.Subreports)
{
  
foreach(CrystalDecisions.ReportAppServer.DataDefModel.Table table in pReportDocument.ReportClientDocument.SubreportController.GetSubreportDatabase(subreport.Name).Tables)
  
{
  table
.QualifiedName="database"+".dbo."+ table.Name;
  table
.ConnectionInfo= ci;

  pReportDocument
.ReportClientDocument.SubreportController.SetTableLocation(subreport.Name, table, table);
  
}
}

 

2. Get the complete T-SQL from Report, with Columns, Tables, Where, Group By and Order By

 

CrystalDecisions.ReportAppServer.Controllers.RowsetController objRowsetController = pReportDocument.ReportClientDocument.RowsetController;

//ISCRGroupPath iscrGroupPath;
CrystalDecisions.ReportAppServer.DataDefModel.GroupPath groupPath =newGroupPath();

string strSQL;
string strSQLGroup;

strSQL
= objRowsetController.GetSQLStatement(groupPath,out strSQLGroup);

strSQL
= strSQL.Replace("\r\n","");  

 

3. Merge the T-SQL from Report with the Where Clause of the Filters

I have a parser of SQL to do this

 

strSQL = strSQL.Replace("\"","");

//Parser Query of Report
SqlParser.SqlParser objSqlParserReport =newSqlParser.SqlParser();
objSqlParserReport
.Parse(strSQL);

//Parts of Query
string strSelectReport;
string strFromReport;
string strWhereReport;
string strGroupByReport;
string strOrderByReport;

strSelectReport
= objSqlParserReport.SelectClause;
strFromReport
= objSqlParserReport.FromClause;
strWhereReport
= objSqlParserReport.WhereClause;
strGroupByReport
= objSqlParserReport.GroupByClause;
strOrderByReport
= objSqlParserReport.OrderByClause;

string strQueryReportComplete;
string strWhereComplete ="";

//If exist filter in Report
if(string.IsNullOrEmpty(strWhereReport)==false)
{
  
if(string.IsNullOrEmpty(strWhereComplete)==false)
  
{
  strWhereComplete
= strWhereComplete +" and ";
  
}

  strWhereComplete
= strWhereComplete +" "+ strWhereReport;
}

//If exist filter in Grid
if(string.IsNullOrEmpty(strWhereFilterGrid)==false)
{
  
if(string.IsNullOrEmpty(strWhereComplete)==false)
  
{
  strWhereComplete
= strWhereComplete +" and ";
  
}

  strWhereComplete
= strWhereComplete +" "+ strWhereFilterGrid;
}

//Build complete query
strQueryReportComplete
="SELECT "+ strSelectReport;

strQueryReportComplete
= strQueryReportComplete +" FROM "+ strFromReport;

if(string.IsNullOrEmpty(strWhereComplete.Trim())==false)
{
  strQueryReportComplete
= strQueryReportComplete +" WHERE "+ strWhereComplete;
}

if(string.IsNullOrEmpty(strGroupByReport.Trim())==false)
{
  strQueryReportComplete
= strQueryReportComplete +" GROUP BY "+ strGroupByReport;
}

if(string.IsNullOrEmpty(strOrderByReport.Trim())==false)
{
  strQueryReportComplete
= strQueryReportComplete +" ORDER BY "+ strOrderByReport;
}

 

4. And finally, I call the SetSQLCommandTable method to update the T-SQL in the report

 

CrystalDecisions.Shared.ConnectionInfo objConnectionInfo = pReportDocument.Database.Tables[0].LogOnInfo.ConnectionInfo;

pReportDocument
.SetSQLCommandTable(objConnectionInfo,"Command", strQueryReportComplete);

 

 

So how can I filter the report, using the T-SQL filter?

 

Note:

- All My reports are developed using the Report Designer, where the database connection is to the Development Database, so I need to change the connection to my Clients database.

 

- I Could use reportDocument.RecordSelectionFormula method, but I have not found a way to convert the syntax of T-SQL to Crystal syntax.

 

- Instead of use the solution adopted by me, I could have used the option to reportDocument.SetDataSource(dataSet), but I'd have to do the steps 1 and 2 to take the Query Report, and call the reportDocument.SetDataSource(dataSet) and _contentBytes = StreamToBytes(reportDocument.ExportToStream(ExportFormatType.PortableDocFormat)) methods occurs a overflow memory exception.

 

 

This same question I did in the StackOverflow (http://stackoverflow.com/questions/32103173/filtering-crystal-reports-with-transact-sql-in-asp-net-mvc) without result.

Error 1723 after upgrading InstallShield project to include 13.0.16 merge module

$
0
0

I have an existing InstallShield (Basic MSI) project that has been working perfectly and included the version 13.0.8 (SAP Crystal Reports runtime engine for .NET Framework 4) merge module.

 

I just recently downloaded the 13.0.16 merge module and upgraded my project to merge in this version instead of the 13.0.8. I confirmed when I built the project that it did merge in the newer version.

 

The project built successfully, but when testing out running the resulting installer *.exe that I built on a dev machine, I get "Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action RemoveLink, entry: RemoveLink, library: C:\...\MSIAE45.tmp".

 

The primary thing that I changed in my project, which used to run successfully with the 13.0.8 version, was to upgrade this to 13.0.16. I also changed the Product Code and Package Code but left the Upgrade Code alone and the project is set up to upgrade previous versions with that Upgrade Code.

 

I opened up the 13.0.16 merge module file in InstallShield and I see the RemoveLink custom action in there so I believe it has to do with the upgrade to 13.0.16. Am I missing any prerequisites that 13.0.16 requires?

 

I looked for a list of prerequisites but I could not find any information on that.

 

Please let me know if you need any more information on my set up.

 

Thank you,

   - Mickie

Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly.

$
0
0

Greetings,

I am using Visual Studio 2005 with Crystal Reports 2008.  I currently have a web application running on a Windows 2008 Standard 32 bit server.  I am migrating to a Windows 2008 Server R2 64bit server.  I moved everything to the new server and am getting this message.

 

An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly. Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required.

 

The version of Crystal 2008 that I have installed is 12.0.2000.0.  I am referencing this in the web.config file which matches the files in c:\windows\Assemblies.

 

The code is throwing this error when it hits the following line.

 

Dim crReportDocument As New ReportDocument

 

I have tried the three different Target CPU options.  The Any CPU and X64 options produce the error message.  If I choose x86, I get a failure immediately without it even hitting the code, which makes sense since this is a Windows 2008 Server R2 64bit server.

 

I am questioning if Crystal Reports 2008 is compatible with a 64bit Windows 2008 server.

 

If not, please let me know what version of Crystal I need to be using. 

 

Any assistance is greatly appreciated.

 

Thanks,

 

Todd

 


Print Button not working after upgrade to Window10

$
0
0

We have a legacy software running crystal report.

 

The crystal report viewer has a print button on winform not working, clicked it does nothing. This issue occurred once we upgraded client OS to windows 10. Every other functionality works fine.

 

Can someone please help me solve this issue if you have come across this.


w3pw.exe crash - A process serving application pool 'XXXX' suffered a fatal communication error with the Windows Process Activation Service.

$
0
0

We have .net web application (Visual Studio 2013 - Web Forms - Crystal Report 13.0.16.1954 - NET Framework 3.5) in Windows Server 2008 R2 (x64) - IIS 7.5 and aleatorily application pool crash with the follow message:

 

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

 

After investigating found:


Exception Code:    0xC0000005

Exception Information:    The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

 

This problem occurs when application has many concurrent users at the same time.


¿My be crystal report memory leak error? ¿or bug in crystal reporte version 13.0.16.1954?


ErrorCR.PNG


Please help me!!!!!


Thanks!!!

Error in File C:\Users\PRINTC~1.NET\AppData\Local\Temp\Web_Rev_0515_ArticleNumber_Only {EAB37C84-C650-415E-8323-4EF9EEC2AB51}.rpt:The request could not be submitted for background processing.

$
0
0

Greetings,

I am using Visual Studio 2005 with Crystal Reports 2008.  I currently have a web application running on a Windows 2008 Standard 32 bit server.  I am migrating to a Windows 2008 Server R2 64bit server.  I moved everything to the new server and am getting this message.

 

Server Error in '/' Application.


Error in File C:\Users\PRINTC~1.NET\AppData\Local\Temp\Web_Rev_0515_ArticleNumber_Only {EAB37C84-C650-415E-8323-4EF9EEC2AB51}.rpt:
The request could not be submitted for background processing.

   Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Error in File C:\Users\PRINTC~1.NET\AppData\Local\Temp\Web_Rev_0515_ArticleNumber_Only {EAB37C84-C650-415E-8323-4EF9EEC2AB51}.rpt:
The request could not be submitted for background processing.

Source Error:

Line 1630: Line 1631: Line 1632: crReportDocument.Export()

 

The version of the Crystal 2008 assemblies that Visual Studio is referencing is 12.0.2000.0.  I am referencing this in the web.config file which matches the files in c:\windows\Assemblies.

 

I am running the IIS application pool in 32 bit mode and compiling the Visual Studio project in 32 bit mode.

 

I noticed in ProcMon that there was a key that was listed as NAME NOT FOUND.

 

HKEY_USERS\S-1-5-82-2106413326-2775718262-3837081262-3678447609-4124615764\Software\Business Objects\Suite 12.0\Crystal Reports\Database

 

I proceeded to add the \Database key and then I had a successful export to PDF.  I tried producing the report again and received the same error message above.  After that, no luck.  I then tried removing and re-adding the \Database key again and had a few successful prints just one time after adding the key, then same error again. 

 

The report is using SQLOLEDB to get the data that is being passed to the report.

 

crReportDocument.SetDataSource(dataSet)

 

I have a 64 bit version of SQL server installed.  Could this be the issue since I am running IIS in 32bit mode and compiling the Visual Studio project in 32bit mode? 

 

Any assistance is greatly appreciated.

 

Thanks,

 

Todd

Failed to render page - Crystal Stack Trace

$
0
0

Hi,

 

We have a intermittent error on occasion our reports do not render and so far there is no obvious reason or temporary/perm workaround.

 

We have noticed this on two different servers using version 13.0.3 and 13.0.16 running Windows server with Crystal Reports 2013.

 

Failed to render page.jpg

 

Attached more detailed information.


<!--

Inner Stack Trace:

   at CrystalDecisions.Web.HtmlReportRender.ReportRenderBase.Render(Object reportContent)

   at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)

Stack Trace:

   at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)

   at CrystalDecisions.Web.CrystalReportPageViewer.RenderPage()

   at CrystalDecisions.Web.CrystalReportPageViewer.Render(HtmlTextWriter output)

   at CrystalDecisions.Web.CrystalReportPageViewer.GetHTML()

   at CrystalDecisions.Web.Render.ReportPageRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.Render.ReportViewRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.Render.ReportAlbumRenderer.GetJSONObject(IComponent component)

   at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()

   at CrystalDecisions.Web.CrystalReportViewer.GetJSONObject()

   at CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output)

-->

GroupSortFields in crystal reports 2013

$
0
0

Hi everybody.

 

I used to change the group sorting by code in VB6 and cystal reports XI using the GroupSortFields collection in this way:

Private Sub AplicarOrdenamientoGrupo(ByRef f_rep_Reporte  As craxdrt.Report)

 

    Dim l_i_Ordenamiento As Integer

    Dim l_sfd_SummFieldDef As craxdrt.SummaryFieldDefinition

 

    For l_i_Ordenamiento = 1 To f_i_OrdenamientoGrupo

 

        Set l_sfd_SummFieldDef = f_rep_Reporte.SummaryFields.Item(ObtenerIndiceSummField(f_s_OrdenamientosGrupo(l_i_Ordenamiento).Agrupador, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Columna, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Operacion))

        f_rep_Reporte.GroupSortFields.Add l_sfd_SummFieldDef, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Direccion

        Set l_sfd_SummFieldDef = Nothing

 

    Next l_i_Ordenamiento

 

End Sub

 

ObtenerIndiceSummField: is a function wich returns the index of a summaryfield in the summaryfields collection

 

Now I'm using VS 2012 and SAP crystal reports 2013 and I can't find something similar. How can I achieve this behaviour? I used to let the user to select the sort order.

 

Regards.

Damian.

Need help for Sap Crystal Report runtime version for Windows Application

$
0
0

Hi

I have install Crystal Report. I have developed Windows Application , now i need help. I am trying to install it on client machine whose configuration is

Win 7 64Bit, I3 processor 64bit.

 

Which runtime version should i use to install the crystal report , so i can run my reports on client machine. Shall i use 32bit or 64bit. I downloaded "CRRuntime_64bit_13_0_16" , but still its now working. Plz help , this is very urgent ,as my client with to take report tomorrow morning. it will be great help in regarding this.

 

Thanks in Advance.

Viewing all 3636 articles
Browse latest View live


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