cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Selection Formula Problem (dynamic table name)

Former Member
0 Kudos

Hi, I'm having a problem with these codes in my project.

When I use a static sql name my codes working. Codes:

selectFormula = "{CARIHAREKET.CARIKOD} = '" + textBox1.Text + "'";

but when I want to use a dynamic Sql table name it gives error. Codes:

selectFormula = "{TC_" + acilisForm.Donemkodu.DONEMKODU + "_CARIHAREKET.CARIKOD} = '" + textBox1.Text + "'";

Error is :

"Record_Selection:

'{TC_7_CARIHAREKET.CARIKOD} = '120.001'"

Field name is not known."

Could you help me please?

EDIT: edit: I think problem because of editing .rpt file. Because, when I open it, it still shows undynamic former table name. How can I make this table name dynamic?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Re-tagged to CR for VS.

What SDK are you using?

See KBA 2163438 for example on getting setting the selection formula.

Also, you cannot simply add a table using the selection formula, requires using the RAS engine to .add() tables.

See this WIKI for more info and examples:

https://wiki.scn.sap.com/wiki/display/BOBJ

Look for CR for VS link and RAS samples:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+Visusl+Studio+.NET+SDK

Don

Answers (0)