16,011,804 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 Azzam Alrandi (Top 4 by date)
Azzam Alrandi
30-Sep-14 2:24am
View
Yes , When i show in the content of the dtt table it appears wit the updated columns
they told me that i can't change the structure of the database at the runtime is this true ?
this is what i have tried lately
SqlCommandBuilder cmnd;
private void button1_Click_1(object sender, EventArgs e)
{
ReportViewer AA = new ReportViewer { Dock = DockStyle.Fill };
this.Controls.Add(AA);
BindingSource source = new BindingSource();
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlDataAdapter zz = new SqlDataAdapter(@"SELECT * FROM tbl_Bank", con);
DataSet Da = new DataSet();
zz.Fill(Da);
dsc = new SqlCommandBuilder(zz);
ReportDataSource reportDataSource = new ReportDataSource();
// Must match the DataSource in the RDLC
reportDataSource.Name = "Report";
reportDataSource.Value = Da.Tables[0];
zz.Update(Da);
Adapter.Update(Da);
AA.Reset();
AA.ProcessingMode = ProcessingMode.Local;
AA.LocalReport.ReportPath = AppDomain.CurrentDomain.BaseDirectory + "Report1.rdlc";
AA.LocalReport.DataSources.Add(reportDataSource) ;
AA.LocalReport.DataSources.Add(reportDataSource);
AA.RefreshReport();
}
If I could Send you the whole project at your email that would be perfect , Do you mind ?
Azzam Alrandi
29-Sep-14 7:14am
View
Hello Leena Thank you again for your time
I understand the problem , but still dont know how to start solving it
here is the code
{this.tbl_bankTableAdapter.Fill(this.dataSet1.tbl_bank);
this.reportViewer1.RefreshReport();}
This code is generated automatically by the program itself
i tried
{
//(be advised that "ya" is the name if instant class for form1 which contains the modifying process )
conString = Properties.Settings.Default.BankConnectionString;
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlDataAdapter Adapter = new SqlDataAdapter(@"SELECT * FROM tbl_Bank", con);
System.Data. DataTable dtt = new System.Data.DataTable();
Adapter.Fill(dtt);
Adapter.Fill(ya.bankDataSet);
ya.tblbankBindingSource.DataSource = dtt;
con.Close();
this.reportViewer1.RefreshReport();
}
Azzam Alrandi
29-Sep-14 4:52am
View
I have tried manythings
some of the post here and on another sites, one of them was converting the report to xml file to modify it and bind it with the data source , this is does not work with me due to lack of the information about doing this , another post was a whole project that does this but could not understand how to connect or to modify it or at least understand the concept since i am not professional developer
here is the link for the project it's on this great site
http://www.codeproject.com/Articles/705248/Generating-RDLC-Dynamically-for-the-Report-Viewer
Azzam Alrandi
29-Sep-14 4:47am
View
First Of All Thank you for replying,
secondly have you tried this ?
I am sure that i am updating the data, ( not sure if it's the same database, or i am updating the dataset ), However when i reopen the application , the modified data appear which means that the data is updated , well if you have tried this would you illustrate more
Best Wishes