How to get datafield value in textbox

4 posts, 1 answers
  1. Hardik
    Hardik avatar
    10 posts
    Member since:
    Jan 2015

    Posted 14 Jan 2015 Link to this post

    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
  2. Answer
    Candice
    Candice avatar
    7 posts
    Member since:
    Dec 2014

    Posted 14 Jan 2015 Link to this post

    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.


  3. DevCraft banner
  4. Hardik
    Hardik avatar
    10 posts
    Member since:
    Jan 2015

    Posted 14 Jan 2015 in reply to Candice Link to this post

    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.
  5. Candice
    Candice avatar
    7 posts
    Member since:
    Dec 2014

    Posted 14 Jan 2015 Link to this post

    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.


Back to Top