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

Stacked Bar chart and Line chart

$
0
0

Summary of the problem I am having:

I am trying to plot a chart that has combined stacked bar chart and a line chart. The data points for stacked bar PQ_MIN, PQ_3, PQ_2, PQ_1 and PQ_MAX for each time period and the line should pass through those bars with my actual return value for the time period showing where my actual falls.

PQ_MIN, PQ_3, PQ_2, PQ_1 and PQ_MAX are always in increment range. I mean PQ_MIN is the least value and P_MAX is highest value. The vlaues PQ_3, PQ_2 and PQ_1 lies between those min and max values. The chart works well if all the values are positive. The issue is with negative values. max value stacks at the last and away from zero line. But It should be close to zero line as it is highest value. 

Any suggestions to achieve this kind of graph? I am not able to insert an image here.


Crystal Report Issue on Development Server

$
0
0

Server Error in '/' Application.
Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
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.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).]
CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +169

[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0
CrystalDecisions.CrystalReports.Engine.ReportClass..ctor() +14
localhost_7853.Report.SalesInvoice..ctor() in D:\My Project\Ganjo\Online Billing\localhost_7853\localhost_7853\Report\SalesInvoice.cs:21
localhost_7853.Controllers.HomeController.PrintA4Invoice() in D:\My Project\Ganjo\Online Billing\localhost_7853\localhost_7853\Controllers\HomeController.cs:275
lambda_method(Closure , ControllerBase , Object[] ) +62
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228
System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9749277
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159

Pass parameter value from mvc controller to crystal reports

$
0
0

Good day

It may be a noob question but ow do you pass a parameter from controller to crystal reports? I am kinda new when it comes to crystal reports.

Controller

ReportDocument rd = new ReportDocument();
rd.Load(Path.Combine(Server.MapPath("~/Reports"), "Mtop.rpt"));
SqlConnection cn = new SqlConnection("Data Source=test.tayabas.gov.ph;initial catalog=iVehicles;User ID=sa;Password=TEST@dm!n!@#$%;MultipleActiveResultSets=True;Application Name=EntityFramework;");
SqlCommand cmd = new SqlCommand("sp_vwFranchiseList");
SqlDataAdapter sda = new SqlDataAdapter(cmd);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@franchiseid", franchiseid);
rd.SetParameterValue("@Name", Tname);
rd.SetParameterValue("@Position", TPosition);

cmd.Connection = cn;
sda.SelectCommand = cmd;

I have a crystal report Mtop.rpt. Inside it I created two new parameters named, Name and Position. But when I try the code above, I receive an error

Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

What am I doing wrong here? Is there an easier way to pass a value from controller to crystal reports?

Thanks in advance.

Parameters windows not prompting

$
0
0

Dear

I have the problem that the parameter window of crystal reports isn't prompting when loading the report.

This is in Windows Server 2016 - IIS 2016. On my local machine with IIS express it works like a charm.

Reports without parameters are loading without any problem on the server. But when parameters are required I just get an empty screen (with the export, print button etc...).

Configuration: ASP.NET 4.6, Windows Server 2016, SQL Server 2017 Express.

supress text object

$
0
0

Hi all,

I have two text object in a crystal report .
In the first I have "COD."

In the second the value of the code, like this "100".

If I do not have value in second text object (like code empty), how can I suppress the 1st text box with the word "COD."?

thanks

d.

Word Reporting - C#

$
0
0

Hello There - I am familiar with Excel reporting from C# winforms but i have not used word reporting. 

Need you suggestion on below

  1. Best approach on Word reporting with template - I have gone through MSDN article but need some help in finding and replacing
  2. I have textarea or multiline textboxes, I have to merge the formatted(with Bold/Italics) on to word directly retaining the user format

Thanks

Crystal Report issue

$
0
0

Good afternoon,

Not sure if anyone can assist me with this but i'm banging my head against a brick wall.

I have a project which has been written in Visual Studio 2013, here is the code i'm using to call the report (quite simple)

frmReports.monthlyProjectsEnquiries1.SetParameterValue("Month", Now.Month)
frmReports.monthlyProjectsEnquiries1.SetParameterValue("Year", Now.Year)
frmReports.CrystalReportViewer1.ReportSource = frmReports.monthlyProjectsEnquiries1
frmReports.CrystalReportViewer1.Refresh()

However the report does not show me the date range i'm requiring, instead it just shows me all entries for the entire table!

Here is the Record Selection formula

{quotation.quoteStatus} <> "Delete" and
cdate ({quotation.quoteEnqDate}) >= cdate ({?Year},{?Month},1) and
cdate({quotation.quoteEnqDate}) <= cdate ({?Year},{?Month},Day(DateSerial({?Year}, {?Month} + 1, 0)))

I am using Crystal Reports - Version 13.0.18.2192

If anyone can help then that would be great.

Regards
Simon

Insert text from multiple lines text box into Crystal Report.

$
0
0

In my ASP.NET apps form, there is multiple lines text box and user input like

Thank you for your fax.

I'll reissue a check to you.

If you have any question, please call me at xxx-xxx-xxxx.

But once inserting into a textobject of Crystal Report, it displays like one line below.

Thank you for your fax.I'll reissue a check to you.If you have any question, please call me at xxx-xxx-xxxx.

How to fix it to display like multiple lines text?


Crystal report not showing in Window Server 2008 r2

$
0
0

I had tried the copying the aspnet_client folder into the application folder but still the crystal report is not showing, only a blank page.

Crystal Reports Login Fails on ExportToDisk

$
0
0

<div>

Hi Everyone,

Using Web Deploy 3.6 I have imported a .Net framework 1.1 application from Windows Server 2003 x86 IISv6 to Windows Server 2016 using the following sources:

https://stackoverflow.com/questions/18385286/windows-server-2012-with-asp-net-1-1

http://www.uhleeka.com/blog/2009/08/how-to-install-asp-net-v1-1-with-iis7-on-windows-2008-x64/

The 32-bit HTTP application is working with the exception being the Crystal Reports component (error below, ExportToDisk)

The 32-bit code is writing to C:\windows\sysWOW64\inetsrv\Reports without issue (you can see if delete the file in question) but an error is returned as shown below rather than a "powered by crystal" window with "download this report as a Microsoft Word document"

Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
Source Error:
Line 786: if(System.IO.File.Exists("Reports\\Report.doc"))
Line 787: System.IO.File.Delete("Reports\\Report.doc");
Line 788: oRptVar.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, Server.MapPath(".\\Reports")+"\\Report.doc");
Line 789: hlWordReport.NavigateUrl = "Reports\\Report.doc";
Line 790: CrystalReportViewer1.ReportSource = oRptVar;

