locked
crystal report 2008 table RRS feed

  • Question

  • User-1075092149 posted
    i would like to ask about the function in crystal report 2008, can i write script to create a object like table or gridview to store a lot of data which is used for sub-report. everytime i just pass parameter to retrieve related from the table so that i can speed up the execute time. P.S. i don't use any programming like C#, i only use crystal report connect to sql server to generate report.
    Friday, January 6, 2012 1:25 AM

All replies

  • User-37275327 posted

    What you can do is to optimize the script, use sql profiler, execution plan to investigate lazy execution sections. then your report will faster.

    -Chamila

    Friday, January 6, 2012 1:59 AM
  • User-1075092149 posted

    What you can do is to optimize the script, use sql profiler, execution plan to investigate lazy execution sections. then your report will faster.

    -Chamila

     

    i don't understand, would you tell me more . or any reference.

    Friday, January 6, 2012 2:06 AM
  • User-37275327 posted

    As you say, report is directly connected to sql server, then SP execution time is responsible to report loading time. if you optimize the SP execution time, you can considarably enhance the report loading time. You need more Sql server optimization knowledge rather than reporting knowldge.

    Some links below

    http://hungred.com/useful-information/ways-optimize-sql-queries/

    http://www.serverwatch.com/tutorials/article.php/2175621/How-to-Optimize-Queries-Theory-an-Practice.htm

    Thanks

    Friday, January 6, 2012 2:22 AM
  • User-1075092149 posted

    As you say, report is directly connected to sql server, then SP execution time is responsible to report loading time. if you optimize the SP execution time, you can considarably enhance the report loading time. You need more Sql server optimization knowledge rather than reporting knowldge.

    Some links below

    http://hungred.com/useful-information/ways-optimize-sql-queries/

    http://www.serverwatch.com/tutorials/article.php/2175621/How-to-Optimize-Queries-Theory-an-Practice.htm

    Thanks

     

    i don't know if the structure of crystal report is right or wrong.
    as i have a main report , and many sub-report.
    everytime i extract data from main report will have ID, i just used this ID as a parameter, then pass to very sub-report.

    the problem is everytime i need to call stored procedure in each sub-report by passing this ID (parameter)
    i don't know if it will slow down the speed of loading report.

    or any other method can improve the performance like create a table to load all data to that table at the first time?
    or i just use your method to tune the sp in sql server?

    Friday, January 6, 2012 2:49 AM
  • User-1075092149 posted

    i have 1000000 reccords and the execute time is about 1-2 mins
    but why when i generate to all record to txt file, it wait for a long time (more than 5 mins)
    but the records is around 4 set data (from main to sub-report as a set of data)

    Friday, January 6, 2012 3:08 AM
  • User-37275327 posted

    Report might take that much of time due to the scenario. There is limited control over crystal report on this issue. you need to rethink of record fetching of database. hopefully add some indexes to SP or create a Indexed view to call records. Unfortunately there is not straight answer, you would have to do some R&D to bgring the time down.

    -Chamila

    Friday, January 6, 2012 3:22 AM
  • User-1075092149 posted

    Report might take that much of time due to the scenario. There is limited control over crystal report on this issue. you need to rethink of record fetching of database. hopefully add some indexes to SP or create a Indexed view to call records. Unfortunately there is not straight answer, you would have to do some R&D to bgring the time down.

    -Chamila

     

    the time to view the all data by clicking report view button is accepable, but the point is generate all record to text file
    it takes a lot of time, why? how to improve?
    or i just write a program by using c# to generate may be faster?

    Friday, January 6, 2012 3:34 AM
  • User-37275327 posted

    You assumption may be correct. CR would loop through all the rows localy, C# code might run faster.

    simply load records to a dataset and use the WritetXml() method. An XMl file will be created. Then You can see how much of time consume.

    Friday, January 6, 2012 4:12 AM
  • User-1075092149 posted

    You assumption may be correct. CR would loop through all the rows localy, C# code might run faster.

    simply load records to a dataset and use the WritetXml() method. An XMl file will be created. Then You can see how much of time consume.

     

    XML file? can i generate text file

    Friday, January 6, 2012 4:21 AM
  • User-37275327 posted

    Before creating a text file you can test how much time consum (Because XML is also text file). if satisfied then you can start coding for a text file.

    Friday, January 6, 2012 4:28 AM
  • User-1075092149 posted

    Before creating a text file you can test how much time consum (Because XML is also text file). if satisfied then you can start coding for a text file.

    but using writexml() ,how to format the report? seems difficult.

    Friday, January 6, 2012 4:38 AM
  • User-37275327 posted

     you cann't format. only tabular data.

    Friday, January 6, 2012 4:51 AM
  • User-1075092149 posted

     you cann't format. only tabular data.

     

    i need to format text file how to format i need a function like crystal report main plus sub-report structure

    or if i use program to call crystal report and then generate,the performance is same as generate text directly by crytal report???

     

    Friday, January 6, 2012 4:56 AM
  • User-37275327 posted

    you need to follow the structure manually. But can not retain images, shapes etc.

    like below thread.

    http://stackoverflow.com/questions/7174077/export-a-c-sharp-dataset-to-a-text-file

    Friday, January 6, 2012 5:06 AM
  • User-1075092149 posted

    You assumption may be correct. CR would loop through all the rows localy, C# code might run faster.

    simply load records to a dataset and use the WritetXml() method. An XMl file will be created. Then You can see how much of time consume.

    why the time to extract to report viewer is faster than generate all record by export to text file function?

    how to loop?  how to export to a file directly from viewer so don't need to loop again.

    Friday, January 6, 2012 8:57 AM