Export To Excel throws Error WrapperReportRenderingException - ms-sqlserver
This is a discussion on Export To Excel throws Error WrapperReportRenderingException - ms-sqlserver ; Hello,
I would like to get the report definition so that I can go for further
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may ...
Re: Export To Excel throws Error WrapperReportRenderingException
Hi Shai,
Thanks for the input and it works. I can export the dataset to Excel without
any problem.
Please have a look at my reply to Wei eariler with more information.
Thank you again for the help...
wrote in message
news:c31b3356-cc38-4f95-905f-c7c2ede4e7ff@t1g2000pra.googlegroups.com...
> Chris,
>
> In the dialog box that opens , select "Allfiles", then type in the
> file name with the extension , viz. Test.xls and that will create the
> file for you.
>
>
> Cheers
>
> Shai
>
> On Dec 10, 5:23 pm, we...@online.microsoft.com (Wei Lu [MSFT]) wrote:
>> Hello,
>>
>> Have you tried to export the result to csv and open it in Excel?
>>
>> Sincerely,
>>
>> Wei Lu
>> Microsoft Online Community Support
>>
>> ==================================================
>>
>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>>
>> ==================================================
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>
Re: Export To Excel throws Error WrapperReportRenderingException
Hi
So its not Excel and its not SQL . Oook, now lets consider the
report , I suspect that the grouping on the big int field is causing
excel to crash. Depends on how many unique big ints you have in your
data set , but the next thing I would do is to try and isolate if any
one of the big int values is causing the crash. The easiest way to do
this would be to limit the big int in your data set to one of each
unique value and exporting the report to excel. But if you have a very
high number of big ints then it can be a long process. Whatever the
data , excel should not crash . Having said that , if the grouping is
too complicated, I would also suggest trying sub reports to simplify
the process.
Re: Export To Excel throws Error WrapperReportRenderingException
Hi Wei,
This is just a test to see whether I am able to reply to this post.
I have tried to reply your post for number of time without any success.
I was thinking may be the attached files caused it so this reply is just a
test.
"Wei Lu [MSFT]" wrote in message
news:9oAE027OIHA.5204@TK2MSFTNGHUB02.phx.gbl...
> Hello,
>
> I would like to get the report definition so that I can go for further
> assistance.
>
> Sincerely,
>
> Wei Lu
> Microsoft Online Community Support
>
> ==================================================
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
RptWizGet1WeekHoursLawBetweenDates 0.23545cm =iif(Parameters!DUMMY_Culture.Value = "en-GB", "No Results
found for the specified Criteria",
Code.m_localization.TranslateText(Parameters!DUMMY _Culture.Value, 72, "No
Results found for the specified Criteria*" ))
Function GetTextForVehicleReg(ByVal strVehicleReg As string) As
string
Dim strReturnVal as string
If (Trim(strVehicleReg) = "NULL VEH")
strReturnVal = "Rest Assumed"
else
strReturnVal = strVehicleReg
End if
GetTextForVehicleReg = strReturnVal
End Function
Function ConvertMinutesToHoursAndMinutes(ByVal p_minutes As Integer) As
String
Dim thisTimeSpan As TimeSpan
Dim hours as Integer
Dim days as Integer
Function GetHiddenStatusForWorkingPeriod_GroupFooter(ByVal
IntRunningValueRowsCount as Integer) As Boolean
Dim strReturnVal as Boolean = True
''If There are more than 1 Row then Make the Group Footer Visible
If (IntRunningValueRowsCount > 1)
strReturnVal = False
End if
GetHiddenStatusForWorkingPeriod_GroupFooter = strReturnVal
End Function
Function GetHiddenStatusForDetailRows(ByVal strDisplayRestDays as String, _
ByVal IntCNUM as Integer, ByVal intChartCount as Integer) As Boolean
Dim strReturnVal as Boolean = False
''If this row is just a Dummy row for Working period group totals(split
from working group fallen in two different weeks)
if (intChartCount = -999)
strReturnVal = True ''RETURN TRUE (FOR VISIBILITY - HIDDEN = TRUE)
else
''Check this only when User Want to Hide the Rest days rows
If (strDisplayRestDays = "FALSE")
''Check for CNUM ''If it is greater than 1 RETURN TRUE (FOR VISIBILITY -
HIDDEN = TRUE)
If (IntCNUM = 1)
strReturnVal = True
End if
End if
End If
GetHiddenStatusForDetailRows = strReturnVal
End Function
Function GetHiddenStatusForDetailColumns(ByVal strSQLColumnName as String, _
ByVal intCNUM as Integer, ByVal intNoOfRowsInWK_PeriodGroup as Integer)
As Boolean
Dim strReturnVal as Boolean = False
''intCNUM will be 1 for REST DAYS
If intCNUM = 1 Then
strReturnVal = True
Else
''First Check strSQLColumnName
If (strSQLColumnName = "DAILY_REST" OR strSQLColumnName =
"TOTAL_SHIFT_TIME")
IF (intNoOfRowsInWK_PeriodGroup > 1)
strReturnVal = True
END IF
End if
End if
GetHiddenStatusForDetailColumns = strReturnVal
End Function
Function GetFormattedDetailRowValue(ByVal strSQLColumnName as String, _
ByVal strColumnDetailRowValue as String, ByVal intCNUM as Integer, _
ByVal strStartLocation as String, ByVal strFinishLocation as String) As
String
''This function checks strSQLColumnName and gives back the formatted
strColumnDetailRowValue
Dim strReturnVal as String = ""
If strColumnDetailRowValue <> "" Then
Select strSQLColumnName
Case "START_OF_DUTY"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "END_OF_DUTY"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "DAILY_REST"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_FORTNIGHT_DRIVE"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "DAILY_DRIVE_TIME"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "OTHER_WORK"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_DUTY_TIME"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_SHIFT_TIME"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "START_LOCATIONID"
strReturnVal = strStartLocation
Case "FINISH_LOCATIONID"
strReturnVal = strFinishLocation
Case "ODOSTART"
strReturnVal = strColumnDetailRowValue
Case "ODOFINISH"
strReturnVal = strColumnDetailRowValue
Case "ODODIFF"
strReturnVal = strColumnDetailRowValue
Case "STYLUS_DISTANCE"
strReturnVal = strColumnDetailRowValue
Case "TOTAL_LOAD_UNLOAD"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_DEPOT"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_BREAK"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "DRIVE_START"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_ACTIVE_WORK"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "TOTAL_PASSIVE_WORK"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "WTD_TOTAL_POA"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "WTD_TOTAL_WORK"
strReturnVal = IIF(intCNUM = 1, "",
ConvertMinutesToHoursAndMinutes(Convert.ToInt32(st rColumnDetailRowValue)))
Case "FUEL"
strReturnVal = strColumnDetailRowValue
Case "AVG_SPEED"
strReturnVal = strColumnDetailRowValue
Case "CHART_NUMBER"
strReturnVal = strColumnDetailRowValue
End Select
End if
GetFormattedDetailRowValue = strReturnVal
End Function
Function IsThisAWorkingPeriodGroupColumn(ByVal strSQLColumnName as String)
As Boolean
''This function checks strSQLColumnName to if WorkingPeriod Group Total is
to be displayed for this Column
''and gives back the True or False
Dim strReturnVal as Boolean = False
Select strSQLColumnName
Case "DAILY_REST"
strReturnVal = True
Case "DAILY_DRIVE_TIME"
strReturnVal = True
Case "TOTAL_SHIFT_TIME"
strReturnVal = True
End Select
IsThisAWorkingPeriodGroupColumn = strReturnVal
End Function
Function DisplayThisColumnsWeeklyTotalAsHH_MM(ByVal strSQLColumnName as
String) As Boolean
''This function checks strSQLColumnName to see if Weekly Total applies to
this Column
''and gives back the True or False
''Returns true only for the columns whose Weekly total is to be displayed in
HH:MM format
Dim strReturnVal as Boolean = False
Select strSQLColumnName
Case "DAILY_REST"
strReturnVal = True
Case "DAILY_DRIVE_TIME"
strReturnVal = True
Case "OTHER_WORK"
strReturnVal = True
Case "TOTAL_SHIFT_TIME"
strReturnVal = True
Case "TOTAL_LOAD_UNLOAD"
strReturnVal = True
Case "TOTAL_DEPOT"
strReturnVal = True
Case "TOTAL_BREAK"
strReturnVal = True
Case "TOTAL_ACTIVE_WORK"
strReturnVal = True
Case "TOTAL_PASSIVE_WORK"
strReturnVal = True
Case "WTD_TOTAL_POA"
strReturnVal = True
Case "WTD_TOTAL_WORK"
strReturnVal = True
End Select
DisplayThisColumnsWeeklyTotalAsHH_MM = strReturnVal
End Function
Function DisplayThisColumnsWeeklyTotalAsInteger(ByVal strSQLColumnName as
String) As Boolean
''This function checks strSQLColumnName to see if Weekly Total applies to
this Column
''and gives back the True or False
''Returns true only for the columns whose Weekly total is to be displayed as
an Integer
Dim strReturnVal as Boolean = False
Select strSQLColumnName
Case "ODODIFF"
strReturnVal = True
Case "STYLUS_DISTANCE"
strReturnVal = True
Case "FUEL"
strReturnVal = True
End Select
DisplayThisColumnsWeeklyTotalAsInteger = strReturnVal
End Function
''This function is created on 09/12/2004 to get the exact daily_rest for
whole period
Function GetWorkingPeriodGroupRowColumnTotal(ByVal strSQLColumnName as
String, _
ByVal intTotalFieldValueForWKPGroup as Integer) As String
''This function checks strSQLColumnName to if WorkingPeriod Group Total is
to be displayed for this Column
''and gives back the relevant value back
Dim strReturnVal as String = ""
''Return the Total Only For Columns defined in
IsThisAWorkingPeriodGroupColumn
IF (IsThisAWorkingPeriodGroupColumn(strSQLColumnName) = True) Then
strReturnVal =
ConvertMinutesToHoursAndMinutes(intTotalFieldValue ForWKPGroup)
End IF
GetWorkingPeriodGroupRowColumnTotal = strReturnVal
End Function
''This function is created on 09/12/2004 to get the exact totals for whole
week
Function GetWeeklyTotalsRowColumnValue(ByVal strSQLColumnName as String, _
ByVal intWeeklyTotalColumnValue as Integer) As String
''This function checks strSQLColumnName to see if the Weekly Total for the
column to be displayed,
''if to be displayed what format is to be in "HH:MM" or as an Integer
Dim strReturnVal as String = ""
IF(DisplayThisColumnsWeeklyTotalAsHH_MM(strSQLColu mnName) = True) Then
strReturnVal = ConvertMinutesToHoursAndMinutes(intWeeklyTotalColu mnValue )
else if (DisplayThisColumnsWeeklyTotalAsInteger(strSQLColu mnName) = True)
Then
strReturnVal = intWeeklyTotalColumnValue.ToString()
End If
GetWeeklyTotalsRowColumnValue = strReturnVal
End Function
''This function is created on 13/12/2004 to Change the Report Header
according to Journey Type
Function GetReportHeaderWithJourneyType(ByVal strReportHeaderFromTemplate as
String, _
ByVal strJourneyType as String) As String
Dim strReturnVal as String = ""
Select Case strJourneyType
Case "0"
strReturnVal = vbCrLf & " Goods Vehicle EC Rules*"
Case "1"
strReturnVal = vbCrLf & " Goods Vehicle Domestic
Rules*"
Case "2"
strReturnVal = vbCrLf & " PCV Regular Services*"
Case "3"
strReturnVal = vbCrLf & " PCV Non-Regular Services*"
End Select
GetReportHeaderWithJourneyType = strReportHeaderFromTemplate &
strReturnVal
End Function
public function GetLastMonday(ByVal dtWorkingDate as DateTime) as DateTime
Dim strReturnVal as DateTime
''--GET THE LAST MONDAY
strReturnVal = DateAdd(DateInterval.Day, -1 * (WeekDay(dtWorkingDate,
FirstDayOfWeek.Monday) - 1), dtWorkingDate)
GetLastMonday = strReturnVal
End Function
public function GetNextSunday(ByVal dtWorkingDate as DateTime) as DateTime
Dim strReturnVal as DateTime
''--GET THE NEXT SUNDAY
strReturnVal = DateAdd(DateInterval.Day, 7 - WeekDay(dtWorkingDate,
FirstDayOfWeek.Monday), dtWorkingDate)
GetNextSunday = strReturnVal
End Function
Function GetLocaleShortDateString( ByVal dtConvertDateTime as DateTime,
ByVal strLocale as string ) as String
Dim DTFormat = New System.Globalization.CultureInfo( strLocale,
True).DateTimeFormat
GetLocaleShortDateString=Format( dtConvertDateTime,
DTFormat.ShortDatePattern)
End Function
"Wei Lu [MSFT]" wrote in message
news:9oAE027OIHA.5204@TK2MSFTNGHUB02.phx.gbl...
> Hello,
>
> I would like to get the report definition so that I can go for further
> assistance.
>
> Sincerely,
>
> Wei Lu
> Microsoft Online Community Support
>
> ==================================================
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>