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

Question about CDateTime

$
0
0

I have this formula:  CDateTime({Data.Pleasesign})
The Output is :  05/15/2018  12:00:00 

I need for the output to be:
 Output should be :  05/15/2018  12:00
(NOT SECONDS)

What should I need to change in my formula to have the right result?

Thanks


Crystal Report linking issue

$
0
0

I have been working on a Crystal Report for my company and every time I run the report, I get ZERO information back.  I am fairly new to Crystal Reports and very rusty on SQL commands, but I figure I will post the SQL Code here and the report and you can at least look at the SQL Code and see if I am doing something wrong.

SELECT
A.AR_CASH_ID ID,
A.CLIENT_ID,
C.NAME CLIENT_NAME,
A.CHK_DATE,
A.CHK_NUMBER,
A.CHK_AMT,
A.CHK_MEMO,
A.TX_TYPE,
A.DEPOSIT_TO,
A.SOURCE_AUDIT,
G.DESCRIPTION GL_DESC,
G.GL_CURRENCY,
I.CASH_MISC
FROM
AR_CASH A
INNER JOIN CRYSTAL_ARRCU I ON I.ID = A.AR_CASH_ID
INNER JOIN CRYSTAL_PROG P ON P.PROG_ID = I.PROG_ID
LEFT OUTER JOIN GLACCOUNT_ALL G ON G.GL_ACCT_ID = A.DEPOSIT_TO
LEFT OUTER JOIN CLIENT_ALL C ON C.CLIENT_ID = A.CLIENT_ID
WHERE
'CASH' = I.CASH_MISC AND
P.PROG_USER = '{?PROG_USER}' AND
P.PROG_NAME = '{?PROG_NAME}'
UNION ALL
SELECT
A.AR_MISC_ID ID,
A.CUSTOMER_NAME CLIENT_ID,
A.CUSTOMER_NAME CLIENT_NAME,
A.CHK_DATE,
A.CHK_NUMBER,
A.CHK_AMT,
A.CHK_MEMO,
A.TX_TYPE,
A.DEPOSIT_TO,
A.SOURCE_AUDIT,
G.DESCRIPTION GL_DESC,
G.GL_CURRENCY,
I.CASH_MISC
FROM
AR_MISC A
INNER JOIN CRYSTAL_ARRCU I ON I.ID = A.AR_MISC_ID
INNER JOIN CRYSTAL_PROG P ON P.PROG_ID = I.PROG_ID
LEFT OUTER JOIN GLACCOUNT_ALL G ON G.GL_ACCT_ID = A.DEPOSIT_TO
WHERE
'MISC' = I.CASH_MISC AND
P.PROG_USER = '{?PROG_USER}' AND
P.PROG_NAME = '{?PROG_NAME}'

I am basically canning an old report as to avoid making a new report from scratch, but needless to say I am stuck.  If anybody has any advice as to how to run this please let me know.

Crystal report not working on windows 10

$
0
0

Crystal report not working on windows 10 it displays blank page but no reports being generated. I m using 4.0 .net framework visual studio 2010 and Ms-SQL 2008 R2 and Crystal report 13. Windows 10 64 bit .It was working fine on windows 8.1 but not on 10.