Source File: c:\inetpub\wwwroot\APPsystem\Appreports.aspx.cs Line: 788

Stack Trace:
[LogOnException: Logon failed.]
.I(String , EngineExceptionErrorID ) +506
.D(Int16 , Int32 ) +537
CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) +469
CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) +188
AppSystem.AppReports.GenerateVarsReport(String Var) in c:\inetpub\wwwroot\Appsystem\Appreports.aspx.cs:788
AppSystem.AppReports.SLAReportB4_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Appsystem\Appreports.aspx.cs:1196
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1273

Prior to the web deploy 3.6 import, I have configured Windows Server 2016 as follows:

Installed .Net 1.1 framework and Security updates
Configured DefaultAppPool, .NET CLR Version v1.1.4322, classic managed pipeline mode,Enabled 32-bit applications = true
NTFS security on the folders c:\inetpub\wwwroot\<>
Installed MS Visual Studio .Net Enterprise Architect 2003
Crystal Reports runtime was installed during VS install

If anyone has come across this issue, please let me know on how you resolved.

Thanks.

</div>

Crystal report in VB.NET

$
0
0

I am new to crystal report.

I have installed crystal report in vs 2017.

I can connect to database and tables and view values. But If I place a link button in the form and placed navigation url to the crystal report, then error is showing.

 how can I attain as below:

From vb.net Form ,If I click print button, the crystal report must show in .PDF

Appreciate the Help

Print Report with multiple Projects

$
0
0

In webform application I have a different real estate projects and I want to print report for each project using Crystal report.

The problem is when I select multiple reports and if one report has 3 rows so it takes all space of a page this mean the rest of page space going useless

Ideally if one projects record has been printed on the very next line the next project heading gets printed and its record and then rest of the project respectively.

Right now I have checked on 'New Page Before' checkbox on Group Header

Crystal Report

Print button CrystalreportViewer

$
0
0

Hello

I have a problem with the Crystal report viewer. If I have a report with paramaters, then I am not able to use the print button. It doesn't show the dialog box for printing (Printmode: PDF). Reports without parameters are printable and show no problems. Someone has an idea ?

This is my code to bring up the CrystalReportViewer:

        if (_reportName != string.Empty)
        {
            ReportDocument cryRpt = new ReportDocument();
            cryRpt.Load(ReportDirectory + report);
            cryRpt.SetDatabaseLogon(gebruikersNaam, ww);
            rptViewerWish.ReportSource = cryRpt;
            rptViewerWish.DataBind();
        }

crystal report access form vb.net

$
0
0

My project is in vb.net. Crystal report was developed by another person in c#.net. Is there any way to call the crystal report on button click of vb.net website. Thanks

Error while running Crystal report in IIS -VB.NET

$
0
0

While running a report from IIS (The report will save the file in to .pdf in to a folder) .Appreciate the Help

Error

Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
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: Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).


Crystal Report Print Option -VB.NET

$
0
0

My project is in vb.net .I have a  crystal report,Once I click save button,the report is saved to the folder (where the path is specified).
How can I print the Crystal report directly when i click the save button.Appreciate the help

2 grids in Crystal report

$
0
0

Hi,

