Jump to content

Recommended Posts

Posted

I have the following code:  

DEFINE FILE CAR
 REPORT_YEAR/I4 = 2024;
END
TABLE FILE CAR
 PRINT CAR
       SALES
 ACROSS REPORT_YEAR
 ON TABLE PCHOLD FORMAT EXL2K
END

When I EXecute and open in Excel I see a 'Number Stored As Text' warning for the ACROSS heading:  

image.png.a47568587a9e376ad3fb140b88579359.png

Any ideas on how to avoid this warning?  

 

 

 

 

Posted

Looks like adding a control character will work in my case:  

DEFINE FILE CAR
 REPORT_YEAR/A4 = '2024';
 REPORTYEAR/A10 = REPORT_YEAR | CTRLCHAR(CR);  
END
TABLE FILE CAR
 PRINT CAR
       SALES
 ACROSS REPORTYEAR
 ON TABLE PCHOLD FORMAT EXL2K
END

 

  • Like 2
Posted

@David Briars - The problem here is not really WebFOCUS but Excel - it trys to be smart. 

As the year is a horrizontal sort - WebFOCUS defines it as text because otherwise it my be considered in asubtotal if you manualy add it later in Excel

Your   CTRLCHAR works as this prevents the "Number as text"  - the only solution is what you did - make sure Excel does not "think" it could be a number.

Better solution - make sure your Date / Year is a Date not an integer.

Additional please use XLSX instead of EXL2K to prevent the error message in my screenshot - but the Date solution will work for both versions.

image.png

Here's a sample:

DEFINE FILE ibisamp/CAR
 REPORT_YEAR/I4 = '2024';
 REPORTYEAR/YY = REPORT_YEAR;

END
TABLE FILE ibisamp/CAR
 PRINT CAR
       SALES
 ACROSS REPORTYEAR
 ON TABLE PCHOLD FORMAT XLSX
END

 

 

  

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...