Reports

Posted by Akki_shah under C# on 10/23/2009 | Views : 1265 | Status : [Member] | Replies : 6
Hi

I am developing a windows application and want to generate an invoice based on customer selected.
Wanted to pass the parameter to report at run time. I have one dropdown in which I list all the customers, when user select the customer invoice for that customer should get generated.

For generating invoice report. I am using report viewer control and a .rdlc file.
I have bind a database view with the report viewer as a datasource.

Report is getting generated but for the first customer only. Want to pass the customer id to report and invoice should generate for passed customer id.

Thank in advance.




Responses

Posted by: Vuyiswamb on: 10/23/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
can we see the code where you pass the Parameter

Thank you for posting at Dotnetfunda
[Administrator]

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akki_shah on: 10/23/2009 [Member] Starter

Up
0
Down
i have not passed any parameter, wanted to know how we can pass the parameter to a report.
when i have placed Report viewer control on my Windows Form it had asked me to link a report with it and choose a data source.

i have linked a report and one database view i have added as a datasource at design time only.

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 10/23/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Look at this

http://odetocode.com/articles/156.aspx


http://www.csharpcourses.com/2008/06/how-to-pass-parameters-to-reporting.html


Thank you for posting at Dotnetfunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akki_shah on: 10/23/2009 [Member] Starter

Up
0
Down
thanks for the reply, but i am binding local report to report viewer. and as i mentioned i have windows application.

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 10/23/2009 [Member] Bronze

Up
0
Down
Hello,

Can you post your code so that we can help you out better.

++
Thanks & Regards,
Deepika

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Danishgr8 on: 12/22/2009 [Member] Starter

Up
0
Down
Yes i understand your problem, make a separate class of customer and make its properites like CustomerName,Phone Etc.,
Now drag a binding source control into a form and create an instance of Customer Class and set its properties, like
Customer customer=new Customer();
customer.CustomerName="xyz";

and set the binding source datasource property with customer object.
like, bindingsource1.datasource=customer;

and finally add this bindingsource to crystal report viewer, i will send u sample code if u want.


Thankyou,
Danish Jaffery,
Software Developer.
danish85_dj@hotmail.com

Akki_shah, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response