Quantcast
Channel: Crystal Reports
Viewing all 1507 articles
Browse latest View live

Crystal Reports Not Appearing in VS 2012

$
0
0

Hi,

I have Visual Studio Profesional 2012, Version 11.0.61219.00 with Net Framework 4.0.  I'm trying to add a new item with Crystal Reports but is not in the list of items.  I downloaded many CRRedistributable (13.0.2, 13.0.5, 13.0.12, 13.0.20) and when I tried to add the reference to my project, nothing shows up.  Also, I tried the NuGet packages and installed some Crystal dlls and no Crystal Reports option appears. 

I have same Visual Studio in another computer and I have the item in the list.  I don't know why is not working or showing.  Any idea?

Thanks!


Crystal Report with Multiple datatables (not tables)

$
0
0

One stored procedure create a dataset in which there are 10 datatables.

Since the stored procedure can't modify so that I have to use dataset to bind Crystal Report.

I knew how to bind dataset with single datatable to CR.

But, how to bind multiple datatable to CR?

Crystal Reports

$
0
0

Hi,

I am having problems getting access to crystal reports on Visual Studio 2013. I have installed the latest copy of crystal reports and added the references to my project, but when I go to Add > New Item after right clicking on the project name, I cannot see a reference to crystal reports any where. I have tried restating my machine and rebuilding the project but to no avail. 

Can anyone help please?

Dynamically create date range and find records with matching dates

$
0
0

Crystal Reports XI on Oracle 11

I need to create a range of dates based on todays date 'T'. The range of dates 'R' is the previous, rolling, 12 months from 'T'.

For each date 'D' in range 'R', I then want to calculate number 'N' of records where the record's date field {DTE} is equal to 'D'

The range of dates 'R' is then shown on a graph (X axis) and SUM(N) plotted on the Y axis. If N=0 then the group is still shown.

(The graph is obviously quite wide; this is okay and as designed; please don't worry about this)

How do I do this in Crystal?

using CrystalImageHandler.aspx in https (secure)

$
0
0

We have a web application which entirely uses https (secure) for all transactions. We use crystalreports .net for generating the reports. I get a warning message (Do you want to view only the webpage content that was delivered securely?) when i click on the print icon in the crystalreports screen.  To analyze this i installed httpwatch - i found that crystalimagehandler.aspx was using http:// instead of https:// - since there is a http request within a https website i get this warning. Now how should i make crystalimagehandler.aspx load using https - since its getting created dynamically i could not figure out where to change this. Would deeply appreciate if you could help me out with this - this warning message is nagging and my company wants me to get rid of it asap.

Please help me solve this issue.

Thanks in advance.

Crystal report displays no data although the dataset was set using push method

$
0
0

I'm new to crystal report. I'm facing an issue that my report show no data although the dataset showed it did have data during debugging. I noticed that everything went wrong after the line " m_rptViewReport.SetDataSource(ds); ", it show "HasRecords = Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation crystal reports" Basically, I'm trying to export the data to xls file using push method. I'm using VS2015 and my crystal report assembly version is 13.0.3500.0

Pls take a look at my code

public bool ExportToFile(DataSet ds,string fileType)
     {
         try
         {
             object obj = null;
             char[] split ={ '.' };
             CrystalDecisions.CrystalReports.Engine.ReportDocument m_rptViewReport = null;


                 if (File.Exists(Request.PhysicalApplicationPath + "\\" + this.ReportFile))
                 {
                    try {
                     m_rptViewReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
                     m_rptViewReport.Load(Request.PhysicalApplicationPath + "\\" + this.ReportFile);

                        ds.WriteXml("D:\\testfile.XML", XmlWriteMode.WriteSchema); //the output XML file does have data
                        m_rptViewReport.SetDataSource(ds);//something went wrong after this line
                    }
                    catch (Exception ex) //nothing happened here
                    {
                        throw ex;
                    }
                 }
                 else
                     this.SetTextTitle(Resources.GetLanguage("msgNoFile") + " " + this.ReportFile);

             if (m_rptViewReport.HasRecords){ //I added this line later and founded that the value is not TRUE
             if (m_rptViewReport != null)
             {
                SetReportParameterValue(m_rptViewReport);

                        Response.ContentType = "application/vnd.ms-excel";

                        try {
                            m_rptViewReport.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.Excel, Response, true, this.ReportCode);

                        }
                        catch (System.Threading.ThreadAbortException ex1)
                        {
                            //throw ex1;
                        }

             }
            }
            return true;
         }
         catch(Exception ex)
         {
            return false;
         }
     }

What I have tried:

