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

Print No as Barcode

$
0
0

Hi

  I have label as Rj0000000012 . I want to print as Barcode.

Thankd


Small Fonts

$
0
0

Hi

  In Crystal Reports 2011 Small fonts are appearing in Toolbar and other options . Image attached.

Thanks

Repeat 3 times

$
0
0

Hi

  I have Group Header & Details . I want to repeat 3 times. Is it possible

Thanks

Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommonObjectModel in mvc

$
0
0

I am facing error working with crystal report I dont have idea what is error

error is:

System.IO.FileLoadException: 'Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommonObjectModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

HomeController.cs

    public class HomeController : Controller
    {
        private readonly studentdbEntities _studentdbEntities;

        public HomeController()
        {
            _studentdbEntities = new studentdbEntities();
        }

        // GET: Home
        public ActionResult Index()
        {
            return View(_studentdbEntities.students.ToList());
        }

        public ActionResult ExportStudent()
        {
            List<student> allCustomer = new List<student>();
            allCustomer = _studentdbEntities.students.ToList();

            ReportDocument rd = new ReportDocument();
            rd.Load(Path.Combine(Server.MapPath("~/Report"), "CrystalReport1.rpt"));

            rd.SetDataSource(allCustomer);

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

            Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
            stream.Seek(0, SeekOrigin.Begin);
            return File(stream, "application/pdf", "student.pdf");
        }

Web.config

<configuration><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.ObjectFactory" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.CubeDefModel" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.XmlSerialize" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.Prompting" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.DataSetConversion" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.CommLayer" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.Controllers" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.ReportDefModel" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.ClientDoc" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportAppServer.DataDefModel" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692FBEA5521E1304" culture="neutral"/><bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0"/></dependentAssembly></assemblyBinding></runtime></configuration>

Line no 40 give an error see image

please help

want to generate crystal report in asp.net but an error occur?

$
0
0
hello  sir here in my code i want to generate crystal report in asp.net but an runtime error occur so solve them ?

here is my code
cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Configuration; using System.Data.SqlClient; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; namespace Crystal { public partial class WebForm1 : System.Web.UI.Page { SqlCommand cmd = new SqlCommand(); SqlConnection con = new SqlConnection(); string connection = System.Configuration.ConfigurationManager.AppSettings["con"].ToString(); public void EstablishConnection(string storeprocedure) { con.ConnectionString = connection; cmd.Connection = con; cmd.Connection.Open(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = storeprocedure; } public void CloseConnection() { cmd.Connection.Close(); cmd.Connection.Dispose(); con.Close(); } ReportDocument crystalReport; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { crystalReport = new ReportDocument(); crystalReport.Load(Server.MapPath("~/CustomerReport.rpt")); SqlDataAdapter adp = new SqlDataAdapter("SELECT TOP 5 * FROM tbl_products", connection); adp.SelectCommand.CommandType = CommandType.Text; DataTable DT = new DataTable(); adp.Fill(DT); //Customers dsCustomers = this.GetData("SELECT TOP 5 * FROM tbl_products"); //DataTable DT = new DataTable(); crystalReport.SetDataSource(DT); CrystalReportViewer1.ReportSource = crystalReport; } } //private Customers GetData(string query) //{ // string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString; // SqlCommand cmd = new SqlCommand(query); // using (SqlConnection con = new SqlConnection(conString)) // { // using (SqlDataAdapter sda = new SqlDataAdapter()) // { // cmd.Connection = con; // sda.SelectCommand = cmd; // using (Customers dsCustomers = new Customers()) // { // sda.Fill(dsCustomers, "DataTable1"); // return dsCustomers; // } // } // } //} protected void Export(object sender, EventArgs e) { ExportFormatType formatType = ExportFormatType.NoFormat; switch (rbFormat.SelectedItem.Value) { case "Word": formatType = ExportFormatType.WordForWindows; break; case "PDF": formatType = ExportFormatType.PortableDocFormat; break; case "Excel": formatType = ExportFormatType.Excel; break; case "CSV": formatType = ExportFormatType.CharacterSeparatedValues; break; } crystalReport.ExportToHttpResponse(formatType, Response, true, "Crystal"); Response.End(); } } } aspx<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Crystal.WebForm1" %><%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title><style type="text/css"> body { font-family: Arial; font-size: 10pt; }</style><script src='<%=ResolveUrl("~/crystalreportviewers13/js/crviewer/crv.js")%>' type="text/javascript"></script></head><body><form id="form1" runat="server"><div><CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" Height="400" Width="600" BestFitPage="False" ToolPanelView="None" /><br /> Format:<asp:RadioButtonList ID="rbFormat" runat="server" RepeatDirection="Horizontal"><asp:ListItem Text="Word" Value="Word" Selected="True" /><asp:ListItem Text="Excel" Value="Excel" /><asp:ListItem Text="PDF" Value="PDF" /><asp:ListItem Text="CSV" Value="CSV" /></asp:RadioButtonList><br /><asp:Button ID="btnExport" Text="Export" runat="server" OnClick="Export" /></div></form></body></html>
webconfig<?xml version="1.0" encoding="utf-8"?><!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  --><configuration><configSections><sectionGroup name="businessObjects"><sectionGroup name="crystalReports"><section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/></sectionGroup></sectionGroup></configSections><appSettings><add key="con" value="server=SANAMDEEP;uid=sa;pwd=sa123;database=store;" /><add key="CrystalImageCleaner-AutoStart" value="true"/><add key="CrystalImageCleaner-Sleep" value="60000"/><add key="CrystalImageCleaner-Age" value="120000"/></appSettings><system.web><compilation debug="true" targetFramework="4.5" > <assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies ><buildProviders><add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></buildProviders></compilation><authentication mode="Windows"/><httpHandlers><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers><pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/><httpRuntime targetFramework="4.5" /><pages><namespaces><add namespace="System.Web.Optimization" /></namespaces><controls><add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /></controls></pages></system.web><system.webServer><validation validateIntegratedModeConfiguration="false"/><handlers><add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/></handlers></system.webServer><businessObjects>		<crystalReports><rptBuildProvider><add embedRptInResource="true"/></rptBuildProvider></crystalReports></businessObjects><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly><assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" /><bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /></dependentAssembly>      </assemblyBinding></runtime><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" /><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" /></compilers></system.codedom></configuration>

Amount in Words

$
0
0

Hi

How to convert amount to words according to U.S terminology.

Hi

How to convert amount to words according to U.S terminology.

If value is - 1071013

it should be printed as - one million seventy-one thousand thirteen dollars and zero cents

numbervar RmVal:=0; 
numbervar Amt:=0; 
numbervar pAmt:=0; 
stringvar InWords :=" "; 
Amt := ({Command.Doc Total});


if Amt > 10000000 then RmVal := truncate(Amt/10000000); 
if Amt = 10000000 then RmVal := 1; 
if RmVal = 1 then 
InWords := InWords + " " + propercase(towords(RmVal,0)) + " crore" 
else 
if RmVal > 1 then InWords := InWords + " " + propercase(towords(RmVal,0)) + " crores";


Amt := Amt - Rmval * 10000000; 
if Amt > 100000 then RmVal := truncate(Amt/100000); 
if Amt = 100000 then RmVal := 1; 
if RmVal >=1 then 
InWords := InWords + " " + propercase(towords(RmVal,0)) + " lakhs";


Amt := Amt - Rmval * 100000; 
if Amt > 0 then InWords := InWords + " " + propercase(towords(truncate(Amt),0)); 
pAmt := (Amt - truncate(Amt)) * 100; 
if pAmt > 0 then 
InWords := InWords + " and " + propercase(towords(pAmt,0))+" "  +{@Cents} + " only" 
else 
InWords := InWords + " only";

Thanks

Thanks

Report Formula

$
0
0

Hi

I have 4 parameters . From Date , To Date , Product , UserSign.

From Date & To Date to be mandatory. I am using Owor , Wor1 tables.

I want if user Enters From Date & To Date only then records get filtered only on date Basis.

if user enters Date & Product then records get filtered only on date Basis & Product

if user enters Date & UserSign then records get filtered only on date Basis & UserSign

if user enters Date , Product , UserSign then records get filtered on Date Basis , UserSign , Product.

Thanks

crystal report showing blank in browser after Update Windows

$
0
0

I have a web application in .net 4.0 working fine on my 64bit windows 7 SP 1 machine. It is having crystal report in it which is also running well where I using Crystal Report 13.0.0.2 and Microsoft Visual studio 2010. 

problem starts when Update OS windows on server it is showing blank page in browser. 

I think this due to doing Update OS windows,


Grouping is resulting in separate report/invoice

$
0
0

I am grouping by a user-defined field.  the grouping is working correctly but it is creating a new invoice for every group.  I want all the groups on the same invoice.  i have Keep together checked in the Group setup.  I do not have New page before or after checked in the Section expert.  Keep together is also checked in the section expert. 

Why is it creating separate invoices?  i have the exact same setup grouped by date and that works fine. 

Rupee Symbol

$
0
0

Hi

   How to display Rupee Symbol in Crystal reports.

Thanks

pdf file

$
0
0

Hi

  I have Pdf file on Server . I want to print it through Crystal Reports. I am trying thru Insert Ole Object but Crystal Report hangs after that

Thanks

Print Terms & Conditions

$
0
0

Hi Dell

I want Terms & condition to print after Sales Order Print . Heading should not appear on Terms & Conditions.

I have created a separate report for Terms & Condition . Now where i should place it as subreport in Main report so that it should start printing on next page after Sales Order gets printed.

In Subreport i have written Terms & Conditions in Details section

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

Decimal Issue

$
0
0

Hi

  In database i have stored quantity as 0.017 . But in report it is getting printed as .02 

Thanks

Error - A Boolean is required here

$
0
0

Hi

  I am trying below condition in formula but it is giving above error

NOT({Command.IGSTRate}) > 0

Thanks


Crystal Report viewer navigation buttons not working

$
0
0

Working in Visual Studio 2008 and using the packaged Cystal Reports (version 10.5). I have a couple pages that use the Crystal Reports Viewer to display the reports, and I use the CRV navigation buttons to page through large reports.

Problem: The Next button only goes to page 2. The Previous button goes to Page 1 every time.

I've read that this is because the binding of the report occurs in the Page_Load() and the CRV paging resets every time the report is rebinded. It was suggested to move this into Page_Init() which should only fire once, save the report in Session state, and then rebind on post backs. I've tried this, but my code never seems to reach the Page_Init(). In fact, I don't even see Page_Init() as an option. I've tried protected override OnInit(), but it fires every post back so that's no good.

Does anyone have suggestions for a solution?

Where is Page_Init() in Visual Studio 2008?

 Thanks for any help.

 -Robert

 

 

Parameter

$
0
0

Hi

  I am trying to add Parameter using Modify Command but it is not getting saved . Secondly Orange symbol not appearing in front of Parameter in Parameter fields.

Thanks

nearest whole number

$
0
0

Hi

    How to round off field to nearest whole number. I have value say 50384.68 . I want it to displayed as 50385.00

Thanks

Detail Lines not getting printed

$
0
0

Hi

  I have below query . Since there is no record in Database it should display 2 lines since i have specified no record exists condition in query

If OBJECT_ID('TempDB.dbo.#GST_Report_GSTR3B_Exempt_Details') Is Not Null
	begin
		Drop Table #GST_Report_GSTR3B_Exempt_Details
	end
	select DocEntry,LineNum,DocNum,DocDate,CardName,LocGSTN,BaseSum,ItemTaxType,IsIntraState
	into #GST_Report_GSTR3B_Exempt_Details
	from (select distinct DocEntry,LineNum,DocNum,DocDate,CardName,LocGSTN,
	case when ObjType = 19 then -BaseSum
	else BaseSum end as BaseSum, ItemTaxType, IsIntraState
	from GST_ODOC_Result_Ignore_RvsCharge t0
	where ObjType in (18, 19)
	and ItemTaxType = 'GN'
	and PureNilRateDoc = 'Y'
	and BpGSTType <> 3
	and DocDate >= {?frDate}
	and DocDate <= {?toDate}
	and LocGSTN = '{?locGSTN}'
;

	with
	CTE1 as
	(
		select DocEntry,LineNum,DocNum,DocDate,CardName,LocGSTN,
		'From a supplier under composition scheme, Exempt and Nil rated supply' as "Nature of Supplies",
		convert(numeric(19, 2), isnull((case when IsIntraState <> 'Y' then BaseSum else 0 end), 0)) as "InterState",
		convert(numeric(19, 2), isnull((case when IsIntraState = 'Y' then BaseSum else 0 end), 0)) as "IntraState"
		from #GST_Report_GSTR3B_Exempt_Details
		where ItemTaxType <> 'NN'

        union all

		select 0,0,'','','','','From a supplier under composition scheme, Exempt and Nil rated supply',0,0
        where not exists
		(select 1 from #GST_Report_GSTR3B_Exempt_Details where ItemTaxType <> 'NN')
	),

	CTE2 as
	(
		select DocEntry,LineNum,DocNum,DocDate,CardName,LocGSTN,
		'Non-GST supply' as "Description",
		convert(numeric(19, 2), isnull((case when IsIntraState <> 'Y' then BaseSum else 0 end), 0)) as "InterState",
		convert(numeric(19, 2), isnull((case when IsIntraState = 'Y' then BaseSum else 0 end), 0)) as "IntraState"
		from #GST_Report_GSTR3B_Exempt_Details
		where ItemTaxType = 'NN'

        union all

		select 0,0,'','','','','Non-GST supply',0,0
        where not exists
		(select 1 from #GST_Report_GSTR3B_Exempt_Details where ItemTaxType = 'NN')
	),

	CTEU as
	(
		select * from CTE1
		union all
		select * from CTE2
	)

	select * from CTEU

Thanks

Orange symbol in front of Parameter

$
0
0

Hi

    What does Orange symbol mean in front of Parameter. I have 3 parameters against 2 it is showing . Against 1 it is not showing

Thanks

Viewing all 1507 articles
Browse latest View live


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