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

Make last page footer closing detail section

$
0
0

I designed to print 20 lines in detail section.

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

The last page only has 13 lines

Is it possible to make last page footer closing detail section?


In Asp.net page, how to code to load main and sub report?

$
0
0

I created main and sub crystal report using different dataset as report source.

In Asp.net page, how to code to load main and sub report?

Alternate row color in blank line

$
0
0

I designed to print 20 lines in detail section.


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


I code in CR detail section to make Alternate Row Color


if recordnumber mod 2 =0 then CrSilver else CrNocolor (this works fine)


How to make alternate row color working after line 53 until line 60? (this is no data)

Crystal Report export to PDF in ASP.NET 4.0,Windows Server 2008,IIS 7.5

$
0
0

we have application in visual studio 2008,iis 6.we converted that appliction to visual studio 2010,crystal reports 13,IIS 7.5,Windows Server.When we export report into large PDF not displaying anything in IE 11, But small data it's working fine.Report is working in under IE 10.It was report working before conversion.Could any body help me.

Object reference not set to an instance of an object. on report viewer passing parameters

$
0
0
<div class="jive-rendered-content">

i am passing a parameter on the viewer its showing the report

its showing at the left side the parameters, and the parameter that i passed

the problem its when i click on the parameter form e try to change to other its show this error below :

Object reference not set to an instance of an object. on report viewer

 

the report its showing correctly

but when try to change the value of the parameter i get this error :

 

Object reference not set to an instance of an object

the parameter its on the left

report.png

this its the code on default.aspx.cs

            ReportDocument myReport = new ReportDocument();

            DataSet myData = new DataSet();

            MySql.Data.MySqlClient.MySqlConnection conn;

            MySql.Data.MySqlClient.MySqlCommand cmd;

            MySql.Data.MySqlClient.MySqlDataAdapter myAdapter;

 

            conn = new MySql.Data.MySqlClient.MySqlConnection();

            cmd = new MySql.Data.MySqlClient.MySqlCommand();

            myAdapter = new MySql.Data.MySqlClient.MySqlDataAdapter();

 

            conn.ConnectionString = "server=127.0.0.1;uid=root;" +

            "pwd=;database=dinis;";

 

            try

            {

              cmd.CommandText = "SELECT * FROM user";

              cmd.Connection = conn;

 

              myAdapter.SelectCommand = cmd;

              myAdapter.Fill(myData);

        

              string fullReportPath = Server.MapPath("\\Reports\\CrystalReportodbcdinis.rpt");

//  @UserId is the parameter you added at the design of the crystalReport and userid is the

 

              myReport.Load(fullReportPath);

   // myReport.Database.Tables(0).SetDataSource(myData.Tables(0));

   // myReport.Database.Tables(1).SetDataSource(myData.Tables(1));

              ParameterDiscreteValue paramDV_UserId = new ParameterDiscreteValue(); // Step 1

              int userid = 8;

              paramDV_UserId.Value = userid; // step 2:userid is the value for the parameters

 

             // myReport.SetParameterValue("Utilizador",7);

 

 

              ParameterValues currentParameterValues = new ParameterValues();

 

              ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();

 

 

 

              parameterDiscreteValue.Value = userid.ToString();

 

              currentParameterValues.Add(parameterDiscreteValue);

 

 

 

 

              myReport.DataDefinition.ParameterFields["Utilizador"].ApplyCurrentValues(currentParameterValues);

http://localhost:13131/Default.aspx.cs

    CrystalReportViewer1.ReportSource = myReport;

}

catch (MySql.Data.MySqlClient.MySqlException ex)

