Problem Description:
when viewing a sas table in VIEWTABLE, the header for each column is default to show column description, how do I make it show column name instead?
I am using SAS version:9.3
What I did so far:
I found the following solution online (This solution was tested on SAS 9.2)
VT SASHELP.VCOLUMN COLHEADING=NAMES
when I run this command I was given the following error
8713 VT SASHELP.VCOLUMN COLHEADING=NAMES
--
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
The point and click version of the solution did not work for me either.
That is a dm command, so you need to submit it to DM:
dm 'VT SASHELP.VCOLUMN COLHEADING=NAMES';
You could also assign that command (what you have, in mine just the part within the quotes) in KEYS ('keys' in the command bar). You also can do this on a case by case basis in the VIEW menu once you've opened the dataset.
The way to do this permanently:
Open the Explorer (View -> Explorer)
Tools->Options->Explorer
Select Members
Select Table, Edit
Select &Open, Edit
Add COLHEADING=NAMES to the end of the string already present (should be something like VIEWTABLE %8b."%s".DATA COLHEADING=NAMES after you finish).
Save everything (OK to all dialog boxes).
This will only persist if save settings on exit is enabled in the preferences (tools-options-preferences) and this is not an rsasuser session (read-only access to user profiles).
Related
I am trying to apply conditional formatting to a field of a table in a report in Power BI online.
The report is connected to a dataset that is in MS Teams and continues to function. All existing conditional formatting is unchanged.
These are the steps I took:
Switch report to edit mode
Select table
Select conditional formatting - advanced controls
In the pop-up window, select "Based on Field"
Then, the drop down list is blank and says {{::placeholderText}}.
This can now be recreated in any report, new or existing, where I attempt conditional formatting.
I tried creating a new report from a new dataset, and attempted to add conditional formatting to a table. The same result happened.
I tried signing out of my Microsoft account and signing back in, but no effect.
I was able to get it working by adding ?conditionalFormattingModern=1 to the url for the online editor like this: https://app.powerbi.com/groups/me/reports/xxx/ReportSection?conditionalFormattingModern=1. (source of idea)
I'm not sure if it will work correctly after I publish the visual though. Apparently this isn't an issue on Power BI Desktop though- so it's probably fine.
Update: Not sure if I'm doing something wrong- but the conditional formatting doesn't seem to be actually applied. It's just that the editor window displays correctly.
I got it by chance.
Submit this to SAS:
proc toolbar;
quit;
The Log says:ERROR: Unable to open ..., I think it indicates proc toolbar is some kind of procedure but I just didn't use correct syntax. Because if there is not a procedure named toolbar it would be another kind of hint: ERROR: PROCEDURE XXX not find. You can validate it using the following example.
proc XXX;
quit;
I dont't find any documents about proc toolbar. How do you know about it? could you please share with me?
Currently, custom toolbars for SAS display manager sessions are created using the display manager command TOOLDEF and loaded (or attached) to a window using command TOOLLOAD.
Proc TOOLBAR may be a deprecated or an abandoned experimental procedure that is for programmatically creating custom toolbars.
As for
ERROR: Unable to open ...
The mystery of what ... is remains.
Attempts to specify a procedure option produces a log message
ERROR 22-322: Expecting ;.
So maybe the procedure does not allow options.
The procedure does process an ITEM statement that was likely the syntax for associating an entry with a command and icon
item <name> command="<command>" icon=<icon-number>
Every attempt to run Proc TOOLBAR will create a new temporary catalog in the WORK folder.
proc toolbar cat=work.play.one;
item work command="dir work" icon="123";
item view command='viewtable &syslast';
quit;
Aside for icons
The SAS display manager command regedit raises the SAS registry editor window. Icon numbers for various classifier mnemonic can be seen in the drill path SAS_REGISTRY/CORE/CLASSIFIERS and for SAS explorer at SAS_REGISTRY/CORE/EXPLORER/ICONS. The SAS registry editor does not display the icon image that corresponds to the icon number.
Example:
Classifier 100 is named COPYITEM and will show icon #173 in the display manager UI. The datatype of the names are strings as shown by the preceding [ab] icon.
However, you can download and run an improved registry viewer application built with SAS/AF that does show icon images adjacent to icon numbers.
See page "SAS/AF Registry Browser" for information about the viewer application. The viewer can be installed and run by submitting
LIBNAME EXAMPLE "%sysfunc(pathname(WORK))";
filename INSTALL
URL "https://www.devenezia.com:443/downloads/sas/af/example/registry-browser/registry-browser.xpt"
;
PROC CIMPORT LIB=EXAMPLE FILE=INSTALL;
RUN;
filename INSTALL;
proc display cat=EXAMPLE.REGISTRY.BROWSER.FRAME;
run;
Other interesting artifacts from bygone days
Proc PMENU
SAS Explorer use and customization
There are a number of procs in SAS that are dead/defunct. They are normally very hard to find info on. A few years ago, with some sleuthing, I got proc explode to work. An old procedure to write large letters on greenbar back in the mainframe printer days. I am sure there are many, many more. I think I remember proc toolbar but has been 20+ years. Maybe an AF proc when SAS was on the old editor.
Honestly, I would ignore it as having any value. I suspect dozens of abandoned procs in the code base.
I developed a report with the PowerBI desktop and used an Excel file as a data source. The file was local.
Now I have placed the excel file Sharpoint folder so that it can be modified by the whole team. I want to change the data source and pointer to the file on the Sharepoint so that my report is updated from this new location.
I can't find a solution.
please help me.
I can connect to Sharpoint and select my excel file, but the problem is that I have already developed my entire report which had as source the same excel file but locally. Now I have moved it to Sharpoint and I just want to change the data source of my report.
I would like to point out that my excel file contains 7 sheets that represent my different tables used for the report.
I want my report updated from the rexcel file that is on Sharpoint.
Try to connect to your root folder in SharePoint. Do this:
In Power BI, click Get Data > SharePoint Folder > Connect.
Then enter your SharePoint root folder path and click OK.
The click the Edit button.
Filter the Extension column to only show excel files.
Filter the Name column to only show the Excel file you want to use.
Right-Click on the Content column's title and then click on Remove Other Columns.
Click on the button with the double down arrows in the Content column's title.
Select the objects to be extracted from the workbook and click OK.
Example:
You'll see new queries in the left pane:
Unless you already had one named Query1, you will likely now have one named Query1. Click on that new Query, then click on Home > Advanced Editor. Copy everything between let and in (not including let and in). (That is to say, select everything and press Ctrl+C to copy it to your clipboard so you'll be able to paste it in a moment.)
Example:
Click Cancel.
Click on your original query...the one with your original source that you want to change...then click on Home > Advanced Editor. Select the entire source line and, if you have a line like this one -- Maintenance_Window_Table = Source{[Item="Maintenance_Window",Kind="Table"]}[Data], -- select it too. (This second line is a navigation line, which navigates to the table of interest.) If you also have a #"Changed Type" line, select it as well.
Example:
Paste what you copied earlier over these lines that you've just selected by pressing Ctrl+V.
*Add a comma at the end of what you just pasted. (See the red circle in the picture below) *
Also, in the line that follows what you just pasted, change the reference to the last line of what you just replaced to the name of the last line of what you just pasted, if they are different. The name is what is on the very left, to the left of the equal sign. It is probably #"Changed Type". (See the yellow highlights in the picture below.) If that name appears below what you just pasted, you will either need to change that name here and in the pasted text, or wherever it appears below. I would change it here and in the pasted text above. You could just add a 1 at the end, before the last quote. Otherwise you'll have a naming conflict.
Example:
Click Done.
That should do it.
I have an issue with changing interactive report column order.
My APEX version 5.0.3.00.03.
If i change order in Columns nothing change.
If i change order in SqlQuery nothing change.
If i change type of report (eg select classic report) and come back to interactive order finally change.
I'm doing wrong or there is a bug?
So what we can do here is, once you run your report and see the output.
Click on "Action" button on your report output, near the Search bar. Then choose "columns". Now in the next pop up window, you can reorder the columns and even opt to not show some of the column. Once you are done with the changes, click on "Apply".
Now you need to follow these steps to make these changes default for all.
Actions --> Reports --> Save Report --> Choose "As Default Report Settings" in save drop down menu --> Apply.
Now your changes will be done and saved as default for all.
SQL statement order is merely defines the default order upon creation, and has no impact afterwards.
Classic reports get their order from the column sequence at design time.
Column order for interactive reports is defined at runtime, where the developer uses action toolbar to select columns, order, sort etc.
Design time capability for IR may be present in APEX 5.2
Don't forget to save the report as default report afterwards or else it will reset on refresh (actions -> save report then choose default from select list).
To change the order of columns displayed go on IR bar "actions" and select "Columns". Here you can choose what display and in which order. Then save the report as default.
I want to edit rows in interactive report. Before or after filtering. I have made column link in select query using ''edit_link but in Regions > Interactive Report > Column Attributes > [Column Name (edit_link)] > Column Link section i can't send data using item because there is no items on list to pick in page with interactive report. In normal report there are items i can select to read data from and send to (item and value boxes). Is it any solution to edit filtered rows?
There are a couple of ways that come to mind to accomplish this. I will explain an approach that starts off with where your prompt left off.
1. Create a FORM Page
This is to edit a record from your Interactive Report. I assume that the query behind your IR is not a complex, multi table query, which will not work with this approach unless you build this form on a Stored Procedure (instead of Apex's automatic DML functionality).
Build a Form on the Table from the IR
From the Application Builder menu, CREATE a New FORM. Select "Form on a Table or View". Select the TABLE to build this form on and fill in the information required to map it. You will be asked to identify the PRIMARY KEY of the table from your Interactive Report.
Set All Branching Activity to Return to the IR
When Prompted for "After Page Submit And Processing Branch to Page" and "When Cancel Button Pressed Branch to this Page" Choose the page number of your Interactive Report. Any activity on this page, when done (whether through CANCEL or SUBMIT and process), you will want it to go back.
2. Set Column "Edit Link" Properties
Under the Column Link section, set the target to "Page in this Application", and add the page of the form previously created. Items should now show in your popup. Select the Page Item from your Forms page that corresponds to your Table's Primary Key. The value can be derived in some way, or just point to a the column it came from. (i.e., #MY_KEY_ID#).
The key part that was probably missing for you was the existence of the edit form required to modify the record. That is not an automatically created feature when you create an IR report.