Report Viewer error ( Add

$
0
0

Hi all

I have a problem since many days, I tried to solve but still not reached to the solution.

I have a report viewer linked to "rdlc" report file. It works fine in my local machine, but when uploaded to my webserver , it shows :

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

Report Viewer Configuration Error

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.web/httpHandlers section of the web.config file, or add <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.webServer/handlers section for Internet Information Services 7 or later.

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

While the entry :

<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

is already there in the web.config file.

Please help

Thanks

Crystal Report Multi Value Parameter

$
0
0

I have a crystal report in asp.net with multiple subreports, Main report takes one parameter. If i pass the parameter 1000 , it will generate the report with the sub reports for the given parameter. I wanna pass multiple parameter as "1000,1002,1003" and execute the report for each value in parameter. I converted my parameter field to "Accept Multiple Parameter" but i do not know how to tell crystal , generate this report for each value in this parameter field. 

 would appreciate any help 

Crystal report not showing data from DataSet.

$
0
0

Crystal report not showing data from DataSet.Please help Me?

Here Is my Code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using SiMYAPetro.Company.Report.Financial.CreditSale;

namespace SiMYAPetro.Company.Report_Views.Financial.CreditSale
{
public partial class rptfrmCustomerReceiptReport : Form
{
public rptfrmCustomerReceiptReport()
{
InitializeComponent();
}

static int Mcode;
//ReportDocument cryRpt;


#region Constructor
public rptfrmCustomerReceiptReport(int code)
{
InitializeComponent();
Mcode = code;
}
#endregion

#region Form Load
private void rptfrmCustomerReceiptReport_Load(object sender, EventArgs e)
{
try
{
CommonClasses.objcon.FillCombo("CR_CODE", "CR_NO", "SELECT CR_CODE,CR_NO FROM CUSTOMER_RECEIPT WHERE ES_DELETE=0 AND CR_CM_CODE='" + frmLogin1.COMPYEARID + "'", cmbFrom);
CommonClasses.objcon.FillCombo("CR_CODE", "CR_NO", "SELECT CR_CODE,CR_NO FROM CUSTOMER_RECEIPT WHERE ES_DELETE=0 AND CR_CM_CODE='" + frmLogin1.COMPYEARID + "'", cmbTo);
cmbFrom.SelectedValue = Mcode;
cmbTo.SelectedValue = Mcode;
}
catch (Exception Ex)
{
CommonClasses.objcon.WriteLog("Customer Receipt", "From Load", Ex);

}

}

#endregion


#region btnShow_Click
//Author: Sushant
//Date:27-02-2018
//This Event is used to show report of Customer Receipt.
private void btnShow_Click(object sender, EventArgs e)
{
string query = string.Empty;
DataSet dtCustomerReceipt = new DataSet();
try
{
rptCustomerReceiptReport objrptCustomerReceiptReport = new rptCustomerReceiptReport();
query = "Select COMPANY_MASTER.CM_IMAGE, " +
"CUSTOMER_RECEIPT.CR_CODE," +
"CUSTOMER_RECEIPT.CR_DATE," +
"CUSTOMER_RECEIPT.CR_NO," +
"CUSTOMER_RECEIPT.CR_NARRATION," +
"LEDGER_MASTER.LM_NAME," +
"LM.LM_NAME as RECEIVED_IN," +
"CUSTOMER_RECEIPT.CR_AMT " +

"from CUSTOMER_RECEIPT " +
"Inner Join COMPANY_MASTER on CUSTOMER_RECEIPT.CR_CM_COMP_ID= COMPANY_MASTER.CM_CODE " +
"Inner Join LEDGER_MASTER on CUSTOMER_RECEIPT.CR_LM_CODE=LEDGER_MASTER.LM_CODE " +
"Inner Join LEDGER_MASTER LM on CUSTOMER_RECEIPT.CR_LM_RECEIVED_IN=LM.LM_CODE " +

"Where CUSTOMER_RECEIPT.ES_DELETE=0 " +
"And COMPANY_MASTER.CM_CODE='" + frmLogin1.COMPYEARID + "'";

if (cmbFrom.SelectedIndex == -1 || cmbTo.SelectedIndex == -1)
{
MessageBox.Show("Please Select Receipt", "Simya");
return;
}
else
{
query = query + " And CUSTOMER_RECEIPT.CR_CODE Between " + cmbFrom.SelectedValue + " AND " + cmbTo.SelectedValue + " ";
}


dtCustomerReceipt = CommonClasses.objcon.GetDS(query + " AND CUSTOMER_RECEIPT.CR_CM_CODE ='" + frmLogin1.COMPYEARID + "' ORDER BY CR_DATE", "dtCustomer_Invoice_Format");

if (dtCustomerReceipt.Tables[0].Rows.Count == 0)
{
MessageBox.Show("No data Found");
return;
}
DataTable dtCompanyDetails = CommonClasses.objcon.GetTable("select CM_VATNO,CM_CSTNO,CM_EMAIL_ADDRESS," +
"CST_AUTHO_SIGNATORY,CM_GSTIN " +
"from COMPANY_MASTER,COMPANY_SETTINGS where CM_COMP_ID=" + frmLogin1.COMPID + " " +
"and CM_CODE=" + frmLogin1.COMPYEARID + "");
if (dtCompanyDetails.Rows.Count == 0)
{
MessageBox.Show("Data Not Found");
return;
}
objrptCustomerReceiptReport.SetDataSource(dtCustomerReceipt);
rptReportView objreportview = new rptReportView();
objreportview.Show();
objrptCustomerReceiptReport.SetParameterValue("txtCompName", frmLogin1.COMPNAME);
objrptCustomerReceiptReport.SetParameterValue("txtTitle", frmLogin1.CM_ADD);
if (dtCompanyDetails.Rows[0]["CM_EMAIL_ADDRESS"] != DBNull.Value)
{
objrptCustomerReceiptReport.SetParameterValue("txtPhone", " Ph.No:" + frmLogin1.CM_PHONE + " Email:" + dtCompanyDetails.Rows[0]["CM_EMAIL_ADDRESS"].ToString());
}
else
{
objrptCustomerReceiptReport.SetParameterValue("txtPhone", " Ph.No:" + frmLogin1.CM_PHONE + " Email:" + " ");

}
//if (dtCompanyDetails.Rows[0]["CM_VATNO"] != DBNull.Value)
//{
// objrptCustomerReceiptReport.SetParameterValue("txtvat", dtCompanyDetails.Rows[0]["CM_VATNO"].ToString());
//}
//else
//{
// objrptCustomerReceiptReport.SetParameterValue("txtvat", " ");
//}
//if (dtCompanyDetails.Rows[0]["CM_CSTNO"] != DBNull.Value)
//{
// objrptCustomerReceiptReport.SetParameterValue("txttin", dtCompanyDetails.Rows[0]["CM_CSTNO"].ToString());
//}
//else
//{
// objrptCustomerReceiptReport.SetParameterValue("txttin","");
//}
//if (dtCompanyDetails.Rows[0]["CST_AUTHO_SIGNATORY"] != DBNull.Value)
//{
// objrptCustomerReceiptReport.SetParameterValue("txtAuthoSignatory", dtCompanyDetails.Rows[0]["CST_AUTHO_SIGNATORY"].ToString());

//}
//else
//{
// objrptCustomerReceiptReport.SetParameterValue("txtAuthoSignatory", "");

//}
//if (dtCompanyDetails.Rows[0]["CM_GSTIN"] != DBNull.Value)
//{
// objrptCustomerReceiptReport.SetParameterValue("txtGSTIN", dtCompanyDetails.Rows[0]["CM_GSTIN"].ToString());
//}
//else
//{
// objrptCustomerReceiptReport.SetParameterValue("txtGSTIN", "");

//}

objreportview.crystalReportViewer1.Refresh();
objreportview.Activate();
objreportview.WindowState = FormWindowState.Maximized;
objreportview.Text = "Customer Receipt Report";
objreportview.crystalReportViewer1.ReportSource = objrptCustomerReceiptReport;


}
catch (Exception Ex)
{
CommonClasses.objcon.WriteLog("Customer Receipt", "btnShow_Click", Ex);

}
}
#endregion

#region TabPage Paint
private void mainPanel_Paint(object sender, PaintEventArgs e)
{
CommonClasses.tabpagepaint(this, e);
}
#endregion

private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}

}
}

