Iterate over table with select-statement - using parameters
Hello!
I am using the FastReport.Net Designer and connected to my database. There I chose the necessary tables and started to design my report. Till now - no problem!
But if I would like to bind a data table via a select statement (later for using parameters) I get in trouble with iterating over this table. I have to choose a new table name (mytableX) and I just tried the simplest way: "select * from myorigintable". I adjusted my testfield to "[mytableX.mycolumnY]" and redefined the Data Source in the DataBand-options (context menu --> Edit...) to my new table "mytableX". And now it's not possible to get a preview.
I checked all spellings and found no typing mistakes. That seems to be alright. I had a look at the imported data of mytableX in the Data Explorer on the right site via "context menu --> View Data...". The content is available.
But I still get this errors:
Does anyone have an idea what the problem is or how I can solve my problem? I would like to get selected tables, the where clause should be dependent to a parameter that I woul like to send from my application side with "myreport.SetParameterValue("param1", "loremipsum")".
Thank you very much!
I am using the FastReport.Net Designer and connected to my database. There I chose the necessary tables and started to design my report. Till now - no problem!
But if I would like to bind a data table via a select statement (later for using parameters) I get in trouble with iterating over this table. I have to choose a new table name (mytableX) and I just tried the simplest way: "select * from myorigintable". I adjusted my testfield to "[mytableX.mycolumnY]" and redefined the Data Source in the DataBand-options (context menu --> Edit...) to my new table "mytableX". And now it's not possible to get a preview.
I checked all spellings and found no typing mistakes. That seems to be alright. I had a look at the imported data of mytableX in the Data Explorer on the right site via "context menu --> View Data...". The content is available.
But I still get this errors:
Cell37: Error CS1525: Invalid expression '['
Cell37: Error CS1002:; expected
Cell37: Error CS1002:; expected
Cell37: Error CS1525: Invalid expression ']'
Cell37: Error CS1525: Invalid expression '['
Cell37: Error CS1002:; expected
Cell37: Error CS1002:; expected
Cell37: Error CS1525: Invalid expression ']'
Does anyone have an idea what the problem is or how I can solve my problem? I would like to get selected tables, the where clause should be dependent to a parameter that I woul like to send from my application side with "myreport.SetParameterValue("param1", "loremipsum")".
Thank you very much!
Comments
best regards!