BaBernd
20th October 2015, 19:28
Hello to All,

I've a Problem with printing text fields (for example tcibd001.txta) in SSRS / BIDS.
The value for tcibd001.txta is defined as text field in the table tcibd001 and the value itself is a number. Somehow this number references to a text in the table tttxt002.

In Infor reporting it is very easy, one have only to enter this field tcibd001.txta as Report field. During execution of the Report the result is the corresponding / related text in the Report.

In SSRS / BIDS it's not the same.
When I enter the field as Report field and afterwards execute the Report, then I only get the number itself as result and no text.

Now my question:
how can I get the text for this number out of the table tttxt002. Cause there I've no full Access. Or the text is also not shown in full size. Here (in the data base table) I only see the last line of a Long text with more than one line (row).

Best Regards
Bernd

bhushanchanda
20th October 2015, 21:28
Hi,

As the guide tells -


To use data fields of type Text in a report:
1. Open a report and click the design tab.
2. Right-click anywhere on the design tab, but outside of any control.
3. Select Report Properties....
4. Select the References page.
5. If needed, add a reference to the Infor.ReportingServices.LNDataExtension.dll assembly.
6. In the Report Properties dialog box, select the Code page.
7. Specify this custom code:

Function tt_getText(field as Field) as String
return
Infor.ReportingServices.Utilities.LNUtils.getTextFieldValue(field.Value, _ field("language"), _ field("company"), _ Report.Parameters!ConnectionString.Value)
End Function

Or use Report Configurator to do the above.

8. Click OK to close the Report Properties dialog box.
9. Drag a data field of type Text to the report.
10. Right-click the newly created text field.
11. Select Expression....
12. Enter this expression with the real text field in it, for example:
Code.tt_getText(Fields!your_text_field)
Note: You must pass the field object, not the value property.
13. Click OK to close the Expression dialog box.
14. To show the text field content, save and run the report.

Note - If the LN session report uses the lattr.textexpand option, you cannot use this text expression.Therefore, you must use the Value property of the text field, for example, =Fields!your_text_field.Value

BaBernd
21st October 2015, 09:50
Hi Bhushan,

that's great! It's exactly what I want.
As everytime: very helpful hints :-)

Best Regards
Bernd

JaapJD
21st October 2015, 10:23
I don't understand this:

In Infor reporting it is very easy, one have only to enter this field tcibd001.txta as Report field. During execution of the Report the result is the corresponding / related text in the Report.

Infor Reporting also prints the text number if you just enter the text field as report field. The developer guide for the Infor Reporting Connector says:

tt_getText(ParamDisplayValue('datafile'), [your_query].[your_text_field])

Actually there is no functional difference between Infor Reporting and SSRS/BIDS regarding text fields. Only the syntax of the expression is different.

However, note the note in Bhushan's post. In case of lattr.textexpand (the classic report processor substitutes placeholders in the texts by the actual values), the complete text comes as a string. Then you need to print the value instead of using the tt_getText function.

bhushanchanda
21st October 2015, 11:12
Jaap, I guess by Infor Reporting he meant Baan/Infor Classical Report Designer where you can simply add the text field in the layout with width 80 and it prints the text without any additional coding.

JaapJD
21st October 2015, 11:31
Hi Bhushan, you are probably right. I prefer to speak about LN classic or native reporting for those reports :-).

benito
21st October 2015, 15:50
wow! i was misled too since i have used Infor Reporting and SSRS myself. i'm glad bushan is quick to decipher things :D

bhushanchanda
21st October 2015, 15:58
Haha :D Probably, I am low on SSRS and other External Reporting these days.

shambhavi
17th October 2018, 09:22
Hi,

I tried the same but it showing as error in preview.

Regards,
Shambhavi



Hi,

As the guide tells -


To use data fields of type Text in a report:
1. Open a report and click the design tab.
2. Right-click anywhere on the design tab, but outside of any control.
3. Select Report Properties....
4. Select the References page.
5. If needed, add a reference to the Infor.ReportingServices.LNDataExtension.dll assembly.
6. In the Report Properties dialog box, select the Code page.
7. Specify this custom code:



Or use Report Configurator to do the above.

8. Click OK to close the Report Properties dialog box.
9. Drag a data field of type Text to the report.
10. Right-click the newly created text field.
11. Select Expression....
12. Enter this expression with the real text field in it, for example:
Code.tt_getText(Fields!your_text_field)
Note: You must pass the field object, not the value property.
13. Click OK to close the Expression dialog box.
14. To show the text field content, save and run the report.

Note - If the LN session report uses the lattr.textexpand option, you cannot use this text expression.Therefore, you must use the Value property of the text field, for example, =Fields!your_text_field.Value