Click here to Skip to main content
15,908,264 members

Comments by lucasgrohl (Top 25 by date)

lucasgrohl 22-Nov-10 4:25am View    
My databatle is being filled through code:

MySqlCommand mscGeneralInvoiceData = new MySqlCommand("SELECT tb_c.company_name, tb_c.corporate_name, tb_c.company_registration, tb_c.address, tb_dt.doc_type_cd, tb_pt.payment_type_name, tb_pt.payment_type_description, tb_i.invoice_code, tb_i.dt_invoice, tb_i.total_value, tb_i.observation, tb_i.tax_percent, tb_cd.company_name, tb_cd.company_address FROM tb_client AS tb_c INNER JOIN tb_invoices AS tb_i ON tb_c.id = tb_i.tb_client_id INNER JOIN tb_doc_type AS tb_dt ON id_doc_type = tb_i.tb_doc_type_id_doc_type INNER JOIN tb_payment_type AS tb_pt ON tb_pt.id = tb_i.tb_payment_type_id INNER JOIN tb_company_detail AS tb_cd ON tb_i.tb_company_detail_id = tb_cd.id WHERE invoice_code = \'" + _invoiceNumber + "\';", bdConn);

MySqlDataAdapter mscDAdtGeneralInvoiceData = new MySqlDataAdapter(mscGeneralInvoiceData);
mscDAdtGeneralInvoiceData.Fill(dtGeneralInvoiceData);

reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2_DataTable1", dtGeneralInvoiceData));

When I debug I see that all the fields are filled. But some of them doesn't appear on the report. Although all the other are ok.
lucasgrohl 21-Nov-10 10:12am View    
Strogg, what I did was to use cstr() in each field. Now everything is working. I have no idea of why it wasn't but now it is ok.

Finally, I finished my application! =) Tomorrow will be the presentation day.

Because of you I have finished it in time!

Thanks a lot man! =)
lucasgrohl 19-Nov-10 16:06pm View    
Well, I used a new DataSet and as I it's with the right case, otherwise I think the DataTasble that is being used as a DataSource wouldn't even be populated. It has to be in the same report because this report needs to encompass 2 DataTables (each one in different DataSets).

And in this case I can't even send you the project for you to see because you wouldn't have the data base... =/

Are there any way to debug in run time what is being passed to the form and loaded in it? I mean, check all the steps and verify in run time what is in each field?

Thanks!
lucasgrohl 18-Nov-10 8:54am View    
I am sorry mate, just one simple question... I must be doing something wrong...
I created another table with all the other fields I need and added them to some text boxes in my Rdlc. Some of them appear correctly, but some doesn't appear.
Also, one of the text boxes is receiving 3 of the fields... 2 appear ok, but the last one doesn't appear.

They are like this in one textbox:

="TO: " + First(Fields!corporate_name.Value, "DataSet1_DataTable2")
+ First(Fields!company_registration.Value, "DataSet1_DataTable2")
+ First(Fields!company_address.Value, "DataSet1_DataTable2")

The company address doesn't appear.

Do you have any idea about what can be going wrong?

I am sorry! =/
lucasgrohl 18-Nov-10 7:16am View    
Man, thanks a LOT!!! Now it works!!! It is alive!!! =D
What I did was to update the databinds on the Report Viewer control and it worked perfectly!
Now is just do it for the rest of the stuff and my system will be complete!

Again, thanks a lot for your time and patience to help me!