update a datasource in runtime

Stimulsoft Ultimate discussion
Post Reply
ramankh
Posts: 3
Joined: Mon Mar 25, 2013 11:54 am

update a datasource in runtime

Post by ramankh »

Hi
I want to change my datatable defined in Dictionary for example now it has 2 column Id and Name. But in run time based on users selection i have to change the columns for example to Id, Address. How can I change the data source runtime.
Any help is appreciated
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: update a datasource in runtime

Post by Alex K. »

Hello,

You can use the Clear() and RegData() methods with the same name. But, most probably, you get the errors if the "Name" column uses in your report.

Thank you.
ramankh
Posts: 3
Joined: Mon Mar 25, 2013 11:54 am

Re: update a datasource in runtime

Post by ramankh »

Aleksey wrote:Hello,

You can use the Clear() and RegData() methods with the same name. But, most probably, you get the errors if the "Name" column uses in your report.

Thank you.
Thank you. But i found out that i should make my report in run time (do not define dataset in stimul designer manualy). But I can not set a Dataset to my report by code. the result is empty. can you please help me?
Im working in wpf.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: update a datasource in runtime

Post by Alex K. »

Hello,

Please check the sample project in attachment.

Thank you.
Attachments
DynamicCreateReport.zip
(15.46 KiB) Downloaded 622 times
ramankh
Posts: 3
Joined: Mon Mar 25, 2013 11:54 am

Re: update a datasource in runtime

Post by ramankh »

Aleksey wrote:Hello,

Please check the sample project in attachment.

Thank you.

Thank you. My pleasure to meet you here. ;)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: update a datasource in runtime

Post by Alex K. »

Hello,

Always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply