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

How to use Crystal Report when using MYSQL database connection

$
0
0

i have a page where i have to generate report 

on button click.

i had added crystalreportviewer on page.

now i have written a query to fetch data.

but how to use that query to fetch report in crystal report

and connection is of MySql


Line suppression at bottow of page

$
0
0

Hello,

I have a report that contains a box that is wrapped around the detail sections.  I also have a detail section where I am placing a line under each detail row.  When I get to the bottom of the page, I am getting two line showing; one from the box and another from the detail section containing the line.

How can I suppress the detail section on the last print of the page?

 

Thanks in advance!!

Eddi Rae

new to crystal report in asp.net

$
0
0

Hello everyone,

can someone please guide me creating crystal report in asp.net.  what are the steps in creating and calling crystal report on button click

thanks,

crystal report picture not showing

$
0
0

Hello 

I have crystal report and when I use static image , the image is not show in the report 

I am using latest Crystal Report Service Pack for VS 2010 

I search in many sites and I couldn't find any good solution. 

Any Idea? 

Crystal Report Export To PDF Error : Operation not yet implemented

$
0
0

Hi,

We are facing an issue while exporting Crystal Reports to PDF in Windows 2003 R2 Server. The Error Message is : Operation not yet implemented.

We have gone through the following different solutions available inthe internet:
1. Provide permission for Network Service and Aspnet users to the Temp folders and other required folders.
2. Register Export related dlls ( ExportModeller.dll, CrtSlv.dll, atl.dll, etc. )
3. Verify the Font availability in the System. (We are using Microsoft Sans Serif and Arial only in our crystal reports)
4. Provided full trust in the config file.
5. Setup a client server application to generate the same report and it is working.

The problem seems to be with some permission or policies for web applications. The knowledge base articles from BO (Business Objects) are also not available on the internet after BO were absorbed by SAP.

Please see the error screenshot below.

Error in File C:\windows\Temp\REportVendor {9F0FC3C9-35B5-432A-A96B-306417EC5E38}.rpt:
Operation not yet implemented.

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:\windows\Temp\REportVendor {9F0FC3C9-35B5-432A-A96B-306417EC5E38}.rpt:
Operation not yet implemented.

Source Error:

Line 60: catch(Exception ex)
Line 61: { Line 62: throw; Line 63: } Line 64: }

Source File: c:\disco\Default.aspx.cs   Line: 62

Stack Trace:

[COMException (0x800003e7): 
Error in File C:\windows\Temp\REportVendor {9F0FC3C9-35B5-432A-A96B-306417EC5E38}.rpt:
Operation not yet implemented.]
   CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) +0
   CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +260

[InternalException: 
Error in File C:\windows\Temp\REportVendor {9F0FC3C9-35B5-432A-A96B-306417EC5E38}.rpt:
Operation not yet implemented.]
   CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) +700
   CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +315
   CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) +676
   CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) +214
   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) +266
   _Default.Page_Load(Object sender, EventArgs e) in c:\disco\Default.aspx.cs:62
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

 

The Error is throwing on this line

 rptDoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat,@"C:\VendorReportNew.pdf");

If any one faced on this issue in your experience, please share with me.

Thanks in Advance,

Rajesh

Access Denied when load a Crystal Report

$
0
0

Hi!

First, an apologize for my english not is very good.

my problem is a little strange, because is not recurrent only sometimes appear a error that said:

"Access Denied, Load Report Failed"

my code is this:

Dim ds As DataSet
        Dim dt As DataTable = Nothing
        dt = New dsReportes.resumen_semanalDataTable
        Try
            query = sqlReporteResumenSemanal.sp_cp_reporte_resumen_semanal("D_Recurso_Semana", dropSemanas_ini.SelectedValue.Split("-")(0), dropSemanas_ini.SelectedValue.Split("-")(1), dropSemanas_ini.SelectedValue.Split("-")(2), dropSemanas_fin.SelectedValue.Split("-")(0), dropSemanas_fin.SelectedValue.Split("-")(1), dropSemanas_fin.SelectedValue.Split("-")(2), Master.UserID, dropAnalistas.SelectedValue, Master.UserArea)
            ds = AccesoDatos.LoadDataSet(query)
            lblArea.Text = ds.Tables(0).Rows(0).Item("Area")
            lblSemana_ini.Text = ds.Tables(0).Rows(0).Item("Periodo_ini")
            lblSemanas_fin.Text = ds.Tables(0).Rows(0).Item("Periodo_fin")

            dt = ds.Tables(1)
            crSource.Report.FileName = "Reportes\rptResumenSemanal.rpt"
            crSource.ReportDocument.SetDataSource(dt.DefaultView)
        Catch e As Exception
            Master.ShowError(e.Message)
        End Try