- I added useLegacyV2RuntimeActivationPolicy="true" to app.config and then removed it but both did not work.
- I also removed all CrystalReportViewer from my UI.

Thanks !

VB.net with SAP Crystal Report

$
0
0

Hello All,

can anyone help me out with this issue on crystal report:

CR version 13.0.20.2399

Visual Studio Ultimate

When i try to move from the first page onto the second page, am getting this prompt,

'The report you requested requires further information'

Below is my codebehind

     

        myRrpt.Load(Server.MapPath("~\Reporting\CrystalReport15.rpt"))

        connect_EWS.ConnectionString = Constr_EWS
        Dim con As New SqlCommand
        Dim query As String = "SELECT * from Report_BT where Number=@num"
        con.CommandText = query
        con.Connection = connect_EWS
        con.Parameters.AddWithValue("@num", txtNumber.Text.Trim)
        connect_EWS.Open()
        '  Dim dsCustomers As New ISAE_BankTransfer
        Dim da As New SqlDataAdapter(con)

        Dim dsCustomers As DataSet4 = New DataSet4

        da.Fill(dsCustomers, "Report_BT")
        connect_EWS.Close()

        myRrpt.SetDataSource(dsCustomers.Tables(0))
        CrystalReportViewer1.DisplayPage = True

        CrystalReportViewer1.ReportSource = myRrpt

can someone help me out.

The website is published internally on Windows Server 2012 DataCenter

Thanks in advance

Crystal Reports Error Help...

$
0
0

When trying to refresh a report I'm occasionally getting the following error:

Database Connector Error: '08001:[Sybase][ODBC Driver][Adaptive

Server Anywhere][Decryption error: Input must be a multiple of 16 bytes

in length for AES [Database Vendor Code: -851 ]'

Any idea on why I would be getting this occasionally?  Drive me crazy!  Thanks!


Crystal report doesn't show data

$
0
0

Hi

I created a crystal report but it doesn't show data.

It works with a free online database. The web page in my example is: WebForm2.aspx

I am not sure about the exact error.

This the link of the project: https://drive.google.com/open?id=0B7y0uYSDVYmJV3Y3OC1qcm1oRFE

My c# code: 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Diagnostics;
using CrystalDecisions.CrystalReports.Engine;

namespace WebApplication1
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
}
}

private void Crystal()
{
var tiempo = new Stopwatch();
tiempo.Start();
var db = ClassDB.Reporting();

var reporte = new ReportDocument();
reporte.Load(Server.MapPath("~/CrystalReport1.rpt"));

reporte.SetDataSource(db);

this.CrystalReportViewer1.ReportSource = reporte;
CrystalReportViewer1.DataBind();
tiempo.Stop();

Response.Write("crystal: " + tiempo.ElapsedMilliseconds);
}

protected void Button1_Click(object sender, EventArgs e)
{
Crystal();
}
}
}

The first page is: WebForm2.aspx and you only have to perform click in "button"..

The unique error that I receive is : Function evaluation was disabled because a previous function evaluation exceeded the specified time 

in the line: reporte.SetDataSource(db);

This is the method which load the data...

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;

namespace WebApplication1
{
public static class ClassDB
{
public static List<test> Reporting()
{
var results = new List<test>();
using (SqlConnection _con = new SqlConnection("server=TestReporting.mssql.somee.com;database=TestReporting;user id=aguil172;pwd=Server01"))
{
string queryStatement = "select * from test";

using(SqlCommand _cmd = new SqlCommand(queryStatement, _con))
{
_con.Open();
using (SqlDataReader reader = _cmd.ExecuteReader(CommandBehavior.CloseConnection))
{
int codigo = reader.GetOrdinal("codigo");

while (reader.Read())
{
var test = new test
{
codigo = (int)reader[codigo]
};
results.Add(test);
}

}
}

return results.Where(x=> x.codigo == 0).ToList();
}

}


}

public class test
{
public int codigo { get; set; }
}
}

This is the crystal report:

tfsdd

Subreports repeated many times on main report when preview

$
0
0

Hello, I want to print subreport until it finish the data. The Data has multiple rows thats why I put the Subreports in the details section devided by a and b. If I put the subreport in the header or footer the other rows wont appear in the next pages. My problem is that Data of the rows of first page is keeping repeating.

The conecction that Main Report with the other subreport is the ID of the Table that  is (Parameter in the Query) 

This is my current stucture:

----Section 2 (Page Header) ---

                                       Page N of M

---- Section 3 (Details a) ------

First Subreport

--- DetailSection 2 (Details b) ----

Second Subreport

 I will appreaciate the help.

Thank you.

Performance between Crystal Report and Microsoft reporting in ASPNET

