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

Missing data on report for only SOME records

$
0
0

There seems to be only a few random clients who's data does not show up in a report.  While other client data show up fine insame report?  I have confirmed that the "missing" data is indeed in the database table for clients w/missing data.

Since I cannot repeat the same behavior for every record  I'm at a lost to correct this.  Very odd that this issue only appears in certain clients?  Please advise.....

Thanks!


How to style or format Crystal report ??

Object Reference Not Set To An Instance Of An Object in Crystal Report

$
0
0

I anm new to the crystal report i wat to get it when i save the information of patient in windows application.when i save the information i am using the new form and passing the value from one form to new one .

 private void btnPaymentSave_Click(object sender, EventArgs e)
        {
            int MaxId = 0;
            da.OpenConnection();
            Info = new PatientInfo(da);
            PatientPayment = new Payment();
            int PaySuccess = 0;
            try
            {
                if (txtPatientName.Text == "")
                {
                    MessageBox.Show("Please Enter The Patient Name");
                    txtPatientName.Focus();
                }
                if ((txtPaid.Text == "")||(txtPaid.Text=="0"))
                {
                    MessageBox.Show("Please Enter the Paid Amount");
                    txtPaid.Focus();
                }
                if ((txtPatientName.Text != "") && (txtPaid.Text != "") && (txtPaid.Text != "0"))
                {
                    Info = Info.GetIdOfPatient(txtPatientName.Text.Trim());
                    PatientPayment.PatientId = Info.ID;
                    PatientPayment.PaidAmount = Convert.ToDecimal(txtPaid.Text);
                    PatientPayment.PaymentDate = DateTime.Now.Date;
                    PaySuccess = PatientPayment.Add(PatientPayment);
                    if (PaySuccess == 1)
                    {
                        MessageBox.Show("Patient Payment Saved Successfully");
                        ClearAll();
                    }
                    int id = Info.ID;
                    MaxId = PatientPayment.GetMaxID(Info.ID);frmPatientPaymentReport PaymentRepo = new frmPatientPaymentReport(Info.ID,MaxId); -----from here i am passing the id and max id to the new form on which i do have crystal viewer
                    PaymentRepo.ShowDialog();
                    PrintReport();
                } 
            }
            catch(Exception ex) { }

            

        }

suppose this is PatientPayment Form and

On new Form I am Doing the Code as

public partial class frmPatientPaymentReport : SForm
    {
        RptPatientPaymentReport PatientPay;
        int PatientID = 0;
        int MaxID = 0;
        public frmPatientPaymentReport()
        {
            InitializeComponent();
        }
        public frmPatientPaymentReport(int id,int MaxId) //here I am Collecting it and assigning it.
        {
            this.PatientID = id;
            this.MaxID = MaxId;
            Print(MaxId);
        }

        private void Print(int id)
        {
            PatientPay = new RptPatientPaymentReport();
            try
            {
                if (PatientPay != null)
                {
                    PatientPay.SetParameterValue("MaxID", id);
                    CrpViewerPatientPayment.ReportSource = PatientPay; //At this Point i am getting that error
                    CrpViewerPatientPayment.Refresh();
                }
            }
            catch (Exception ex)
            { }
        }

and at database expert i do have paid amount field i just want to write formula field to print to convert int to words so

1]how can i solve above issue??

2] how can i write formula field to print the amount into receipt??

thanks in advance

Crystal Report

$
0
0

What is Crystal Report in asp.net

Splitting a string

$
0
0

I am using Crystal Reports 9.0, I want to split the string into 2 in a formula. The split should be based on special character.

Example: "Address1^Address2"

Now I want to split this in such a way that Address1 and Address 2 should be in 2 different formulas. The character that is used for splitting is 'A'.

Crystal report

$
0
0

How to create a crystal report with database

i have twoconditions to get the crystal repoert...

$
0
0

I have two conditions on which i have to fetch the crystal report..

1]depending on name

2]depending on from date and to date

the query i wrote to fetch the crystal report depending on name is  by getting the id and passing it to query.. like

SELECT OPD.[ID] AS OPDNo, Patient.[PatientName], OPD.[BillAmount], OPD.[OPDDate]
FROM OPD INNER JOIN Patient ON Patient.[ID]=OPD.[PatientId]
WHERE OPD.[PatientId]=PID;

now in data expert i do have parameterised field as PID

now using same query i want to etch the crystal report depending on from and to date.......how can i do that??is there any provision to use if and else statement in MS Access

thanks in advance

Crystal report support for Digital signature

$
0
0

Hi ,

Can you please suggest me how to implement digital signature using crystal reports.


CrystalDecisions.Shared.dll is not marked as serializable.

$
0
0

Hi All,

I'm getting the below error on QA instance. But the same code is working fine at local developer system. 

Type 'CrystalDecisions.Shared.ParameterFields' in Assembly 'CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is not marked as serializable.

In local system we are using Inproc session state and QA instance we are using SQL Session state.

I'm storing the ParameterFields and ReportDocument object in session to reuse the object. Also, Im not using separate class for generation report. All the coding part is done in .aspx.cs class.

Please help me to solve this issue.

ASP.Net Project Not Showing Crystal Report While debugging VS 2010 C#

$
0
0

Hi All,

i m facing an issue in my project my which has many crystal reports, In debugging Mode it doesn't shows Crystal report (CrystalReportViewer)  using VS10 C# ASP.Net. however when i publish/deploy my project in IIS it is working and showing all crystal reports.

i am unable to sort this problem. and i thing this has something wrong in Web.Config

kindly advice..

regards,
Naveed

 