and the exception is in this line:

crSource.ReportDocument.SetDataSource(dt.DefaultView)

thanks for your help!

regards!

P.S. this image show the exception before that i put my code "Try...Catch"

https://drive.google.com/file/d/0B_M1wbQtwa3vQzNxdFFFbmx3emc/edit?usp=sharing

hi, i am trying to open and view a report that comes from another server with different odbc connection

$
0
0

hi, i am trying to open and view a report that comes from another server with different odbc connection

i created a crystal report for a mysql database on my machine and everything works great

but we have other reports that come from other machines with different odbc connection

and this its not working when opens the report asks for credentials

and i cannot use the remote ip for these reports that come from other machines

question

if i cannot connect to remote ip to open the report

for each report i have to create a database the report database on my machine and then open the report ?

or there is some other way to open the report ?

i am using visual studio 2013 and mysql and

   <add key="MYSQLODBCDRIVER" value="{MySQL ODBC 5.3 UNICODE Driver}"/>

thanks

crystal report and oracle connection using asp.net (web application)

$
0
0

hi, I am trying to connect with ORACLE database using asp.net 3.5 for displaying Crystal Report. I used the code

cr.SetDatabaseLogon("userid", "password", "localhost", "dbName")

 

error message:

Logon failed. Details: ADO Error Code: 0x Source: OraOLEDB Description: ORA-01005: null password given; logon denied Native Error:  Error in File C:\Users\ASUS\AppData\Local\Temp\ListOfProduct {43AB9328-CC1F-47C9-A76D-3998F68E0128}.rpt: Unable to connect: incorrect log on parameters.

 Can someone please mention, how to solve the problem

Thanks


Suppress blank field

$
0
0

I am using crystal reports. Now I have a customer database, where in the address section, there are multiple addresses (Address 1, Address 2 and Address 3) followed by zip code, and town.

There are situations where the customer leaves these address blank. So what I have done is I took a text object and inside this text object I have merged these columns separated by comma, and in the properties of text object, I have checked 'Grow' and 'Suppress blank', so that in case any of the field is left blank, it suppresses it.

It is working fine, but in case of blank section, I want to suppress commas too. How can I accompalish this?

Crystal report version 10.5.3700.0 and 13.0.2000.0 refers to which versions?

$
0
0

Hi,

I have two versions of crystal report in my system. While I'm using VS 2008 I'm getting crystal report viewer version 10.5.3700.0 and if I use VS 2010 I'm getting crystal report viewer version 13.0.2000.0.

Kindly help me to find whether crystal report version 10.5.3700.0 refers to Sap crystal report 2008 and crystal report 13.0.2000.0 version refers to Sap crystal report 2011?

Thanks in Advance

Database logon failed when opening report with parameter values in CrystalReportViewer

$
0
0

Hi,

I designed 2 crystal reports: report A contains parameter fields and report B did not contain any parameter

I can open both reports in development site using CrystalReportViewer control. When I open the reports intesting site, I can open report B but can't open report A. It display error message "Database logon failed". When I set EnableDatabaseLogonPrompt to true and try to open the report A again, it shows database connection data which was created on report.

In addition, it is strange that it displays error "Database logon failed" when I click an item in group tree panel of the report B. This indicates that it can load data from database
in testing site but it connect to development database when clicking items in group tree panel

All reports connect to database using Windows Authenication. It use dynamic database connection at runtime

How to ensure the report always connect database using login data dynamically at runtime?

Below is my code about database connection:

---------------------------------------------------------------------

string strServerName = null;
string strDatabaseName = null;

ReportDocument rptDoc = new ReportDocument();

rptDoc.Load(strFilePath);

ConnectionInfo connInfo = new ConnectionInfo();
TableLogOnInfo logonInfo;