{

 

    Response.Write(ex.Message);

    //MessageBox.Show(ex.Message, "Report could not be created",

    //    MessageBoxButtons.OK, MessageBoxIcon.Error);

</div>

Print 24 rows in detail section per page

$
0
0

I want report to print 24 rows in detail section per page.
How to do it?

Exporting Crystal Report to excel I am getting memory out of exception error.

$
0
0

Hi,

<div class="WordSection1">

When I try to export my crystal report to excel I am getting memory out of exception error.

My data here has 52k rows and 5 columns. When the data is huge I face this problem.. 

When the data is small we don’t have problem In exporting to excel. My server has SP2 installed

 and the setting  ignore paging to false Also did not work. Please suggest.

</div>

Passing a Request.QueryString to a Crystal Report SQL Command

$
0
0

Does anyone know how to pass aRequest.QueryStringto a Crystal Report SQL Command

I know this wont work but it demonstrates want I want to do

SQL Command

Select * From Mydatabase WHERELocID = Request.QueryString["id"];

I need a parameter but I don't know how to get the Reqiest.QueryString into crystal reports


Printing Crystal Report Directly Or export and print crystal Report

$
0
0

Hai

I have Been Trying to get a solution how to print the crystal report programmatically by clicking button for a almost 4 months Now. I Have asked the question .. and mark as answer without getting a solution by third party user. Like here  

http://forums.asp.net/t/1990047.aspx?Export+to+pdf+and+print+directly+

And searched around. mark answer ... I dont know .. how is been answer as a solution.. Link 

http://forums.asp.net/t/1639771.aspx?direct+print+in+crystal+report+without+showing+many+popup+in+vs+2008

Please Please Plizz help me to get this solution.(PRINTING A CRYSTAL REPORT DIRECTLY)

Crystal Report Problem

$
0
0

[Mod: Edited to mask password]

Hi all !

I am working on crystal report VS2010(Using C#). When i debug my project, it gave me two errors:

  1. Load Report Failed.
  2. Type 'CrystalDecisions.Shared.CrystalReportsException' in assembly 'CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is not marked as serializable.

I try to search this error on internet and apply some recommendations but still these error appears.

Here is my web.config file.

<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://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="defaultConnection" value="REAMSDBConnectionString"/>
</appSettings>
<connectionStrings>
<!--<add name="REAMSDBConnectionString" connectionString="Data Source=hazel.arvixe.com;Initial Catalog=REAMSDB;Persist Security Info=True;User ID=reamsdev;Password=xxxx" providerName="System.Data.SqlClient"/>-->
<add name="REAMSDBConnectionString" connectionString="Data Source=localhost;Initial Catalog=REAMSDB;Persist Security Info=True;User ID=sa;password=xxxx" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<anonymousIdentification enabled="true"/>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
<profile defaultProvider="ReamsProfileProvider">
<providers>
<add name="ReamsProfileProvider" connectionStringName="REAMSDBConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider"/>
</providers>
<properties>
<add name="Name" allowAnonymous="true"/>
<add name="VisitedOn" type="System.DateTime" allowAnonymous="true"/>
</properties>
</profile>
<roleManager enabled="true" cacheRolesInCookie="true" cookieName="TBHROLES" defaultProvider="REAMSRoleProvider">
<providers>
<add connectionStringName="REAMSDBConnectionString" applicationName="/" name="REAMSRoleProvider" type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
<authentication mode="Forms">
<forms defaultUrl="UserHistory.aspx" cookieless="UseCookies" loginUrl="Login.aspx"/>
</authentication>
<authorization>
<allow roles="Appraiser,Admin"/>
</authorization>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="REAMSDBConnectionString" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed"/>
</providers>
</membership>
<compilation targetFramework="4.0" debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<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"/>
<add assembly="CrystalDecisions.ReportSource, 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"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Data.AdoDotNetInterop, 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>
</system.web>
<location path="PropertySearch.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IClient_Service" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:9030/Client_Service.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IClient_Service" contract="REAMSService.IClient_Service" name="BasicHttpBinding_IClient_Service"/>
</client>
</system.serviceModel>
<system.net>
<mailSettings>
<smtp from="perfect.duffer@gmail.com" deliveryMethod="Network">
<network host="smtp.gmail.com" password="xxxx" port="587" enableSsl="true" userName="perfect.duffer@gmail.com"/>
</smtp>
</mailSettings>
</system.net>
<system.webServer>
<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"/>
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true"/>
</rptBuildProvider>
</crystalReports>
</businessObjects>
</configuration>

Waiting for positive response.

Abtisam

In Web form Crystal Report Viewer displaying blank

$
0
0

Hi

I'm new in Webform with Crystal Report. After a long goggling I able to build a Crystal report in web form. But it not displaying any thing. Here I will describe what I did.

1. Download "CRforVS_13_0_5.exe" and installed.

2. Create a .rpt file in my ASP.NET project.

3. Set the database fields

http://storage.workupload.com/image/A2zM5fqP

4. Below is my code to display the report

C# Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data.Odbc;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data;

namespace CR_Eg1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CreateRpt();
        }

        private void CreateRpt()
        {
            string test = "getAllVehicles";

            SqlConnection cnn = new SqlConnection("Data Source=SUGARSERVER;Initial Catalog=TestDB;Persist Security Info=True;User ID=sa;Password=Notetech!123;connection timeout=30");
            cnn.Open();
            SqlCommand testcmd = new SqlCommand(test, cnn);
            testcmd.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter testda = new SqlDataAdapter(testcmd);
            DataSet testds = new DataSet();
            testda.Fill(testds, "testttable");

            
            ReportDocument myReportDocument;
            myReportDocument = new ReportDocument();
            myReportDocument.Load(Server.MapPath("CrystalReport1.rpt"));
            myReportDocument.SetDataSource(testds.Tables[0]);
            myReportDocument.SetDatabaseLogon("sa", "Notetech!123");
            CrystalReportViewer1.ReportSource = myReportDocument;
            CrystalReportViewer1.DisplayToolbar = true;
        }
    }
}


