Datatype of database field changed from integer to bigint. How to update the reports
Hi,
In the database the requirement for a field changed so I had to change the datatype from integer to bigint. Several reports use this field.
When I open the report and preview the report, field values above maxint are displayed wrong. Understandable because the datatype is still integer. I can remove and add the field from query using the Query Designer and it is solved.
Why is this a problem when going from integer to bigint and not when increasing the length of a varchar field
Is there an easier way to convert these reports? Something like a refresh with metadata from the database. I’ve to change more than 100 reports…
Using D2007, RB14.08 and a Firebird IBX database for this project.
In the database the requirement for a field changed so I had to change the datatype from integer to bigint. Several reports use this field.
When I open the report and preview the report, field values above maxint are displayed wrong. Understandable because the datatype is still integer. I can remove and add the field from query using the Query Designer and it is solved.
Why is this a problem when going from integer to bigint and not when increasing the length of a varchar field
Is there an easier way to convert these reports? Something like a refresh with metadata from the database. I’ve to change more than 100 reports…
Using D2007, RB14.08 and a Firebird IBX database for this project.
Kind regards,
Jeroen Röttink
JR-soft software solutions
Jeroen Röttink
JR-soft software solutions
Comments
Try implementing Report.Template.OnLoadEnd to iterate over the QueryDataViews and call QueryDataView.OutOfSync for each one.
Here's an rbWiki example of How to iterate over the DatViews
http://rbwiki.digital-metaphors.com/dade/fundamentals-dade/how-to-search-available-dataviews/
Once you get it working, try writing a conversion utility to iterate over the rbItems database, load each report template, convert and save.
For others following this thread, Jeroen has an active RB license, qualifies for tech support.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I tested this by calling below procedure from OnLoadEnd, but this did not the trick. Seems the underlying TdaSQL is not refreshed.
Jeroen Röttink
JR-soft software solutions
I researched further and sent you an example. The solution requires updating the TdaSQL fields and then refreshing the DataView DBPipeline fields.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thank you for researching this and finding a solutions. Works perfect!
Jeroen Röttink
JR-soft software solutions