Click here to Skip to main content
15,301,414 members

Comments by Bhushan Mehetre (Top 15 by date)

Bhushan Mehetre 17-May-19 5:36am View
Debugger is getting stopped it comes to line of code where assigning dt(Datatset) to crystal report object.
Bhushan Mehetre 17-May-19 2:14am View
Thanks for the reply.

I am developing this windows application using c#.
I tried to debuge the code to find the error but have no luck because application is crashing without exception on the line below.


I have a form with report viewer to which I am assigning the crystal report object.

The sequence is some what like I am choosing the invoice no and click on view button. Then rystal report open fine. but when I try to view invoice for another invoice
released application .exe/debugger(I tried both) get crashed without any error. To find the crash reason I check the windows log event and I have 2 entries there for the same crash.
Both are mentioned on my first comment.
Below is the code where my application is crashing.

private void ViewInvoice0(Int32 invoiceId, Int32 v1, int ReportNo, String startYear, String endYear)
if (ReportNo == 0)
GSTSnehdeep.Invoice.NewInvoice NewINv = new GSTSnehdeep.Invoice.NewInvoice();//Crystal report file object
DataSet dt = DAL.GenerateInvoiceDAL.getNewSalesInvoiceDetail(invoiceId, v1, startYear, endYear);

NewINv.SetDataSource(dt);//Assigning the datasource to crystal report object //application crashing here 2nd time

crv_salesInvoice.ReportSource = NewINv;//Assigning crystal report to viewer
crv_salesInvoice.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
NewINv.SetParameterValue("ReportNumber", "1");

catch (Exception ee)
MessageBox.Show(ee.ToString(), DAL.GSTSNDPConstant.CompanyName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);

Please let me know if you need anything extra.
Bhushan Mehetre 9-Dec-15 1:56am View
Can you refine your question. like with the help of situation/condition
Bhushan Mehetre 14-Aug-14 2:53am View
Is there any relation on this two drop down list... ??
Bhushan Mehetre 7-Aug-14 2:20am View
Is your text box in table ?
If it is then, you should check that u have not applied align center.
Bhushan Mehetre 29-Jul-14 9:48am View
No this is not the case...
Actual working of the report is like, On main report in table I will get one table that is contains columns "Owner Name", "Address", "Contact", "Email", "Active".
Down to this table there is a sub report which contains the columns like "Car No", "Rent Agreement Id", "Engine No", "Car Condition", "Car Make".

At the time of load only main report is loaded. subreport is empty thats why it is subpressed. On click of column "Owner Name" from the main report. It get the id of owner and pass it to the subreport and subreport dataset is filled on the basis of owner id. After successfull fill it shows the subreport with data.
Bhushan Mehetre 29-Jul-14 9:32am View
Thanks for your reply...
But for details question please read this question...
Bhushan Mehetre 29-Jul-14 9:30am View
Thanks for your reply but
Please see this
Bhushan Mehetre 29-Jul-14 9:23am View
Here is the code of loading report

rptv.ProcessingMode = ProcessingMode.Local;
rptv.LocalReport.ReportPath = Server.MapPath("~/SSRS Reports/SRE Main.rdlc");
DataSet ds = fillCarOwnersDetals("SubReport");
ReportDataSource rds = new ReportDataSource("CarOwnerList", ds.Tables[0]);
catch (Exception ee)
lblStatus.Text = ee.Message.ToString();

fillCarOwnersDetals() is the function which fills the data into the dataset.

SubreportProcessing handler code
e.DataSources.Add(new ReportDataSource("OwnersCar", fillsubReportDataset(Convert.ToInt16(e.Parameters[0].Values[0].ToString())).Tables[0]));
Bhushan Mehetre 10-Jul-14 1:32am View
then use case and add one more parameter to the method to identify functionality....
Bhushan Mehetre 7-Jul-14 2:09am View
Yes you have to, in case the server is located on different location.
Sorry For the Late Reply.
The main part in connection string are server location and database name.
server name is like "\SQLExpress" for the live and for local you will have ".\SQLExpress" or anything else. So as per your desire database destination you have to change web config.
It will same apply for the database name. It is best practice to keep the both name same.
Bhushan Mehetre 4-Jul-14 2:42am View
Could you explain the situation ...
Bhushan Mehetre 3-Jul-14 5:33am View
As your questions say's you are doing commercial website. So you have to put your database on live server.
When we purchase hosting for site normally they provide access to create 1 or 2 database server or they have plan for database. so you will choose Microsoft sql server databse hosting for database.
When you get access you have to just replicate the local database to the server.
and change the connection string in web config.
Bhushan Mehetre 3-Jul-14 2:58am View
Can u elaborate the situation...
Bhushan Mehetre 3-Jul-14 2:19am View
protected void Button1_Click1(object sender, EventArgs e)
string Asset_Type = "";
for (int i = 0; i < GridView1.Rows.Count; i++)
CheckBox chkUpdate = (CheckBox)GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
if (chkUpdate != null)
if (chkUpdate.Checked)
///find the asset type id and append it to the string
///Asset_Type+= <asset_type id="">+",";
char chkcoma=Asset_Type[Asset_Type.Length-1];
if (chkcoma==',')
Asset_Type = Asset_Type.Remove(Asset_Type.Length - 1, 1);
///Now pass Asset_Typeto procedure and get vendor name