StoreData

edited 10:21PM in FastReport .NET
Hi all,

I have a questions about StoreData functionality.

When I set it to TRUE, data will be stored with my report - in DB for example,but together in report file.
After loading the report from DB I get the data stored in this report file. It is ok,but what if I want to reload/update them? Is there any way do it programatically?

What dependencies are there on the tables having StoreData set? I mean I have some sqlCommand specified and sometimes it throws error. Does it mean all tables I have in this sqlCommand on selected table must also have StoreData set to True?


My goal is to Create report first and programatically setup sqlCommand for tableA/select blabla from tableA,tableB.../ and store the data with report - reason is it takes 5 seconds to load the data each time and storing data with report would mean 1s i think :-)
But in this phase I have data stored with report in DB,but it contains each time same data. It is ok for some time,but sometimes I want to update this data and use new one for time and so on...


Thnx


Comments

  • StarkStark Syria
    edited 10:21PM
    Hi , have a good day ,

    I think this will help :

    Try to recall the , Report.RegisterData( DataTable , "YourTableName"); // it will not create another data if "YourTableName" was the same !




  • edited 10:21PM
    Stark wrote: »
    Hi , have a good day ,

    I think this will help :

    Try to recall the , Report.RegisterData( DataTable , "YourTableName"); // it will not create another data if "YourTableName" was the same !

    Hi,

    I have done it this way:
    report.RegisterData(createTestTable(1),"MOJA");
                report.GetDataSource("MOJA").Enabled = true;
                TableDataSource tds = report.GetDataSource("MOJA") as TableDataSource;
                tds.SelectCommand = "Select * from MOJA where Drug=Enebrel";
    

    But it does not apply my SelectCommand. Table "MOJA" is raw table with data, with no connection.

    Problem is:
    I have 2 tables - Master/Detail under Connection/DataSet with SelectCommnad set. - works OK
    Than I want to add raw DataTable "MOJA" to my report, also with SelectCommand set - NOT OK

    Is it possible to have Select COmmand on raw type DataTable? I can see it,but it do not works.
    In SelectCommnad property I want to refer to parameter from another table ...
  • StarkStark Syria
    edited 10:21PM
    Hi ,

    as far as I know , you can't apply select command at Raw DataTable ,

    My be you should try with Row Filter , Table Filter or something , you can find more info about it
    at online help manual



    Help



    Search for "Filter"


    Hope this help

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.