$
0
0

HI

I created an ASP WEB FORM project with and rpt and a rdlc in ASPNET

The result was: Microsoft reporting is faster than Crystal Report. For instance:

Reporting Services(times in seconds after 10 executions):
2153
1531
302
339
452
383
336
352
353

Export an excel with Reporting Services
2 seconds in average

crystal report(times in seconds after 10 executions):
813
1289
628
585
667
712
555
1047
527

Export an excel with Crystal Report 

3 seconds in average

The example  of the full project: https://drive.google.com/open?id=0B7y0uYSDVYmJaDRmTEY2bFpFeWc

Reporting service example:

report

Crystal report example:

crystal

Do you have some opinions about that?

Cross Tab not showing Formula in Available Field

$
0
0

Hello,

I want to know the reason why my cross tab not showing formula in available fields to summarize it. I want to summarize FacShare formula highlighting in red in my cross tab.

This is my report:

This my Cross Tab :

My formula FacShare is :

(({@Mang_Fee_Amount}*{@Fee})/100 )

Any Help would be highly appreciated. TIA.

Could not load file or assembly

$
0
0

Getting error.

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

Page Preview set default to "Whole Page"

$
0
0

I have users that what to have crystal reports default to whole page instead of 100% when they preview. The reports run inside a application and I do not have any control

over their variables. Is there a way to set the default to Whole Page in the report itself? OR a hot key combo that that user can do to put the report into Whole Page?

At present they have to click on Zoom and select Whole Page.

Thanks

Andy

How to change the field background color in CR using HTML?

$
0
0

Hello,

I have a cross-tab in the report. I need to change background color of the summary field based on the database field HEX value. For this I'm interpreting field as HTML. So I created the formula fields and trying to use HTML tags to format it. I can change the font color OK, like this:

<FONT COLOR="' & {Report_SELECT_TagLayouts.FontHex} & '">' & {Report_SELECT_TagLayouts.TagColorAbbreviation} & '</FONT>

But I cannot figure out how to change the background color. I have a database field for this - {Report_SELECT_TagLayouts.BackgroundColorHex}, but even if I just use regular HEX values it doesn't work. I've tried different tags - div, span etc. - no luck.

I would appreciate your suggestions.


Database Logon Failed

$
0
0

Hi - I've inherited a web app that has some Crystal Reports embedded but when I try to view one of the reports I get a Database Logon Failed message. Whilst debugging  I can see this:

An exception of type 'CrystalDecisions.CrystalReports.Engine.LogOnException' occurred in CrystalDecisions.ReportAppServer.DataSetConversion.dll but was not handled in user code - Database Logon Failed = Inner Exception. 

I can see the dataset that is the datasource for the report is bringing the correct data back from the DB and this message only appears whenever I am trying to export the report. Here's a snippet of my code:

Dispatcher dsp= new Dispatcher();
DataSet ds= ((GenericDatasetResponse) dsp.DispatchRequest(rqstDataset)).DataSet;

/*	*  Add datatable SelectedObjects to the dataset 	*/
DataTable[] dts= {SelectedObjects.Copy()};
ds.Tables.AddRange(dts);
ds.AcceptChanges();

/* 	*  Set all properties to export report	*/
oRpt.DataSourceConnections.Clear();
oRpt.SetDataSource (ds);
oRpt.Refresh();
string exportFile=null;
CrystalReportsUtility crUtility = new CrystalReportsUtility();
ReportExportType rptExportType=new ReportExportType(ReportExportFileFormat.PDF);
/* 	*  Export Report to file 	*/
crUtility.ExportReportToFile(ref oRpt,rptExportType,exportFolder,ref exportFile);


