Discussion:
Changing SQL in existing rpts causes problems with report
(too old to reply)
unknown
2009-07-15 17:34:30 UTC
Permalink
Hello,

When I make a change/addition to the SQL statement of any
existing reports InfoMaker says that the computed columns
and groups are "no longer valid".

-Brent
Chris Pollach
2009-07-15 18:11:01 UTC
Permalink
Yes .. they can be all inter-related.

One way you can limit the SQL changes in IM reports is to use SQL Colum name
synonyms.
For example:
Select agr_lname "LastName"
agr_fname "FirstName"
agr_sal_amount "Salary"
agr_h_phone "HomePhone"
...


This then allows you to refer to the synonym name for example in a Computed
Column expression ...
String (HomePhone, "(###) ###-####")

Now you can change the select to:

Select agr_lname "LastName"
agr_fname "FirstName"
agr_sal_amount "Salary"
agr_new_phone_no "HomePhone"

and the Report's objects that refer to HomePhone are unaware of the column
name change or even remapping in my example.

HTH
--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com
Post by unknown
Hello,
When I make a change/addition to the SQL statement of any
existing reports InfoMaker says that the computed columns
and groups are "no longer valid".
-Brent
unknown
2009-07-15 21:03:42 UTC
Permalink
Im Sorry. I should have been more descriptive.

The problem is not with SQL itself, it is with InfoMaker. I
can add anything to the SQL statement (i.e. charlie.brown as
the table.column in the select clause) and, instead of
giving me an error that "charlie is not a valid table" it
just goes back to the report view and starts telling me that
all the computed columns and groups are no longer valid.

I am running verson 9.0.2 Build 7509.

Anyone else run into this problem?
Terry Dykstra [TeamSybase]
2009-07-15 22:57:11 UTC
Permalink
The way you describe it I've never seen that. Maybe if I use an example
what can cause that problem it becomes clearer. If my description does not
match your experience, then please give a full detail of the sql statements
before/after your changes.

If the original SQL looks like this:

select col1, col2, col1 + col2
from mytable

Then IM will create on the report columns with the name col1, col2,
compute_03.

If I now go back into the SQL statement and change it to:

select col1, col2, col3, col1 + col2
from mytable

Then IM report will no longer recognize compute_03. It now will have col1,
col2, col3, compute_04. So if you created a group or computed fields on the
report that referenced compute_03, they will break.
That's why Chris recommended using aliases:

select col1, col2, col3, col1 + col2 as mycol
from mytable

Because you have now given a name to the computed expression called mycol,
IM report will no longer break when you change the SQL statement.
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
Im Sorry. I should have been more descriptive.
The problem is not with SQL itself, it is with InfoMaker. I
can add anything to the SQL statement (i.e. charlie.brown as
the table.column in the select clause) and, instead of
giving me an error that "charlie is not a valid table" it
just goes back to the report view and starts telling me that
all the computed columns and groups are no longer valid.
I am running verson 9.0.2 Build 7509.
Anyone else run into this problem?
Loading...