RegisterData and DataBand::DataSource

Hi!

Well my initial plan of connecting to MySQL database with your new connector (thanks again!) failed because I have way too much tables generated in the application. Well here is an example of the current situation and the current problem I am trying to resolve:

I created a report that will be used for printing some race results (lets say STNumber, Name and Time).
All the data is stored in a table (lets call it TResults).
So I create some headers on the page (in the Page Header section) and some data textfields in the Data section. The text in these fields is

[TResults.STNumber], [TResults.Name], [TResults.Time].

In realtime I register a table from my application (Report->RegisterData(DataSet->Table["TResults"], "TResults")). This is working without any errors.

Now about the problem:
there is only one entry listed on the report. I am suspecting that this is because there is no DataSource set in the report's DataBand. I cannot set it to something nonexistant in the editor (as I said before - there is no table(DataSource) present when I'm designing the report in the designer).

So, how can I set the DataBand::DataSource in realtime from the application (I suppose this will make the report iterate trough all the results in the dataset).

Or is there something else wrong?

Regards
Miha

Comments

  • edited 10:23AM
    Found it ... [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> DataBand^ db1 = (DataBand^)report->FindObject("DataBandName"); db1->DataSource = report->GetDataSource("TResults");[/img]

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.