Generation of a report TD 5.2 SP2

Discussion forum about all things Report Builder (all versions).
jlmunoz

Generation of a report TD 5.2 SP2

Post by jlmunoz » 15 Jul 2011, 19:22

Hello.

Please I need help I have the following problem:

I'm migrating from Centura TD 1.5 with to TD 5.2 with SQLSERVER Centura and presents a problem to generate a report (QRP).
To request the generation of a report (either within the system) the application displays the report and displays it on screen.
Then go to the last page and from there press the Print button., the system prints a blank page. This in version 1.5 does not happen.
We installed TD 5.2 SP2

Jeff Luther

Re: Generation of a report TD 5.2 SP2

Post by Jeff Luther » 04 Aug 2011, 01:41

Most likely problem is that your query result set is not being re-initialized to the beginning after the user has scrolled to the end of the report (and SqlFetchNext() has returned FALSE). To do this your code in the form trapping the SAM_Report msgs. needs to do something like:

Code: Select all

On SAM_ReportFetchInit
    ! ... do any initializing of variables, etc. used in the report
    !
    ! Now call SqlExecute(). this causes the DB to rebuild the result set, so now in SAM_ReportFetchNext msg. your next SqlFetchNext
      call will return 1st row for printing
    Return SqlExecute( hSql )
Note that The SAM_ReportStart msg. only needs SqlPrepare if you call this in that msg. It does not need SqlPrepareAndExecute; the 'execute' is what you will be calling in the 'Init' msg.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests