Crystal Reportshttp://forums.asp.net/76.aspx/1?Crystal+ReportsQuestions and discussions about Crystal Reports.Wed, 15 May 2013 06:34:58 -0400urn:uuid:00000000-0000-0000-0000-000000000076urn:uuid:00000000-0000-0000-0000-000005404086http://forums.asp.net/p/1909258/5404086.aspx/1?Crystal+Report+runs+query+multiple+times+on+page+changeCrystal Report runs query multiple times on page change <p>I have written the code for crystal report in the page_init() and it runs fine, but I have just noticed that when I switch report page index, means when I want to load second page of the report, the control again goes to the page load and whole report query runs again.</p> <p>I have made a switch case and from query string I take the name which report is to be loaded, is there a way by which when I can minimize the report load time?</p> <p>Is session a better idea?</p> <p>If I write the code in (!Ispostaback), then only first page is loaded, when I try to switch second page, it shows no resource is available error.</p> <pre class="prettyprint">protected void Page_Init(object sender, EventArgs e) { try { String test = Request.QueryString[&quot;ReportType&quot;]; ReportDocument report = new ReportDocument(); switch (testCondition) { case &quot;Report&quot;: var rpt1 = new LenderCompanyActionReport(); String lcarParam1 = Request.QueryString[&quot;Param1&quot;]; String lcarParam2 = Request.QueryString[&quot;Param2&quot;]; String lcarParam3 = Request.QueryString[&quot;Param3&quot;]; String lcarParam4 = Request.QueryString[&quot;Param4&quot;]; String lcarParam5 = Request.QueryString[&quot;Param5&quot;]; List&lt;Reportclass&gt; lst2 = new ReportMethod().GetReport(lcarParam1, lcarParam2, lcarParam3, lcarParam4, lcarParam5); rpt1.SetDataSource(lst2); CRReportViewer.ReportSource = rpt1; break; }</pre> <p></p> 2013-05-24T06:53:29-04:002013-05-24T06:53:29.127-04:00urn:uuid:00000000-0000-0000-0000-000005392438http://forums.asp.net/p/1905670/5392438.aspx/1?CRystal+report+populated+at+run+timeCRystal report populated at run time <p>Hi,</p> <p>This is the first time I'm working with crystal reports. What i am trying to do is crating a single crystal report which populated at runtime using with select command therefore I write the code onload event of page My code is-</p> <p>try<br> {<br> ReportDocument cryRpt = new ReportDocument();<br> <br> cryRpt.Load(@&quot;C:\Users\Avi\Documents\Store backup\1Apr\store\Bill.rpt&quot;);</p> <p>con.Open();<br> adp = new SqlDataAdapter(&quot;Select * from Store_Purchasebill where Bill_no=&quot; &#43; bill &#43; &quot;&quot;, con);<br> DataSet ds = new DataSet();<br> adp.Fill(ds, &quot;Store_Purchasebill&quot;);</p> <p>if (ds.Tables[0].Rows.Count &gt; 0)<br> {<br> <br> cryRpt.Load(@&quot;C:\Users\Avi\Documents\Store backup\1Apr\store\Bill.rpt&quot;);<br> <strong>cryRpt.SetDataSource(ds.tables[0]);// here i get error&nbsp;</strong></p> <p>crystalReportViewer1.ReportSource = cryRpt;<br> crystalReportViewer1.Refresh();</p> <p>}<br> <br> }<br> catch (Exception se)<br> {<br> MessageBox.Show(se.Message.ToString());<br> }</p> <p>The error it show is<strong> report has no tables</strong>. I added a blank Crystal report if i need to add another type of report then plz tell me how to add that.</p> <p>Thx in advance.</p> 2013-05-13T13:36:24-04:002013-05-13T13:36:24.583-04:00urn:uuid:00000000-0000-0000-0000-000005403503http://forums.asp.net/p/1909123/5403503.aspx/1?Multi+PageMulti Page <p>Hi All,</p> <p>Actually my report is, i have to print 30 values for 1000 members. But Per page i should print oly 25 members as well 10 values per person. Here values should come as horizontal. and members should align as vertical.i can do it for single page til 25 members using &quot;format multi column&quot;.But don know how to show all of them.<br> Thanks in advance</p> 2013-05-23T14:29:19-04:002013-05-23T14:29:19.17-04:00urn:uuid:00000000-0000-0000-0000-000003616852http://forums.asp.net/p/1514101/3616852.aspx/1?How+to+pass+value+from+Report+Footer+to+Report+Header+in+Crystal+ReportHow to pass value from Report Footer to Report Header in Crystal Report <p>Dear&nbsp;All</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am using crystal report which comes with VS 2008. In my report I have a column called Status. My status can be Active,Inactive and Closed. Our Client needs the summary as</p> <p>No. Of Active Fleets:</p> <p>No. Of InActive Fleets:</p> <p>No. Of Closed Fleets:</p> <p>ON THE PAGE HEADER OF THE REPORT.</p> <p>For this I have used count function&nbsp;in the Report Footer which works fine.But I need&nbsp;in Report Header. Is there&nbsp;any &nbsp;trick to&nbsp;pass the value from Report Footer to Report Header??? It's really killing me like anything.......please help</p> 2010-01-14T06:35:10-05:002010-01-14T06:35:10.03-05:00urn:uuid:00000000-0000-0000-0000-000005402140http://forums.asp.net/p/1908782/5402140.aspx/1?Crystal+Report+ErrorCrystal Report Error <p>Hai all,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Crystal report show an error after publishing</p> <p>5/22/2013 4:47:28 PM Report Viewer Page Load :-CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---&gt; System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C&#43;&#43; stack.<br> at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object&amp; DocumentPath, Int32 Options)<br> at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object&amp; DocumentPath, Int32 Options)<br> at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()<br> --- End of inner exception stack trace ---<br> at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()<br> at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)<br> at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)<br> at Peppers_Head_Office_App.ReportViewer.Page_Load(Object sender, EventArgs e) in E:\Applications\Peppers Application\SVN Peppers\Peppers_Head_Office_App\Peppers_Head_Office_App\ReportViewer.aspx.cs:line 52</p> <p></p> <p>pls help me</p> <p>thank u</p> <p>syam</p> 2013-05-22T11:32:30-04:002013-05-22T11:32:30.193-04:00urn:uuid:00000000-0000-0000-0000-000005400416http://forums.asp.net/p/1908373/5400416.aspx/1?Help+needed+with+CR+12Help needed with CR 12 <p>&nbsp;</p> <p>Hi everyone,</p> <p>I want to do reporting in CR 12 since my web server supoorts only CR 12.</p> <p>I tried to do the reporting using VS 2010 but the output is in CR 13 version.</p> <p>I tried VS 2008 but the output is in CR 9</p> <p>Can anyone point me to the right way to get CR 12 version ?</p> <p>Thanks.</p> <p></p> <p>&nbsp;</p> <p></p> <p>&nbsp;</p> <p></p> <p>&nbsp;</p> <p></p> <p>&nbsp;</p> <p></p> <p>&nbsp;</p> <p></p> <p>&nbsp;</p> 2013-05-21T05:13:44-04:002013-05-21T05:13:44.47-04:00urn:uuid:00000000-0000-0000-0000-000005402711http://forums.asp.net/p/1908915/5402711.aspx/1?Updating+existing+formula+causing+issues+with+unrelated+formulaUpdating existing formula causing issues with unrelated formula <p>Hi all</p> <p>have a weird issue here. I am currently running Crystal Reports 2011. I have a multiple totals fields which totals up different payment types. I updated one of these payment type totals and now it has affected a number of other payment type totals.</p> <p>The only thing they have in common is the running sum variable sitting within those 2 formula are sitting in a Calc_all formula and to fix this issue i had to remove the specific payment types running sum code from&nbsp;my calc_all formula and then save the formula. Open the calc_all formula and re-copy the exact code in and re-save it. This would fix the issue.</p> <p>Has anyone come across this type of issue before? i am planning to do code changes in the future and it is&nbsp;affecting multiple payment types as this is a huge report, subtotals and grand totals for these fields. Its very random as well so i dont really want to do the above fix everytime as i would need to reconcile each total and only target that specific code only. I cant delete all the code within Calc_All, save and repopulate and save again, I need to specifically target only that running sum formula.</p> <p>thanks</p> <p>&nbsp;</p> <p>&nbsp;</p> 2013-05-22T23:41:36-04:002013-05-22T23:41:36.323-04:00urn:uuid:00000000-0000-0000-0000-000005394575http://forums.asp.net/p/1906183/5394575.aspx/1?How+to+pass+query+to+sub+report+of+Crystal+report+from+asp+netHow to pass query to sub report of Crystal report from asp.net <p>&nbsp;Hi</p> <p>I have written code for passig query to sub report from asp.net,c#.but the query displays all the records even if &nbsp;i give where cluase in sql query</p> <p>Please refer the code below</p> <pre class="prettyprint">protected void Button1_Click(object sender, EventArgs e) { TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); CrystalDecisions.CrystalReports.Engine.Database crDatabase; CrystalDecisions.CrystalReports.Engine.Tables crTables; ReportDocument doc = new ReportDocument(); doc.Load(Server.MapPath(&quot;CrystalReport1.rpt&quot;)); crConnectionInfo.ServerName = &quot;newserver&quot;; crConnectionInfo.DatabaseName = &quot;&quot;; crConnectionInfo.UserID = &quot;&quot;; crConnectionInfo.Password = &quot;; crConnectionInfo.Type = ConnectionInfoType.SQL; crConnectionInfo.IntegratedSecurity = false; crDatabase = doc.Database; crTables = crDatabase.Tables; string sqlCon = &quot;&quot; SqlConnection conn = new SqlConnection(sqlCon); conn.Open(); string sql123 = &quot;select * from jobs where JobNumber=&quot; &#43; TextBox1.Text &#43; &quot;&quot;; SqlCommand cmd = new SqlCommand(sql123, conn); cmd.CommandType = CommandType.Text; SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet dataSet = new DataSet(); adpt.Fill(dataSet, &quot;Customers&quot;); foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables) { crTableLogOnInfo = crTable.LogOnInfo; crTableLogOnInfo.ConnectionInfo = crConnectionInfo; crTable.ApplyLogOnInfo(crTableLogOnInfo); } doc.SetDataSource(dataSet.Tables[0]); conn.Close(); sqlCon = &quot;&quot;; conn = new SqlConnection(sqlCon); conn.Open(); string sql1234 = &quot;select * from JOBSDOCUMENTS where JobNumber=&quot; &#43; TextBox1.Text &#43; &quot;&quot;; cmd = new SqlCommand(sql1234, conn); cmd.CommandType = CommandType.Text; adpt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adpt.Fill(ds, &quot;Customers1&quot;); doc.Subreports[&quot;CrystalReport2.rpt&quot;].SetDataSource(ds.Tables[0]); CrystalReportViewer1.ReportSource = doc; }</pre> <p>Thanks</p> <p>chandran<br> <br> </p> <p></p> 2013-05-15T10:34:58-04:002013-05-15T10:34:58.347-04:00urn:uuid:00000000-0000-0000-0000-000005401134http://forums.asp.net/p/1908516/5401134.aspx/1?Get+Crystal+Report+data+in+sessionGet Crystal Report data in session <p>I have noticed that crystal report runs the Linq query once again when the page index is changed, means when we load second page from first page? So just wanted to know if we can get which page is loaded so that we can keep values in session.</p> <p>Just a hint is required as I am not getting the desired results from Google.</p> <p><strong>Update: I am sorry in a hurry I just clicked on a wrong tag.</strong>&nbsp;So the problem is like:</p> <p>This is my code below which I use fr running my crystal report:</p> <pre class="prettyprint">var rpt = new Result(); List&lt;class&gt; lst1 = new DALMethod().Get(); rpt.SetDataSource(lst1); CRReportViewer.ReportSource = rpt;</pre> <p>When I switch from page one to two or more, this method in DAL is called again taking the same time it took first time to load, so I just want to have the data in session when query runs first time, and next time when I get the page index, then I will show data from session.</p> <p>Is there a way around by which I can get the page index in this c# code?</p> 2013-05-21T14:23:31-04:002013-05-21T14:23:31.25-04:00urn:uuid:00000000-0000-0000-0000-000005399429http://forums.asp.net/p/1908146/5399429.aspx/1?Cross+Tab+report+Cross Tab report <p>Sample/Example step by step &nbsp;report &nbsp;for Cross tab &nbsp;</p> 2013-05-20T07:52:52-04:002013-05-20T07:52:52.18-04:00urn:uuid:00000000-0000-0000-0000-000005391355http://forums.asp.net/p/1905407/5391355.aspx/1?show+decimals+exactly+as+they+areshow decimals exactly as they are <p>Hi,</p> <p>is there any way to show decimal numbers&nbsp;exactly&nbsp;as they are?</p> <p>for example I want to show 169.50 not 170</p> <p>and 0.2589</p> <p>exactly 0.2589</p> <p>Thanx</p> 2013-05-12T04:42:21-04:002013-05-12T04:42:21.433-04:00urn:uuid:00000000-0000-0000-0000-000004352202http://forums.asp.net/p/1665429/4352202.aspx/1?To+hide+a+section+of+Crystal+Report+ProgrammaticalyTo hide a section of Crystal Report Programmaticaly <p>I wanted to hide a sectionof crystal Report progarammatically using a formula. How is it possible?</p> 2011-03-22T06:40:50-04:002011-03-22T06:40:50.86-04:00urn:uuid:00000000-0000-0000-0000-000005395720http://forums.asp.net/p/1906438/5395720.aspx/1?How+to+print+all+page+in+RDLC+report+using+JAVASCRIPT+or+any+other+wayHow to print all page in RDLC report using JAVASCRIPT? or any other way <p>Hi all,</p> <p>I am using ReportViewer in ASP.net 2.0. It was a local Report and bind data from Dataset. It was workd well . But , My problem was, when i need to go print , i cann't do it. I searched google and found solution using Javascript.</p> <p>Get Html code by using document.getElementbyID(controlname).innerHTML().</p> <p>Write that code to New window.&nbsp; And then print page by using window.print() function.</p> <p>But , the problem is it only prints first page, Not all pages. If my report goes to more than one page, Print first page only. Can you help me please?.</p> <p>(OR)</p> <p>How to print report in reportviewer. It should be worked in IIS or client machine.</p> <p></p> <p>Thanks in advance...</p> 2013-05-16T09:18:47-04:002013-05-16T09:18:47.623-04:00urn:uuid:00000000-0000-0000-0000-000005388702http://forums.asp.net/p/1904826/5388702.aspx/1?Crystal+report+not+viewing+after+publish+asp+net+page+Crystal report not viewing after publish asp.net page <p>hai,</p> <p>&nbsp; &nbsp;&nbsp;Crystal report not viewing after publish asp.net page &nbsp;</p> <p>&nbsp; &nbsp; i am using .net framework 4.0 vs2010 sap crystal report&nbsp;</p> <p>&nbsp; &nbsp;i nstalled&nbsp;CRRuntime_32bit_13_0 on my machine&nbsp;</p> <p>pls help me to clear this error</p> <p>thank you..</p> <p>syam</p> 2013-05-09T05:15:06-04:002013-05-09T05:15:06.01-04:00urn:uuid:00000000-0000-0000-0000-000004834696http://forums.asp.net/p/1770099/4834696.aspx/1?creating+a+dynamic+crystal+report+with+asp+net+2+0+i+e+VS+2005creating a dynamic crystal report with asp.net 2.0 i.e., VS 2005 <p>Hi,</p> <p>I have a procedure where the number of columns in not constant. It changes based on the search criteria.</p> <p>Now i need to build a crystal report based on the result of that stored procedure.</p> <p>I am never created dynamic report. Can someone help me in this</p> <p></p> <p>Thanks in Advance</p> 2012-02-15T22:17:01-05:002012-02-15T22:17:01.7-05:00urn:uuid:00000000-0000-0000-0000-000005391597http://forums.asp.net/p/1905460/5391597.aspx/1?crystal+report+issue+after+printcrystal report issue after print <p>Hi,</p> <p>I am from hyd,i am working on asp.net application with crystal reports,when I generate button,crystal Report is generating success fully,</p> <p>then i am pressing print button button,now print window is genarating and print is coming successfully,then my issue is,now i want to cancel</p> <p>&nbsp;my crystal report,now crystal report is not working properly,cancel is not working after print is completed,</p> <p>can any one guide me pls,how to work with crystal report after print</p> 2013-05-12T15:49:54-04:002013-05-12T15:49:54.28-04:00urn:uuid:00000000-0000-0000-0000-000005303361http://forums.asp.net/p/1883148/5303361.aspx/1?Crystal+Reports+forcing+next+pageCrystal Reports - forcing next page <p>Hello everyone;</p> <p>I have a crystal report in my program (using VS 2008, SQL Database) to print a corporate check (standard STUB/CHECK/STUB format). On the STUB, it prints out all of the invoices that the check is for. This is done in a subreport and it works fine. What I would like it to do it is if the number of invoices exceeds 12, force it to a second page because only 12 invoices fit on a check stub. The second page would be a VOIDED CHECK (XXXX.XX) but would print the remaining invoices over 12 on the stub. For example, if my check batch had a vendor where I selected 20 invoices to pay with one check, on page one it would list the first 12 invoices on the check stub, total all 20 invoices and create a check for the full amount, then on page two, print the remaining 8 invoices on the stub and void the check on the second page. Right now my program and the crystal report&nbsp;works fine if you print 12 or less invoices on a stub - no more than 12 invoices fit on a stub. If I have more than that in my check batch, the check prints correctly but only the first 12 invoices will print out on the crystal report in the space provided on the stub. I need to force it to print to a second page so that the remaing invoices print out on the stub so that I can mail one check (totalled correctly), with two check stubs (from page one and page two). Can anyone give me some insight?</p> <p>Thank you.</p> <p>Todd</p> <p>&nbsp;</p> 2013-02-16T06:13:53-05:002013-02-16T06:13:53.077-05:00urn:uuid:00000000-0000-0000-0000-000005389928http://forums.asp.net/p/1905109/5389928.aspx/1?Display+image+in+crystal+report+Display image in crystal report. <p>I have to display image in&nbsp;crystal report. Image is strore in image folder and path is store in database.</p> <p></p> <p></p> 2013-05-10T07:50:36-04:002013-05-10T07:50:36.283-04:00urn:uuid:00000000-0000-0000-0000-000005386999http://forums.asp.net/p/1904392/5386999.aspx/1?How+to+create+a+Crystal+Report+on+a+Single+Page+How to create a Crystal Report on a Single Page? <p>Sorry to ask this silly question, but I'm a newbee to .NET Environment, I know how to call a Crystal Report in ASPX using C#, but the problem is, I want to pass @Parameters to the report from the Page, like Date (From, To) and Combo Box values. I've searched a lot for this, but didn't found a solution which I can easily understand.</p> <p>Kindly, if any body can provide some sample code to call Crystal Report on a Single ASPX Page.<br> Thanx in Advance!&nbsp;</p> 2013-05-07T13:47:12-04:002013-05-07T13:47:12.84-04:00urn:uuid:00000000-0000-0000-0000-000005387776http://forums.asp.net/p/1904580/5387776.aspx/1?My+rdlc+report+doesn+t+show+Print+ButtonMy rdlc report doesn't show Print Button <p>Hi,</p> <p>my rdlc report doesn't show print button though I have showPrintButton properties True</p> <pre class="prettyprint">&lt;rsweb:ReportViewer ID=&quot;ReportViewer1&quot; runat=&quot;server&quot; BorderColor=&quot;#0066FF&quot; BorderStyle=&quot;Solid&quot; BorderWidth=&quot;1px&quot; Width=&quot;800px&quot; Height=&quot;700px&quot; ShowPrintButton=&quot;true&quot; ShowRefreshButton=&quot;False&quot;&gt; &lt;/rsweb:ReportViewer&gt;</pre> <p>pls solve me<br> <br> </p> 2013-05-08T08:17:05-04:002013-05-08T08:17:05.51-04:00