for (int i = 0; i < rptDoc.Database.Tables.Count; i++)
{
logonInfo = rptDoc.Database.Tables[i].LogOnInfo;

ReportHelper.GetReportConnection(ref strServerName, ref strDatabaseName, strSystemType);

logonInfo.ConnectionInfo.ServerName = strServerName; 
logonInfo.ConnectionInfo.DatabaseName = strDatabaseName;

logonInfo.ConnectionInfo.IntegratedSecurity = true;
rptDoc.Database.Tables[i].ApplyLogOnInfo(logonInfo);
rptDoc.Database.Tables[i].Location = rptDoc.Database.Tables[i].Location.Substring(0, rptDoc.Database.Tables[i].Location.Length - 2);
}

crvViewer.ReportSource = rptDoc;

crvViewer.DataBind();

--------------------------------------------------------------

Development environment:

- SAP Crystal Reports 2013 Support Pack 1
- Visual Studio Professional 2012
- .NET Framework 3.5
- DDL
CrystalDecisions.Shared (v 13.0.8.1216)
CrystalDecisions.Web (v 13.0.8.1216)
CrystalDecisions.CrystalReports.Engine (v 13.0.8.1216)

Database connection in crystal report:

- Database Type: OLEDB (ADO)
- Provider: SQLOLEDB
- Integrated Security: True

Thanks and Regards,
Tony

Crystal reports -Export to print after rendering does not start

$
0
0

Hello,

I have an issue with crystal report and it is driving me crazy. I am using crystal report 2008 runtime on the server. If i browse the website and run the report using the default website(the name of the server), reports get exported successfully.

But when i use website name instead of servername, then the report print page after rendering does not show up.

Any help will be apprecaited.

Thanks

Crystal Report Print to PDF option

$
0
0

Hi,

I am using Crystal Report 13 and trying to print a report. I setup my crystalreportviewer as bellow.

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" PrintMode="ActiveX"/>

When I press print button on CrystalReportViewer, it shows me Print to PDF export option with the following message. I want it to be print directly to the printer. 

The viewer must export to PDF to print. Choose the Print option from the PDF reader application once the document is opened. Note: You must have a PDF reader installed to print. (eg. Adobe Reader)

Please help. thanks

crystal report viewer print button not working

$
0
0

crystal report viewer print button not working... anyone can help me pls..... Cry

Crystal Reports Error

$
0
0

I am using Crystal Reports for Visual Studio 2010 with VB.NET. I connected crystal reports to Microsoft Access 2013 database through dataset. I'm getting the error:
Failed to load database information. Error in file temp....................................rpt. Can someone please help me with this??


Problem in Printing and Exporting Crystal Report

$
0
0

I'm Using VS2010 and SQL Server.

The below code is I have used in my page for Crystal report.

//Here I retrieve User Name from another page using session

protected void Page_Load(object sender, EventArgs e)
{
lblUserName.Text = Session["empName"].ToString();
}


protected void btnRpt_Click(object sender, EventArgs e)
{
ReportDocument rptDoc = new ReportDocument();
DSsample ds = new DSsample(); // .xsd file name
DataTable dt = new DataTable();
dt.TableName = "Crstal Report";
dt = GetAllOrders();
ds.Tables[0].Merge(dt);
if (ds.Tables[0].Rows.Count > 0)
{
rptDoc.Load(Server.MapPath("~/CrystalReport.rpt"));

rptDoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptDoc;
CrystalReportViewer1.RefreshReport();
}
else
{
Response.Write("<script type=\"text/javascript\">alert('No record found for the month & year!...');</script>");
}
}