I need to create a report with more than one grid and chart. How can I do that and how can I set more than one datatable for the report? I neet to set datatable from code behind.

CrystalReport1 cr1 = new CrystalReport1();
cr1.SetDataSource(dt);
CrystalReportViewer1.ReportSource = cr1;
CrystalReportViewer1.RefreshReport();

Report page from 3 doesn't work

$
0
0

Hi,

I created a report in mvc application. When i navigate in page 1 and 2 all it works. When I try to change to page 3 the report remain in page 2. No error.

I have 3 detail section, one for page. If I reduce height of every detail section, section 3 show in page 2 correctly.

Any advice?

ASP.Net 2017 - MVC 5 Crystal Subreports

$
0
0

Good day tech gurus,

l now know how to create a crystal report in MVC 5 and exporting it to pdf through a view on browser, but l have no clue how to create a sub-report and call it on master report so that the comprehensive report can also be exported to pdf. Any one who knows how this can be done please help. Here is my scenario: l have two models, SchemeBook which then becomes the master report and SchemeBookObjectives which then becomes the Subreport:

    public class SchemeBook
    {
        [Key]
        public Int64 SchemeID { get; set; }
        public int ClassID { get; set; }
        public int SubjectID { get; set; }
        public int SchoolYear { get; set; }
        public int SchoolTerm { get; set; }
        public Int64 Userid { get; set; }
    }

    public class SchemeBookObjective
    {
        [Key]
        public Int64 ObjectiveID { get; set; }
        public string Objective { get; set; }
        public Int64 SchemeID { get; set; }
        public Int64 Userid { get; set; }
    }

Here are the report views:

        public ActionResult RptTPStudentSchemeBook()
        {
            Int64 scmID = Convert.ToInt64(HttpContext.Session["scmId"]);
            Int64 scmYR = Convert.ToInt64(HttpContext.Session["scmYr"]);
            Int64 scmTM = Convert.ToInt64(HttpContext.Session["scmTerm"]);
            object[] parameters = { scmID };
            ReportDocument rd = new ReportDocument();
            rd.Load(Path.Combine(Server.MapPath("~/Reports/RptTPStudentSchemeBook.rpt")));
            rd.SetDataSource(objReportView.RptTPStudentSchemeBook(parameters));
            RptTPStudentSchemeObjective(scmID);


            Response.Buffer = false;
            Response.ClearContent();
            Response.ClearHeaders();

            Stream str = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
            str.Seek(0, SeekOrigin.Begin);


            string SavedFileName = string.Format("Scheme_{0}_{1}_{2}_{3}", Session["FName"], Session["LName"], scmYR, scmTM);
            return File(str, "application/pdf", SavedFileName);
        }

        public ActionResult RptTPStudentSchemeObjective(Int64 scmID)
        {

            object[] parameters = { scmID };
            ReportDocument rd = new ReportDocument();
            rd.Load(Path.Combine(Server.MapPath("~/Reports/RptSchemeObjective.rpt")));
            rd.SetDataSource(objSchemeBookObjective.GetAll(parameters));

 
            Stream st = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
            st.Seek(0, SeekOrigin.Begin);
            string SavedFileName = string.Format("Scheme_{0}", DateTime.Now);
            return File(st, "application/pdf", SavedFileName);
        }

RptTPStudentSchemeObjective is a subreport linked to master report RptTPStudentSchemeBook based on SchemeID which is obtained through a session variable scmID.

l am getting error message:

Server Error in '/' Application.

Error in File RptTPStudentSchemeBook 6840_15604_{25FA1B33-61FE-4CAF-9443-5AA13AD6EDF4}.rpt:
Unable to connect: incorrect log on parameters. 
  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 RptTPStudentSchemeBook 6840_15604_{25FA1B33-61FE-4CAF-9443-5AA13AD6EDF4}.rpt:
Unable to connect: incorrect log on parameters.

Source Error: 



Line 187:            Response.ClearHeaders();
Line 188:
Line 189:            Stream str = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Line 190:            str.Seek(0, SeekOrigin.Begin);
Line 191:            //string SavedFileName = string.Format("Scheme_{0}", DateTime.Now);

 Source File:  C:\Users\TMATIWURE\source\repos\CollegeSys\CollegeSys.WebUI\Controllers\ReportController.cs    Line:  189 

Stack Trace: 


 I AM ALSO VERY WILLING TO DROP CRYSTAL REPORTS FOR RDLC OR SSRS AS LONG AS I GET A GOOD STEP BY STEP LINK WHICH CAN TAKE ME THROUGH FROM THE BEGINNING.

Subreports in MVC 5 - ASP.Net 2017

$
0
0

Good day Tech Gurus,

l have two models, Schemebook and SchemeBookObjectives. l have managed to create crystal reports for the two models, rptTpStudentSchemeBook and rptSchemeObjective. l now want the rptTpStudentSchemeBook  to be the master andrptSchemeObjective to be the subreport. Could anyone please assist

Viewing all 1507 articles
Browse latest View live


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