Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically changing the Column titles:

Status
Not open for further replies.

susheeltips

Programmer
Nov 8, 2001
60
US
Hi Guys!

I have a catalog called "Testcat.cat" and one of the folder it contains is "Folder1", this folder has three columns "SubjectCode","Total_1","Total_2". Now my question is when a user selects these columns in a report, depending on the value in "SubjectCode" the column titles of "Total_1" and "Total_2" should change.
For example:

If "SubjectCode"=1 then the column title "Total_1" should appear as "Low_Total" and if "SubjectCode"=2 then the column title "Total_2" should appear as "High_Total". This should happen dynamically when the columns are selected into a report. Reports are built such a way that at a given time the data related to either "SubjectCode"=1 or "SubjectCode"=2 is displayed.

can someone help me out.

Thanks in advance.
 
Guxeby,

Do not use the standard column titles provided by Impromptu. Instead, create calculated columns as text fields (use Insert | Calculation from the menu) and place these into either the page header or group header over the detail columns they represent. In the calculation, do an If-Then-Else (or Decode on Oracle) to change the text value based on the value of the related column. If placing them in the Page Header (where most people do) select the page header and right-click on properties and make the data scope equal to the grouping of the data (either equal to the same column that changes the title, or an associated column, so the column headers change when the column value changes across pages).

Try this and let me know if you have any questions.

HTH,

Dave Griffin ;-)
 
It is not the value of the data in need to change for the two columns but only the column name.
Hope you understand.

Thanks,
 
Understood. But in order to dynamically change the column headers, you must create them as calculated columns. They will not be in the data portion of the report, only in the page or group headers to provide descriptive information relating to what is shown beneath them.

The displayed column header will change when the underlying column (SubjectCode) code changes, based upon the scope of the header you place them in. In a page header change the scope by selecting the header and right-click to layout. For group headers it changes automatically. You will have to have grouped your report on SubjectCode for this to work.

HTH,

Dave Griffin [hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top