Is it possible to make a crystal report using csv file

$
0
0

Hi,

Can anybody tell me please if it is possible to make a crystal report in asp.net using the data from a csv file?

Thanks

Load report failed.

$
0
0

Hi All,

I'm facing the following error while loading my Report on Crystal Report Viewer. I have placed my report file (.rpt) under CR_Reports folder.

ERROR Exception in FillCrystalReportViewer() :Load report failed.stack : 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 CustomReports.FillCrystalReportViewer(DataSet ds)

I'm using the following code to read the report path.

reportPath = Server.MapPath("/CR_Reports/CustomReport.rpt");

Also i'm writing the report path in my log file. The report path gives me the right path where i have placed the Report file. Then i'm using the following code to load the report and assigning the DataSet to the report. 

ReportDocument reportDocument = new ReportDocument();

reportDocument.Load(reportPath);
reportDocument.SetDataSource(ds);
CustomReportViewer.Visible = true;
Session["CrystalReportSource"] = reportDocument;
CustomReportViewer.ReportSource = reportDocument;

Please help me to figure out the issue. 

Make image to the back and modify report field

$
0
0

I have a form as jpg file in which there are some member information need to fill.

I created a crystal report, inserted this jpg file as ole object, painbrush picture.

I drag a field into image. 

Is there any way I can make this image file move to back so that once mouse click the field will let me to modify it?

Attempted to read or write protected memory issue

$
0
0

Hi,

I have added a Crystal Report Viewer in my Custom Report page. I'm using Data Set as a data source. The page is loading fine with report data first time. I When i click the next page button it is started loading the report forever. I could not stop the loading. When i refresh the page i'm getting the following error message.

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

My page has 4 check boxes with different Report name. Based on the Report check box selection, first i'm loading the Data set then assigning into Crystal Report Viewer. First time the report loading fine(with the paging issue). When i select the next report check box and load the report, i'm getting the same error.

Please help me to fix this issue.

Pass Parameter to Crystal Report in asp.net

$
0
0

Hi all,

I was trying to pass parameter from my code behind into my crystal report but I keep getting error Load Report Failed

I use dataset to pass the parameter to crystal report. My dataset has 1 column (Test1)

here is my code in code behind

Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    Try
        Dim path As String = Server.MapPath("~\Reports\CrystalReportTest.rpt")
        Dim rptDoc As ReportDocument = New ReportDocument
        rptDoc.SetDatabaseLogon("test", "test", "TestDB", "JulianPC", True) -> got error on this line when tried putting breakpoint
        Dim a As String = "10001"
        Dim b As String = "10003"
        rptDoc.Load(path)
        rptDoc.FileName = "CrystalReportTest.rpt"
        rptDoc.SetParameterValue("Test1", a)
        CrystalReportViewer1.ReportSource = rptDoc
        CrystalReportViewer1.Visible = True
    Catch ex As Exception

    End Try
End Sub

here is my aspx code

<CR:CrystalReportSource ID="CrystalReportSource1" runat="server"><Report FileName="CrystalReportTest.rpt"></Report></CR:CrystalReportSource><table><tr><td><CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" ReportSourceID="CrystalReportSource1" AutoDataBind="True" HasPrintButton="True" HasRefreshButton="True" ReuseParameterValuesOnRefresh="True" Height="50px" Width="350px"/></td></tr></table>

Could anyone tell me how to fix this?

Thanks in advance for any help


Save Crystal Report as PDF

$
0
0

Hi,

I want to save crystal report as PDF when a user view that report..... so on my page load event i created the below code

protected void Page_Load(object sender, EventArgs e)
{

string invoicenumber = "";
invoicenumber = Request.QueryString["invoicenumber"];
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath("CrystalReport.rpt"));
reportdocument.SetDatabaseLogon("xxxxxx", "xxxxxxx", "xxxxxxxx", "xxxxxxx");
reportdocument.SetParameterValue("@invoicenumber", invoicenumber);
CrystalReportViewer1.ReportSource = reportdocument;
DataSet dsrep = new DataSet();
GetData(dsrep);
reportdocument.SetDataSource(dsrep);
reportdocument.ExportToDisk(ExportFormatType.PortableDocFormat, "C:\\report.pdf");
}

When executing the last line showing an error Missing parameter....any one help me urgent....

Note: I used Stored Procedure for this...no XML file is created for this... with out creating XML file and Dataset manually i need to acheve this

Crystal Report toolbar not showing in IE 11

$
0
0

Crystal Report Tool Bar is missing when run report in IE 11 (non compatible mode)

Working fine when Compatible mode is on.

I am using Crystal Report 11.5

Any Idea how can I solve this problem?

Crystal Error Report

$
0
0

HI

Environment : Visual Studio 2005,Windows Server 2003,Crystal Reports Engine Version=10.0.3300.0

I am receiving the  Crystal Reports Error frequently  in my production server.
The Error is :A Crystal Reports job failed because a free license could not be obtained in the time allocated.
More licenses can be purchased direct from Crystal
Anyone can help me out to figure out why this error message occurs?

                       

Store procedure return two tables

$
0
0

I use store procedure with CR. If the store procedure only return one table, CR has no problem.

Now, I change the store procedure to return two tables.

How to make CR to choose second tables as data source?

In CR fields explore, I can only see fields from one table.

Page footer failed to print

$
0
0

I designed to print 20 lines in detail section.

If records are 53 lines the report will print 3 pages.

For first and second page, report will print page footer but at third page, page footer will not print anything.

How to fix it?

Viewing all 1507 articles
Browse latest View live