Answered by:
If the report size s larger then download the report insted f opening the report page

Question
-
User564383478 posted
Dear all,
I am using vs2012 and creating reports using crystal reports in my web application.
Now the issue is ,
when I am opening crystal report,It will open up to 15 pages without any issues.But the reprt exceeds more than 15 pages ,It will show blank pages.Now my requirement is,If the report exceeds more than 15 pages then ,Instead of opening report page client need to download report for viewing the report.How can I do this? I am not getting any idea ow to do this part?
Again ,If the report size s larger then client need a facility to download the report insted f opening the report page
Now the report is opening with the code below
Protected Sub LnkShowReport_Click Page.ClientScript.RegisterStartupScript(Me.GetType(), "popup", "ShowPopupReport();", True) function ShowPopupReport() { var w = 825, h = 700; var left = (screen.width / 2) - (w / 2); var top = (screen.height / 2) - (h / 2); var childWin = window.open("Reports.aspx"); } ElseIf Me.Title = "Daily Activity Reports_" Then If Not Page.IsPostBack Then Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo() myConnectionInfo.ServerName = "123" myConnectionInfo.DatabaseName = 1 myConnectionInfo.UserID = "2" myConnectionInfo.Password = "3" Dim ReportPath As String = Server.MapPath(reportname) dailyreportViewer.ReportSource = ReportPath dailyreportViewer.DisplayToolbar = True dailyreportViewer.SeparatePages = False dailyreportViewer.HasPageNavigationButtons = False dailyreportViewer.HasGotoPageButton = False Dim field1 As ParameterField = Me.dailyreportViewer.ParameterFieldInfo(0) Dim field2 As ParameterField = Me.dailyreportViewer.ParameterFieldInfo(1) Dim val1 As New ParameterDiscreteValue() Dim val2 As New ParameterDiscreteValue() val1.Value = "aa" val2.Value = "Report_" field1.CurrentValues.Add(val1) field2.CurrentValues.Add(val2) SetDBLogonForReport(myConnectionInfo) End If
Sunday, June 23, 2013 2:24 AM
Answers
-
User894328585 posted
Dim a As PageView = ReportViewer.Controls(0) Dim count = a.GetLastPageNumber()
helps you in finding pages count of report.
is it exceeds 15 use following links to download data to file.
http://www.codeproject.com/Tips/375965/How-to-convert-GridView-data-to-Excel-PDF-Word-fil
http://stackoverflow.com/questions/10411520/export-grid-view-to-excel-and-save-excel-file-to-folder
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, June 23, 2013 3:53 AM
All replies
-
User894328585 posted
Dim a As PageView = ReportViewer.Controls(0) Dim count = a.GetLastPageNumber()
helps you in finding pages count of report.
is it exceeds 15 use following links to download data to file.
http://www.codeproject.com/Tips/375965/How-to-convert-GridView-data-to-Excel-PDF-Word-fil
http://stackoverflow.com/questions/10411520/export-grid-view-to-excel-and-save-excel-file-to-folder
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, June 23, 2013 3:53 AM -
User-578610739 posted
Hi Jula,
For bigger size issue, please check first this.
http://support.leadtools.com/CS/forums/36770/ShowPost.aspx
http://scn.sap.com/thread/1756266
http://scn.sap.com/thread/1199897
http://scn.sap.com/thread/3236975
Then if your problem not solved, then directly export to excel, word as,
http://forums.asp.net/t/1727868.aspx/1
http://forums.asp.net/t/1779584.aspx/1
http://forums.asp.net/t/1585859.aspx/1
If your formating is not complicated and simple as grid, So good to direct export the data in excel as a HTML table like
http://www.aspdotnet-suresh.com/2011/04/how-to-export-gridview-data-to-excel-or.html
http://www.codeproject.com/Tips/477436/Export-Gridview-Data-to-Excel-in-ASP-NET
Monday, June 24, 2013 1:19 AM -
User564383478 posted
I tried this code for getting page number,This is working fine but...
If the report is having more data , then report pages showing blank and count is getting 1 .How can I solve this issue????
Pls help mee.....
Monday, July 1, 2013 1:07 PM