public void ExportReportToFile(ref ReportDocument crpt,
									   ReportExportType reportExportType,
									   string exportFolder,
									   ref string  exportFileName)
		{

			const string backSlash="\\" ;
			// CR Variables
			ExportOptions crExportOptions;
			DiskFileDestinationOptions crDiskFileDestinationOptions;
			if(exportFileName==null || exportFileName==String.Empty)
			{
				exportFileName=	System.Guid.NewGuid().ToString("N") +"."+ reportExportType.GetDocumentExtention();
			}

			if ( !exportFolder.EndsWith(backSlash) )
			{
				exportFolder +=backSlash;
			}
			if (Directory.Exists(exportFolder) == false)
			{
				DirectoryNotFoundException ex =
					new DirectoryNotFoundException("Directory '" + exportFolder + "' does not exist.");
			}

			crDiskFileDestinationOptions = new DiskFileDestinationOptions();
			crDiskFileDestinationOptions.DiskFileName =exportFolder+ exportFileName;
			crExportOptions = crpt.ExportOptions;
			crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
			crExportOptions.ExportFormatType = reportExportType.ToCRExportFormatType();
			crExportOptions.DestinationOptions = crDiskFileDestinationOptions;

			switch (reportExportType.ExportType)
			{
				case ReportExportFileFormat.PDF:
				case ReportExportFileFormat.Word:
				case ReportExportFileFormat.RTF:
				case ReportExportFileFormat.Excel:
				case ReportExportFileFormat.CrystalReports:
					break;
				case ReportExportFileFormat.HTML4:
				case ReportExportFileFormat.HTML3:
					HTMLFormatOptions HTMLFormatopts = new HTMLFormatOptions();

					HTMLFormatopts.HTMLEnableSeparatedPages = false;
					HTMLFormatopts.HTMLHasPageNavigator = false;
					exportFolder += exportFileName;
					HTMLFormatopts.HTMLBaseFolderName = exportFolder;
					HTMLFormatopts.HTMLFileName =exportFolder + backSlash + exportFileName;
					crExportOptions.FormatOptions = HTMLFormatopts;
					break;

			}
            //crpt.Export(crExportOptions);
            crpt.ExportToDisk(crExportOptions.ExportFormatType, crDiskFileDestinationOptions.DiskFileName);
		}	

at this point I get: 

An exception of type 'CrystalDecisions.CrystalReports.Engine.LogOnException' occurred in CrystalDecisions.ReportAppServer.DataSetConversion.dll but was not handled in user code - Database Logon Failed

From stepping through the code I can see the dataset being populated with data. I've tried opening the report locally and verifying the database, I've got SQL Native Client instead on my machine. Can anyone please help me?

Error in File C:\Windows\TEMP\rptRERentInstallmentPaymentNormal {84F73A4E-E10E-4F7D-9004-ABA80C138631}.rpt: Failed to create the Crystal Query Engine

$
0
0

Getting this error:

Error in File C:\Windows\TEMP\rptRERentInstallmentPaymentNormal {84F73A4E-E10E-4F7D-9004-ABA80C138631}.rpt: Failed to create the Crystal Query Engine

NOTE: VS2008

Conversion of crystal command table into CommandTable

$
0
0

I've create a SAP crystal report to be based on ASP.NET and this table was build out by command table. I need to setting and getting the command query of report at run time, but it just happened to gave me error as "Unable to cast COM object of type 'System.__ComObject' to interface type 'CrystalDecisions.ReportAppServer.DataDefModel.CommandTable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EC2F9A25-E94D-40C0-BF21-3C9D748CC983}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))".

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptinnerfile = rptfile.ReportClientDocument;
CrystalDecisions.ReportAppServer.Controllers.DataDefController rptdatadefcontroller = rptinnerfile.DataDefController;
CrystalDecisions.ReportAppServer.DataDefModel.Database rptinnerdatabase = rptdatadefcontroller.Database;
CrystalDecisions.ReportAppServer.DataDefModel.CommandTable rptcmdtable = new CrystalDecisions.ReportAppServer.DataDefModel.CommandTable();

foreach(CrystalDecisions.ReportAppServer.DataDefModel.Table tbl in rptinnerdatabase.Tables)
 {
      rptcmdtable = (CrystalDecisions.ReportAppServer.DataDefModel.CommandTable) tbl;
 }

I've been struggling for this problem in few days, i'm hoping someone could help me out on this problem.Thanks

Certificate errors in Crystal Reports for Visual Studio

$
0
0

Hello,

After the last upgrade of Crystal Reports for Visual Studio, every time I open the report in design view I'm getting multiple certificate errors ("The certificate has expired or is not yet valid"). The errors come from the SAP web site "productupdates.sap.com", which indeed has certificate expired. But I cannot find any references to this site in my project. How to get rid of them? This doesn't happen on all computers, only on mine.

Thank you.
    
  
  
  
  
  
  
  
  
  
  
  
 
 
 


ReportViewer Calendar button Click does not show calendar

$
0
0

I have a reportviewer on a page which is grabbing a report from a report server. the page is basically just a dropdownlist and a reportviewer control. The problem I have is that in the report the user have to provide the dates for teh report. The reportviewerautomatically adds the textbox for the date entry and a calendar icon in front of it so the user can select the date. if I look at this page  in FireFox, when you click on the calendar button created by the reportviewer, the calendar control show up momentrily and dispappears. If you look at the same page in IE 7.0 nothing happens other than the page appears to be submitted. Does any body have any ideas on how to go about troubleshooting this bug?

 

Thanks

Viewing all 1507 articles
Browse latest View live


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