This is a migrated thread and some comments may be shown as answers.

How to get datafield value in textbox

3 Answers 1362 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Hardik
Top achievements
Rank 1
Hardik asked on 14 Jan 2015, 07:59 AM
Hi,

I have a tabular report. I have two tables inside the report. one displays summary and another displays details. Both tables are poiting to different datasources.

Now I want to display one db field value from one of the dataset into header part. I have added new textbox but I am not able to see any fields to be added into textbox in the expression window.

I have identified that when we set report datasource property, we can see the datasource fields in the textbox expression but if I add that it messes up my report as I have two tables and both have different datasets.

Please advise how to get db field value in textbox without setting datasource property of the report. I have two datasets added to the report and both are set to different table.

Thanks,
Hardik

3 Answers, 1 is accepted

Sort by
1
Accepted
Candice
Top achievements
Rank 1
answered on 14 Jan 2015, 08:50 AM
Hi,Hardik,

I have met this problem before,which is really annoying.Here I'd like to share my  final solution with you before the telerik support team answer you.But my solution is a bit silly I suppose.

 you can add a parameter(string type),the datasource of the parameter is a table including the field you want.

then you can get the field from the expression window through Report Parameter.
Hope it's helpful for you.


Abd Arfe Amade
Top achievements
Rank 1
commented on 27 Jun 2023, 11:58 AM

Thanks a lot @Candice your old solution just made my day. Kudos. 
0
Hardik
Top achievements
Rank 1
answered on 14 Jan 2015, 09:18 AM
Thanks Candice,

Your solution worked out for me. I would like to know the difference between table datasource and report datasource. if you can share.

I have noticed that when we are creating report using table wizard, it is always assigning table datasource. And if we define report datasource, it messes up the report. But report datasource values are available in all sections of the report except table.

Its confusing for me. I did not find any solution on the google. I appreciate your help.

Thanks.
0
Candice
Top achievements
Rank 1
answered on 15 Jan 2015, 01:21 AM
Frankly speaking,I used to be confused about that point you said.Telerik is only allowed to have one report datasource,if you have used Crystalreports and FastReports,in contrast,you will find this is definitely a big weakness of Telerik Report.In other report tools,we are able to add unlimited report datasource,which is very convenient for us report designer. I also experinced what you said,when I have a table(it alreday has a datasource),then if i add a report datasource ,the report will be messy.

for this problem,I usually use two ways.
1.use parameter,just as I told you before.
2.in other section,i also use a table,then i can add table datasource.

But these two ways are not very good,in some cases,they are inapplicable.(hope the support team could give us some good advice.)

You are luckier than me.In China,we can't find much reference of Telerik except on the offical site.very few people use it here.But our headquater (in Germany) prefer to Telerik.And we can't use google,it exited from chinese market last year.

So every time I meet a problem i have to try to figure out by myself or ask the support team for help.

Actually,I am also a rookie ,I'm still evaluating Telerik,I have just used it for about one month and a half.


Tags
Report Designer (standalone)
Asked by
Hardik
Top achievements
Rank 1
Answers by
Candice
Top achievements
Rank 1
Hardik
Top achievements
Rank 1
Share this question
or