Visal studio 2013

$
0
0

i m facing an error while working in asp.net website and vs 2013

Error 1 Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\Users\erum\Documents\Visual Studio 2013\WebSites\WebSite1\web.config 48

here is web.config

<?xml version="1.0"?><!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
--><configuration><configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/><section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings><add key="CrystalImageCleaner-AutoStart" value="true"/><add key="CrystalImageCleaner-Sleep" value="60000"/><add key="CrystalImageCleaner-Age" value="120000"/></appSettings><connectionStrings><add name="ConStr" connectionString="data source=Venkat;database=CallCenterExecuter;user id=sa;password=sas;integrated security=SSPI;Persist Security Info=True"/></connectionStrings><system.web><!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        --><compilation debug="true"><assemblies><add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><add assembly="CrystalDecisions.CrystalReports.Design, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/></assemblies></compilation><!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        --><authentication mode="Forms"/><!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"><error statusCode="403" redirect="NoAccess.htm" /><error statusCode="404" redirect="FileNotFound.htm" /></customErrors>
        --><pages><controls><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages><httpHandlers><remove verb="*" path="*.asmx"/><add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers><httpModules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web><location path="Admin"><system.web><authorization><allow users="Admin"/><deny users="*"/></authorization></system.web></location><location path="Emp"><system.web><authorization><allow users="Emp"/><deny users="*"/></authorization></system.web></location><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><providerOption name="CompilerVersion" value="v3.5"/><providerOption name="WarnAsError" value="false"/></compiler><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><providerOption name="CompilerVersion" value="v3.5"/><providerOption name="OptionInfer" value="true"/><providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom><!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    --><system.webServer><validation validateIntegratedModeConfiguration="false"/><modules><remove name="ScriptModule"/><add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules><handlers><remove name="WebServiceHandlerFactory-Integrated"/><remove name="ScriptHandlerFactory"/><remove name="ScriptHandlerFactoryAppServices"/><remove name="ScriptResource"/><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/></handlers></system.webServer><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>

i googled a lot and tried multiple possiblse solution ,but not find what is actual problem and its solution

What runtimes are needed to deploy an ASP.Net website with Crystal Reports to IIS?

$
0
0

Hello everyone,

I have a VS2015 ASP.Net website that has a Crystal Report that runs fine locally.  My local PC has the following installed:

  • SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit)
  • SAP Crystal Reports version for Microsoft Visual Studio

I published the website to our Windows 64-bit IIS server but I get this error when I browse to the report: "CrystalReportsException: Load report failed."

I have the same CR runtime installed on the server - SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit).  Do I need the Crystal Reports for Visual Studio runtime as well?  If so, I noticed when I try to install it, I get the error that "Visual Studio x.x needs to be installed".

Any thoughts?

Thanks for any help!


How to sort group by number if the field is string?

$
0
0

I have a field that represents apartment number and it is string. When I have a group sorted by that field, I get:
1
11
12
2
etc..
I want it to go is it would if it were a number..
1
2...etc
I have tried to create a sort formula:

if isnumeric({table.field}) then ToNumber({table.field})  else -1

But that is not working..
I mean it is working, but the numbers are like this:
1,00
2,00..
Can someone help?  I tried to put ToText, but then it gives me an error

shrink box to fit data within it

$
0
0

Is there a way to shrink a box or text box?

We have a text box containing address data fields (add1, add2, add3, town & postcode) and when any of those lines are blank they are suppressed, displaying fewer lines. However, the border doesn't adjust to fit.  Unfortunately, we've been tasked with reproducing some legacy reports so have no flexibility with the design - it has to have a border around it.

I can't see a Shrink option - is there a way to do it programmatically or somehow anchor the border to the last line of data?

Thanks

EDIT: since I can't delete the thread entirely, please ignore. We've come up with an alternative solution. Thanks

format Data Date

$
0
0

Hello developers, 

I am working with Crystal reports.  I am using Data Date (which is under special fields) on report's detail section. I need to format the Data Date to show complete date .E.g. if it is 12/31/2017, then it should show December 31, 2017, Could you please assist me how can I format that.  I tried to create a new formula on it  but no luck.

Please let me know if my question is not clear to you.

Thanks

Load Report Failed in Crystal Report

$
0
0

I am using Crystal Reports in my ASP.NET Application. more peoples are using the app within the company. many requests to any report page will come every second.  Every day we see"Load Report Failed" upto 10 times. the way we solve is that we restart IIS server then it got fixed. Is there any one can help me please because this is not convenient my manager is always blaming me but I don't have any other solution.  Help Me Please

Modifying a canned report fails after adding simple sub report.

$
0
0

Im stuck. 

Im modifying a canned MAX report, after getting the whole thing setup and working wonderfully on my machine I realized it fails on every single other users computer. 

It prompts for a DB login for a blank DB when run. 

If I remove the subreport it runs fine. Ive entered the right credentials for the sub but it prompts for login every single time. 

Publish Crystal Report to web server for VS2017 ASP.NET project.

$
0
0

My ASP.NET project which created in VS2017 with Crystal Report is working at local PC.

I knew that in order to publish project to web server, CR run time engine have to install to web server.

Is there another way to add Crystal Report DLL file in projects (For example, add DLL files into bin folder) and then publish to web server without installing CR run time engine in web server?

how to declare parameter sql command with parameter crystal report in sqlc command crystal report

$
0
0

declare @cardcode nvarchar (100)

set @cardcode =(Select max(t3.cardcode) from ocrd t3 where t3.cardcode='[%0]')

SELECT OJDT.TransId, OJDT.RefDate, OJDT.TaxDate, OJDT.Ref1, OJDT.Ref2, OJDT.Ref3,JDT1.ShortName, JDT1.Debit, JDT1.Credit,
JDT1.Line_ID, JDT1.LineMemo, JDT1.Account, oact.AcctName,OCRD.CardCode, OCRD.CardName
FROM (SELECT * FROM JDT1 JDT1A WHERE EXISTS (SELECT * FROM JDT1 JDT1B WHERE ShortName=@cardcode and JDT1A.TransId = JDT1B.TransId)) JDT1
INNER JOIN (SELECT * FROM OJDT OJDTZ WHERE EXISTS (SELECT * FROM JDT1 JDT1B WHERE ShortName=@cardcode and OJDTZ.TransId = JDT1B.TransId)) OJDT ON OJDT.TransId = JDT1.TransId
INNER JOIN OACT ON JDT1.Account = OACT.AcctCode
CROSS JOIN (SELECT CARDCODE, CARDNAME FROM OCRD where CardCode=@cardcode ) OCRD order by TransId,Line_ID


