15,949,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Anil Vaghasiya (Top 47 by date)
Anil Vaghasiya
11-May-16 2:57am
View
Hello,
You don't define menuContent in "saleOrder","newtask" if you inherit the parent.
--AV
Anil Vaghasiya
30-Jul-15 0:50am
View
Hello,
Please describe the problem or issue in details??
Anil Vaghasiya
25-Jul-15 8:09am
View
okay but i'm getting Please check your code and what is the issue ??
Just create newApplication and Copy above code and paste it, I think Your ClientSideClick function not work so just check your code.
Anil Vaghasiya
24-Jul-15 8:17am
View
Hello, if you got the answer then Please Marked answer as Solution & +5 vote.
Anil Vaghasiya
24-Jul-15 6:39am
View
Hello,
It works definately first call the method ClientSideClick() after call ConfirmNEW() and After call "cmdSave_Click" server side Methods.
Just Check Below Example.
<asp:Button ID="aspbtn" runat="server" OnClientClick="ClientSideClick(this);confirmNew(this);" OnClick="aspbtn_Click" Text="Press Here">
<script>
function ClientSideClick(obj) {
alert(obj.id, 'Test Called ClientSideClick Methods');
}
function confirmNew(obj) {
alert('Test Called ConfirmNew Methods');
if (confirm('You may lose your changes if not saved.\nPlease press Save before navigating.\n\nAre you sure to continue?')) {
__doPostBack(obj.id, '');
} else {
return false;
}
}
</script>
<asp:Label ID="lbl" runat="server">
protected void aspbtn_Click(object sender, EventArgs e)
{
lbl.Text = "Called ASP Button";
}
Anil Vaghasiya
24-Jul-15 6:24am
View
Just Refer the Example :-
<script>
function ConfirmNEW(obj) {
if (confirm('You may lose your changes if not saved.\nPlease press Save before navigating.\n\nAre you sure to continue?')) {
__doPostBack(obj.id, '');
} else {
return false;
}
}
</script>
<asp:Button ID="cmdSave" ValidationGroup="purchaseval" runat="server" Text="test" CssClass="savebutton1231" OnClientClick="ClientSideClick(this); ConfirmNEW(this);" EnableTheming="false" OnClick="cmdSave_Click" SkinID="skinBtnSave" />
Anil Vaghasiya
23-Jul-15 8:56am
View
Hello,
Use Below Code If You want to Use StoredProcedure
ReportDocument rd;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
using (SqlConnection sqlcon = new SqlConnection("Data Source=ASIFD-3\\ASI2008;Initial Catalog=master;Integrated Security=True"))
{
sqlcon.Open();
SqlCommand sqlcmd = new SqlCommand("asiSelectAllEmployee", sqlcon);
sqlcmd.CommandType = CommandType.StoredProcedure;
sqlcmd.ExecuteNonQuery();
da.SelectCommand = sqlcmd;
da.Fill(ds);
}
rd = new CrystalReport1(); // ReportFile Name that CrystalReport1.rpt
rd.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = rd;
crystalReportViewer1.Refresh();
Anil Vaghasiya
23-Jul-15 6:58am
View
Ok I'll give Code in the Solution just Check it.
Anil Vaghasiya
23-Jul-15 3:28am
View
Hello Meenakshi,
If you doing code for web application yes its working in windows application also.
Hey, You need to generate Report for Both Windows Application as well as Web Application???
Just Refer Below link it might be helpful.
http://www.codeproject.com/Answers/1011454/how-to-diplay-data-into-CrystalReportViewer#answer1
Anil Vaghasiya
23-Jul-15 0:43am
View
Hello,
You may mark answer as solution & make +5 vote.
This will be appreciated..
Thank You,
--AV
Anil Vaghasiya
22-Jul-15 6:33am
View
Okay Thank You..!! :)
Anil Vaghasiya
22-Jul-15 6:30am
View
Pleasure,
You may mark answer as solution & make +5 vote.
This will be appreciated..
Thank You,
--AV
Anil Vaghasiya
22-Jul-15 5:57am
View
Okay Now Please add the crystalreportviewers13 Folder, Just Copy From this "C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13" and Paste it on Your Project and add the Below Link in Your head section.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="crystalreportviewers13/js/crviewer/crv.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" BestFitPage="False" HasCrystalLogo="False" Width="100%" /> </div>
</form>
</body>
</html>
Anil Vaghasiya
22-Jul-15 5:31am
View
Hello,
Okay then what's the actual Problem??
Anil Vaghasiya
22-Jul-15 2:53am
View
Hello,
Ya Its True if You use Both Query then Use NextResult() to Overcome Otherwise to Use Dataset.
--AV
Anil Vaghasiya
22-Jul-15 1:41am
View
Hello,
In Your Code You didn't set the Datasource to ReportDocument It is Necessary to assign datasource to ReportDocument so Please assign Datasource which is returns the data.
e.g.
ReportDocument rd = new AllEmployeeReport(); //RPT File Name
rd.SetDataSource(dt);
In my Example I have set datasource "dt". dt is Datatable Now What do You want to Display Data that returns.
After that Assign this rd to Report Source.
Please refer Above Example It Works Definitely.
--AV
Anil Vaghasiya
22-Jul-15 1:06am
View
Hello,
Which Visual studio Framework you have used??
Anil Vaghasiya
21-Jul-15 9:42am
View
Hello,
Can You Display Your Code???
Anil Vaghasiya
21-Jul-15 9:34am
View
Hello,
No need to Connect (OLEDB(ADO)) for add DataSet e.g EmployeeReport.xsd.
Firstofall Right Click on Project and Click on Add New Item after that Choose Data From left side vertical tab and In that select Dataset.
After Selecting Dataset open Toolbox and add the Datatable.
After adding Datatable Just add the Column on rightClick that columnname must be same as Database Column.
And In given Example I Used SQLConnection in asiEmployeeDAL Class and called necessary Methods for retriving Employee Data.
List<asiemployeedal> lstEmployee = asiEmployeeDAL.SelectAllEmployee()
Anil Vaghasiya
21-Jul-15 5:23am
View
Hello Tiểu Tử Vdanh,
Is It Work if Yes then Please +5 votes Otherwise check the Edited Solution.. :)
Anil Vaghasiya
21-Jul-15 4:45am
View
Pleasure....
It works, I've tried..!! :)
Anil Vaghasiya
21-Jul-15 4:37am
View
Hello,
Please refer the below Example...
do this code at server side...!!
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("rpQuestion1");
dt.Columns.Add("rpQuestion2");
DataRow dr;
dr = dt.NewRow();
dr["rpQuestion1"] = "test1";
dr["rpQuestion2"] = "test2";
dt.Rows.Add(dr);
rpQuestion.DataSource = dt;
rpQuestion.DataBind();
}
}
protected void save_Click(object sender, EventArgs e)
{
string rdValues = "";
for (int i = 0; i < this.rpQuestion.Items.Count; i++)
{
RadioButtonList rpList = (RadioButtonList)this.rpQuestion.Items[i].FindControl("rpList");
//this always returns 0
string value = rpList.SelectedValue;
RadioButtonValue.Text += value;
}
}
do this at client Side..!!
<asp:Repeater runat="server" ID="rpQuestion">
<itemtemplate>
<li id="1" class="items">
<span class="question"><%#Eval("rpQuestion1") %> </br><%#Eval("rpQuestion2") %></span>
<div class="btn-group">
<asp:RadioButtonList ID="rpList" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="rpList_SelectedIndexChanged">
<asp:ListItem Value="True" Text="1">True
<asp:ListItem Value="False" Text="2"> False
</div>
</li>
<asp:Label ID="RadioButtonValue" runat="server">
<asp:Button ID="save" runat="server" Text="save" OnClick="save_Click" />
Anil Vaghasiya
21-Jul-15 2:49am
View
Hello,
can you display your Server side code???
Anil Vaghasiya
20-Jul-15 5:02am
View
ok now it's work correctly If Yes then closed the Question. Thank You
Anil Vaghasiya
20-Jul-15 2:04am
View
Hello,
Can you show your code??
--AV
Anil Vaghasiya
20-Jul-15 1:07am
View
//Just take it my example and do it
//add in Head Section
<script src="crystalreportviewers13/js/crviewer/crv.js"></script>
//add in Body
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="SAPcrystalReport" runat="server" AutoDataBind="true" BestFitPage="False" HasGotoPageButton="True" HasRefreshButton="True" HasToggleGroupTreeButton="true"
HasCrystalLogo="False" ToolPanelView="None" Width="100%" ReuseParameterValuesOnRefresh="True" />
</div>
</form>
//at server side code
private void Page_Init(object sender, EventArgs e)
{
ReportDocument rd;
EmployeeReport ds = new EmployeeReport(); //EmployeeReport is Dataset name
DataTable dt = ds.Tables["empTable"];
DataRow row;
List<asiemployeedal> lstEmployee = asiEmployeeDAL.SelectAllEmployee();
foreach (var objlst in lstEmployee.Take(1000))
{
row = dt.NewRow();
row["empID"] = objlst.empID.ToString();
row["empName"] = objlst.empName;
row["address"] = objlst.address;
row["city"] = objlst.city;
row["contactNo"] = objlst.contactNo.ToString();
dt.Rows.Add(row);
}
rd = new AllEmployeeReport(); // AllEmployeeReport is RPT File
rd.SetDataSource(dt);
SAPcrystalReport.ReportSource = rd;
SAPcrystalReport.DataBind();
}
Anil Vaghasiya
20-Jul-15 0:59am
View
Okay then do it
//Just Use this Method
function ff_bind(drop_compny, drop_survey) {
$http.post("http://localhost:16208/api/ManageEmployeNumber/ff_bind_dept", { headers: { 'data': '{ comp_id: '" + drop_compny + "',surv_id:'" + drop_survey + "' }','Content-Type': 'application/JSON', 'data-Type': 'JSON' } })
.success(function (response) {
alert(response);
});
}
//In WebAPI add Headers
[System.Web.Http.AcceptVerbs("GET", "POST")]
[System.Web.Http.HttpGet]
public tblDepartment[] ff_bind_dept(int comp_id, int surv_id)
{
List<tblDepartment> lis_dept = new List<tblDepartment>();
lis_dept = db.tblDepartments.Where(s => s.CompID == comp_id).ToList();
return lis_dept.ToArray();
}
After that Please Debug it and check the methods whether it Successfully called or not :)
Anil Vaghasiya
17-Jul-15 8:45am
View
Hello,
If this solution is useful or helped to you then Please mark answer as Solution.
Thank You.. :)!!
Anil Vaghasiya
17-Jul-15 8:06am
View
Hello,
have you added angular.min.js in your head section if not then put the angular.min.js in your head section.
<script src="JS/angular.min.js"></script>
Anil Vaghasiya
17-Jul-15 7:46am
View
Yes I Used Angular JS and which You are Using and which you want??
Anil Vaghasiya
17-Jul-15 7:39am
View
Which Path have you use Physical Path or Virtual Path???
Anil Vaghasiya
17-Jul-15 7:30am
View
Have You Tried to test the method by using debug point to check whether the method is called or not ??
Anil Vaghasiya
17-Jul-15 7:24am
View
//Just Use this Method
function ff_bind(drop_compny, drop_survey) {
$http.post("http://localhost:16208/api/ManageEmployeNumber/ff_bind_dept", { headers: { 'data': '{ comp_id: '" + drop_compny + "',surv_id:'" + drop_survey + "' }','Content-Type': 'application/JSON', 'data-Type': 'JSON' } })
.success(function (response) {
alert(response);
});
}
//In WebAPI add Headers
[System.Web.Http.AcceptVerbs("GET", "POST")]
[System.Web.Http.HttpGet]
public tblDepartment[] ff_bind_dept(int comp_id, int surv_id)
{
List<tblDepartment> lis_dept = new List<tblDepartment>();
lis_dept = db.tblDepartments.Where(s => s.CompID == comp_id).ToList();
return lis_dept.ToArray();
}
Anil Vaghasiya
17-Jul-15 7:04am
View
Hello,
have you use webapi for ff_bind_dept Methods??
Anil Vaghasiya
17-Jul-15 5:08am
View
you are most welcome please mark answer as solution..!
:)
Anil Vaghasiya
17-Jul-15 5:07am
View
you are most welcome please mark answer as solution..!
:)
Anil Vaghasiya
15-Jul-15 5:16am
View
Hello,
Label sd = new Label();
sd.ForeColor = System.Drawing.Color.Bisque;
sd.Text = "Hello";
Its Working not given any error Please Check Code this is not problem with Changing Label Color Dynamically Using C#.
Anil Vaghasiya
14-Jul-15 5:18am
View
Ya, Install the Compiler tools such as "Koala" that is converted .less to css file.
If you want to convert .less to css without 3rd party tools Just You have to Install "WebToolsExtensionsVS.msi" it will converted .less to css after that add the css link in head section.
Thank You.
Anil Vaghasiya
14-Jul-15 2:25am
View
Hello,
If you use MVC then You have to add script and CSS in BundleConfig.cs e.g
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Content/js/jquery*",
"~/Content/js/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/js").Include(
"~/Content/js/animatescroll.js",
"~/Content/js/bootstrap.js",
"~/Content/js/html5shiv.js",
"~/Content/js/parallax-scrolling.js",
"~/Content/js/respond.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Content/js/modernizr-*")); //Use for Support HTML5 and CSS3
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Content/js/jquery.validate*"));
bundles.Add(new StyleBundle("~/Content/css/css").Include(
"~/Content/css/animation.css",
"~/Content/css/bootstrap.css",
"~/Content/css/bootstrap-theme.min.css",
"~/Content/css/flexslider.css",
"~/Content/font-awesome-4.2.0/css/font-awesome*",
"~/Content/css/style.css"
));
}
}
And add link in _Layout.cshtml Page.
in Head Section
<head>
@Styles.Render("~/Content/css/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/js")
</head>
Anil Vaghasiya
14-Jul-15 2:21am
View
Hello,
Which technology you have used MVC???
Anil Vaghasiya
13-Jul-15 3:09am
View
Yes It is Possible Using URL Rewritting
Anil Vaghasiya
11-Jul-15 1:40am
View
Please show your sample code.
Anil Vaghasiya
10-Jul-15 5:17am
View
Hello,
have you added All References & necessary DLL releted to crystal Report such as CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.ReportSource.dll, CrystalDecisions.Shared.dll, CrystalDecisions.Web.dll
--AV
Anil Vaghasiya
8-Jul-15 2:45am
View
Hello,
Can You give brief description with sample code for getting more details and which kind of issue is occur in your case.
--AV
Anil Vaghasiya
7-Jul-15 7:57am
View
Deleted
Hello,
This is not solution please read the question carefully his want to manage try catch block globally not in global.aspx page or not Handle Application-Level Errors.
Anil Vaghasiya
6-Jul-15 6:10am
View
--->Replace the LoadSupplier() Methods and Use it
function LoadSupplier() {
var ddlSupperlier = document.getElementById('<%= ddlSupplier.ClientID %>');
var Options = document.createElement("option");
ddlSupperlier.length = 0;
Options.text = "- SELECT Supplier -";
Options.value = "-1";
ddlSupperlier.options.add(Options);
for (int i = 0; i < SupplierDetails.length; i++) {
var Option = document.createElement("option");
Option.text = SupplierDetails[i].PartyName;
Option.value = SupplierDetails[i].PartyId;
ddlSupperlier.options.add(Option);
}
}
Anil Vaghasiya
25-Jun-15 2:02am
View
Hello,
You have to Create StoredProcedure and Pass the Date which is selected by user at Page Site
CREATE PROCEDURE [dbo].[GetDayOfWeek]
(
@Dt Datetime
)
AS
BEGIN
SELECT DATENAME(dw,@dt)
END
At Page Site You have to Create Function and Pass the Parameter
sqlCom = awrDataObjectFactory.CreateStoredProcedureCommand("GetDayOfWeek", sqlCon);
sqlCom.Parameters.Add(awrDataObjectFactory.CreateInputCommandParameter("@dt", txtdate.Text));
sqlRed = sqlCom.ExecuteReader();
For Example :- Execute this Query in Your SQL Server
DECLARE @dt Datetime ='06/25/2015'
BEGIN
SELECT DATENAME(dw,@dt)
END
Show More