html code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="CR_Eg1.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></head><body><form id="form1" runat="server"><div><CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" /></div></form></body></html>

I don't know for viewing we need anything additional. When I debugging, I'm getting the value in my dataset "testds"

 

 

 

 

Pausing a Job

$
0
0

In crystral reports, i have about 100 orders that print a day...is there a way i can pause the print job to print so many pages at a time, pause, then continue printint?

Crystal report custome font

$
0
0

Hi,

I am facing issue with custom font.I have installed one custom font on server windows\font\ folder. And Format Object I have set this custom font.I is working fine.But when I run this crystal report on my client side.It is not showing text my custom font style.It is showing default font style text. Then I was installed same custom font on my client machine & it's work.But when I try to export as pdf from client machine again it is showing me default font on pdf.Anybody help me to use custom font with crystal report.I am using vs2010.

Regards,

Problem while adding a Stored procedure

$
0
0

I have a crystal reports, which takes an ID as an input, which acts as a primary key and foreign key in various tables. Now I have a stored procedure, which I want to join with rest of these tables. The problem is this stored procedure takes its own input, instead of taking the original input of the report. I want the stored procedure to take the original input, instead of creating an input of its own. How can I resolve it.

SAP Crystal report not working in VS 2012

$
0
0

Hi

Pls see this thread.

http://forums.asp.net/t/2000371.aspx?In+Web+form+Crystal+Report+Viewer+displaying+blank

I posted here my problem and code.

I used the same code in VS2010. It correctly binding the CR and I'm getting the correct answer. When I tried with VS2012, Its even not showing the CR Viewer and also I'm not getting any error in code side.

Is there any problem for VS2012 using the crystal report. Some of my friends told, VS2012 not support CR. They told there is build in rpt tool for VS2012. Is it true?

Thanks

Bobbin


Crystal Report

$
0
0

Hello,

I would like to ask on how to add a value on crystal report based on Session.

For example:

The user wants to generate customer masterlist report.

The User's name must be there in the crystal report of the customer masterlist.

Like this Generated By: Username <- Session

 

Visual Studio 2012 Crystal Report not working on Web server

$
0
0

Hello,

I have created a crystal report in VS2012. it is working properly on local but when i host site on live server then it gives below error.

Could not load file or assembly 'CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'or one of its dependencies. The system cannot find the file specified.


Thanks,
Krunal

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

Export Crystal to Excel FORMAT OPTION

$
0
0

Dear all

Once opened a report from Crystal we have the possibility to export to excel choosing the app as Excel version XX Extended.

Normally before exporting the report to Excel a FORMAT OPTION mask pop up in order to design the data on Excel.

My problem is in some station I never get this mask. It looks like a DLL issue or Excel setting issue.

Would you have any clue to solve this problem and get the Format Option mask?

Best regards

 

Crystal Reports prompt issue on export: “The report you requested requires further information”

$
0
0

I have searched through forums for a solution but none seem to work for me.

I have an ASP Webform/MySql application which displays Crystal Reports.

The ones which do not require a user to enter a parameter display fine and I am able to click on export on the CR toolbar and download, e.g. .pdf format.

On the report that require a user to enter a parameter, the report renders fine but when I click on the export button, i get the prompt:

"The report you requested requires further information"

asking for DB login credentials. How can I avoid this?

My Code:

 protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["report"] != null)
            {
                string reportToGet = Convert.ToString(Request.QueryString["report"]);

                switch (reportToGet)
                {
                    case "payslip":
                        PaySlip();
                        break;
                    case "pastpayslip":
                        PanelPastPaySlip.Visible = true;
                        break;
                    case "paysummary":

                        break;
                    case "pastpaysummary":

                        break;
                    default:
                        break;
                }
            }
        }
 protected void btnSearch_Click(object sender, EventArgs e)
 {
      if (txtDate.Text != null || txtDate.Text != string.Empty)
           if (DateTime.TryParseExact(txtDate.Text, "yyyy-MM-dd", CultureInfo.InvariantCulture,
                       DateTimeStyles.None, out date))
               PastPaySlip();
 }



private void PastPaySlip()
{
// Some code.....
PayMasterDataSetTableAdapters.pastpayslipcasualviewTableAdapter ta = new PayMasterDataSetTableAdapters.pastpayslipcasualviewTableAdapter(); PayMasterDataSet.pastpayslipcasualviewDataTable dt = new PayMasterDataSet.pastpayslipcasualviewDataTable(); ta.FillBy(dt, userId, businessId); cReport = new ReportDocument(); string reportPath = Server.MapPath("~/Views/CasualLabour/Reports/PastPaySlip.rpt"); cReport.Load(reportPath); cReport.SetDataSource((DataTable)dt); cReport.SetParameterValue("Date", date); CrystalReportViewer1.ReportSource = cReport; CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
Viewing all 1507 articles
Browse latest View live


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