Iterate over table with select-statement - using parameters

edited July 2017 in FastReport .NET
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:
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

  • edited 12:00PM
    Hey hey! I solved my problem. I forgot that I set some highlighting conditions and did not adjust them! so they have been connected to the old origin table that I deleted ;-)

    best regards!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.