What is the suitable font for Dot Matrix Printer to print RDLC?

$
0
0

Hi,
I'm using a RDLC report in my app. I tried printing my RDLC in dot matrix printer" with the font "Arial".

But, it isnot clear. Unable to differentiate numbers with this font.

Please suggest me some suitable fonts which will be more readable when printed in Dot Matrix Printer.

Thanks in advance.

Connection string

$
0
0

Hi

  We had develop ASP.net application with SQL server 2016. Now we upgrade  for SQL server toAlways on High Availability 

we had now 3 server 1) Witness   2) SQL-Cluster-1   3 ) SQL-cluster-2 

in 2016 SQL server we used to have Connection string 

Public ConnStr As String = "server=192.168.2.149;Database=EMPLS;UID=FNG_ADMIN;PWD=XXXXX;Connect Timeout=0; pooling='true'; Max Pool Size=400"

Now i want New connection string Which server i had connect ?

Which Crystal Report run time to install for vs2015 and vs2017?

$
0
0

For some reasons, I have to use vs2015 and vs2017 in the PC.

Which Crystal Report run time to install for vs2015 and vs2017?

Slow printing of crystal reports from a c# winform

$
0
0

I'm am sometimes having a problem with printing crystal reports from a c# winform. I was wondering why that would be. 

Below is the code being called when a crystal report is printed:

  public static void PrintCrystalReport(string reportPath, List<KeyValuePair<string, string>> lstParameters, List<PageColorOptions> colorOptions, DataSet ds = null, int numberOfCopies = 1)
        {
            var main = Application.OpenForms.OfType<Main>().SingleOrDefault();
            bool showPrintDialogBox = main.ShowPrintDialogBox();
            if (Main.computerId == -1 && !showPrintDialogBox)
            {
                MessageBox.Show("Please create printers associated to this computer.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            try
            {
                ReportDocument rpt = new ReportDocument();
                //  reportPath =  Path.Combine(@"..\..\", reportPath);
                rpt.Load(reportPath);
                if (ds != null) rpt.SetDataSource(ds);
                foreach (KeyValuePair<string, string> p in lstParameters)
                {
                    rpt.SetParameterValue(p.Key, p.Value);
                }


                CrystalDecisions.Shared.ConnectionInfo crConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();
                crConnectionInfo.ServerName = ConfigurationManager.AppSettings["SQLServerServer"];
                crConnectionInfo.DatabaseName = "Mandtob_QA";// ConfigurationManager.AppSettings["SQLServerDatabaseName"];
                crConnectionInfo.UserID = ConfigurationManager.AppSettings["SQLServerUserName"];
                crConnectionInfo.Password = ConfigurationManager.AppSettings["SQLServerPwd"];
                var connectionAttributes = new DbConnectionAttributes();
                connectionAttributes.Collection.Set("Provider", "SQLOLEDB"); //eg: SQLOLEDB
                crConnectionInfo.Attributes.Collection.Add(new NameValuePair2 { Name = "QE_LogonProperties", Value = connectionAttributes });
                CrystalDecisions.CrystalReports.Engine.Database crDatabase = rpt.Database;
                CrystalDecisions.CrystalReports.Engine.Tables crTables = crDatabase.Tables;
                TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
                foreach (Table t in crTables)
                {

                    crTableLogOnInfo = t.LogOnInfo;

                    crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                    t.ApplyLogOnInfo(crTableLogOnInfo);
                }

                if (showPrintDialogBox)
                {
                    PrinterSettings printerSettings = new PrinterSettings();
                    PrintDialog printDialog = new PrintDialog();
                    printDialog.PrinterSettings = printerSettings;
                    printDialog.AllowPrintToFile = false;
                    printDialog.AllowSomePages = true;
                    printDialog.UseEXDialog = true;

                    DialogResult result = printDialog.ShowDialog();

                    if (result == DialogResult.Cancel)
                    {
                        return;
                    }

                    rpt.PrintOptions.PrinterName = printerSettings.PrinterName;
                    rpt.PrintToPrinter(printerSettings.Copies, false, 0, 0);
                }

<div style="display: none; height: 16px; width: 16px; position: fixed; z-index: 100000000; cursor: pointer; padding: 0px; margin: 0px; opacity: 0.5;"></div>

school management project

$
0
0

I am developing the school online application project .lots of confusion occur anyone please give me to develop a very and general school application in ASP.NET BY USING C#,

SQL SERVER2012.Is there any code please forward me as soon as possible to my mail id vamsikrishnameds@gmail.com

Viewing all 1507 articles
Browse latest View live