December 13, 2007, 12:07 PM
InnaCompound report in EXCEL format - shows html code instead of data
Hello,
I'm having a problem with report which shouild be displayed in Excel. Instead of report data, it shows the html code in excel file such as:
<STYLE TYPE="text/css">
<!--
TD { vertical-align:top; padding-left:6pt; padding-right:9pt; }
.x1 { font-family:ARIAL; font-size:9pt; }
.x2 { font-family:ARIAL; font-size:9pt; text-align:left; }
.x3 { font-family:ARIAL; font-size:9pt; text-align:left; }
....etc.
Basically i have a compound report where i call my stored proc twice with different parameters.
So I create a hold file for each table and then run it. In my ASP.NET application i receive the string output and
send it to Excel such as:
Response.ContentType = "application/ms-excel";
Response.AppendHeader("content-disposition", "attachment; filename=" + "Taxation Report" + ".xls");
Response.Write(reportOutput);
Response.End();
Response.Close();
The problem is that the report used to work this way. And now it does not. I have not changed any settings.
Does anyone know what could be the problem and is there a different way to create compund report in Excel?
THANKS
WF report snippet:
-********************************************
-* SP 1: TO RUN FOR 'DONATION'
SQL SQLMSS
EX dbo.rptDN_Taxation 'B', '&STARTDATE', '&ENDDATE', '&MYLANG', '&MYUSERID';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SHHOLD1 FORMAT ALPHA
END
TABLE FILE SHHOLD1
PRINT
OrgName
City
Registration_NO
Amount/D12.2CM
BY ChargeLocation
.....
-RUN
-********************************************
-* SP 2: TO RUN FOR 'FOUNDATION GRANT'
SQL SQLMSS
EX dbo.rptDN_Taxation 'F', '&STARTDATE', '&ENDDATE', '&MYLANG', '&MYUSERID';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SHHOLD2 FORMAT ALPHA
END
TABLE FILE SHHOLD2
PRINT
OrgName
City
Registration_NO
Amount/D12.2CM
BY ChargeLocation
....
-RUN
-HTMLFORM BEGIN
!IBI.FIL.SHHOLD1;
!IBI.FIL.SHHOLD2;
-HTMLFORM END
December 13, 2007, 03:59 PM
FortuneCookieRather then going through an HTML page with ALPHA output would this work for you:
TABLE FILE SHHOLD1
PRINT
OrgName
City
Registration_NO
Amount/D12.2CM
BY ChargeLocation
ON TABLE HOLD AS TEST1 FORMAT EXL2K OPEN
END
TABLE FILE SHHOLD2
PRINT
OrgName
City
Registration_NO
Amount/D12.2CM
BY ChargeLocation
ON TABLE HOLD FORMAT EXL2K CLOSE
END