public DataTable GetAllOrders()
{
SqlConnection cn = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=salaryReg;User ID=sa;Password=kavi");
SqlCommand cmd = new SqlCommand("Select * from SalaryEarnings where empName='" + lblUserName.Text + "' and Salary_Year='" + ddlYear.Text + "' and Salary_Month='" + ddlMonth.Text + "'", cn);
DataSet ds = null;
SqlDataAdapter da;
try
{
cn.Open();
ds = new DataSet();
da = new SqlDataAdapter(cmd);
da.Fill(ds, "User");
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
finally
{
cmd.Dispose();
if (cn.State != ConnectionState.Closed)
cn.Close();
}
return ds.Tables[0];
}

this is the code I've used to generate crystal report in one of my asp.net web site under button click event. This create report without any errors but after that when i click print button on crystal report tool bar print function is not working and when try to do Exporting the report it asks for further details by giving a window like this

The report you requested requires further information.
DataSet
Server name: ...........
Database name: .........
User name: ..........
Password: ........... 
(checkbox) Use Integrated Security.

Please Tell me What I need to do Printing and Exporting my records.

Versioning queries in Crystal Report?

$
0
0

Hi,

I have two versions of crystal report in my system. While I'm using VS 2008 I'm getting crystal report viewer version 10.5.3700.0 and if I use VS 2010 I'm getting crystal report viewer version 13.0.2000.0.

Kindly help me to find whether crystal report version 10.5.3700.0 refers to Sap crystal report 2008 and crystal report 13.0.2000.0 version refers to Sap crystal report 2011?

Thanks in Advance

Load Report Failed On Crystal report Printing

$
0
0

i have  face a problem ,I have use crystal report 13 in asp.net application. When print multiple copy continuously then printing stop.its run again when we restart application pool.

please provide any solution.

Generating Crystal Report Using Entity Framework in MVC5

$
0
0

Please I have an application that I have built and am trying to integrate crystal report using what i have query from my controller

this is the report generator Controller

public ActionResult ExportReport(int CategoryId, string DateFrom, string DateTo)
        {

            DateTime StartDate = Convert.ToDateTime(DateFrom);
            DateTime EndDate = Convert.ToDateTime(DateTo);
            ReportDocument read = new ReportDocument();
            

            if (CategoryId == 1)
            {
                var dailyReport = _routineService.GetAllRoutines().Where(x => x.LaodingDate >= StartDate && x.LaodingDate <= EndDate && x.CategoryId == CategoryId).ToList();
                read.Load(Path.Combine(Server.MapPath("~/Reports"), "DailyReport.rpt"));
                read.SetDataSource(dailyReport);
                Response.Buffer = false;
                Response.ClearContent();
                Response.ClearHeaders();

                try
                {
                    Stream stream = read.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                    stream.Seek(0, SeekOrigin.Begin);
                    return File(stream, "application/pdf", "Enugu_Local_DailySalesReport.pdf");
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else if (CategoryId == 2)
            {
                var bridgReport = _routineService.GetAllRoutinesByCategory(CategoryId).Where(x => x.LaodingDate >= StartDate && x.LaodingDate <= EndDate).ToList();
                read.Load(Path.Combine(Server.MapPath("~/Reports"), "BridgingDailyReport.rpt"));
                read.SetDataSource(bridgReport);
                Response.Buffer = false;
                Response.ClearContent();
                Response.ClearHeaders();

                try
                {
                    Stream stream = read.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                    stream.Seek(0, SeekOrigin.Begin);
                    return File(stream, "application/pdf", "Enugu_Bridging_DailySalesReport.pdf");
                }
                catch (Exception ex)
                {
                    throw ex;
                } 
            }

            return RedirectToAction("DailyReport");
        }

The problem now is when the database is query with that specific data, instead of the Crystal report template to print what has been queried  from database, it now bring every record from database irrespective of the  date and category... I don't want every record from database, I want to print daily, monthly, Quarterly and yearly report.

I think some how that it because am connecting my crystal report directly to database like this .\sqlexpress. How can i make it work with my query please?

Please I need some help on how to export what I query from database to crystal report thank you for your help

am new to crystal report please help me out thank you

Crystal Report to PDF

$
0
0

I am trying to send the data from a single record to a Crstal Report that I created and then create a PDF from that report that I can Print.  This is the error message that i get 

Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceException: The data source object is invalid.

Can anyone help me this this? 

Thank You

This is the ActionResult that I created.

  public ActionResult ExportReport(int? id)
          {

            InjuryIllness i = db.InjuryIllnesses.Find(id);
            ReportDocument rd = new ReportDocument();
            rd.Load(Path.Combine(Server.MapPath("~/Reports"), "Report_InjuryIllness.rpt"));
           rd.SetDataSource(i);
          
            Response.Buffer = false;
            Response.ClearContent();
            Response.ClearHeaders();
 
            try
                 {
                    Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                    stream.Seek(0, SeekOrigin.Begin);
                    return File(stream, "application/pdf", "Report_InjuryIllness.pdf");
                 }
            catch (Exception ex)
                {
                throw;
                }
        }

Viewing all 1507 articles
Browse latest View live


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