Hiding Blank column spaces in crystal reports
Hello,
I would like to completely hide a column in crystal reports. I can hide the column details however this leaves a blank space in that column position. Is it possible to hide the blank spaces and rearrange the other columns such that no blank space will be visible ?
Kind Regards,
hello Roc,
u did not mention that the hidden field will be displayed when a certain condition is meet. here is a alternative as ur workaround. make a formula field i.e
if <Condition> = true
then Display Field 1
else
Display Field 2
best regards,
Fidel
Similar Messages
-
Column limits for Crystal Reports for Eclipse
Hi ,
Is there any column limits for Crystal Reports for Eclipse. While i am trying in my environment, if i am include more than 18 columns its wont show the preview as well as it throws error like as follows "java.lang.NullPointerException at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991) at java.lang.Double.valueOf(Double.java:447) at oracle.sql.NUMBER.toDouble(NUMBER.java:326) at oracle.jdbc.dbaccess.DBConversion.NumberBytesToDouble(DBConversion.java:2975) at oracle.jdbc.driver.OracleStatement.getDoubleValue(OracleStatement.java:4485) at oracle.jdbc.driver.OracleResultSetImpl.getDouble(OracleResultSetImpl.java:567) at com.crystaldecisions.reports.common.data.JdbcCrystalResultSet.getDouble(Unknown Source) at com.businessobjects.reports.jdbinterface.common.ResultSetReader.readColumnValue(Unknown Source) at com.crystaldecisions.reports.queryengine.ResultSetRecordReader.a(Unknown Source) at com.crystaldecisions.reports.queryengine.Rowset.a(Unknown Source) at com.crystaldecisions.reports.queryengine.RowsetColumn.xL(Unknown Source) at com.crystaldecisions.reports.queryengine.Rowset.z1(Unknown Source) at com.crystaldecisions.reports.queryengine.Rowset.bN(Unknown Source) at com.crystaldecisions.reports.queryengine.Rowset.bI(Unknown Source) at com.crystaldecisions.reports.queryengine.RowsetBase.bJ(Unknown Source) at com.crystaldecisions.reports.queryengine.RowsetBase.za(Unknown Source) at com.crystaldecisions.reports.datalayer.a$e.za(Unknown Source) at com.crystaldecisions.reports.basicdataengine.a.w(Unknown Source) at com.crystaldecisions.reports.basicdataengine.a.p(Unknown Source) at com.crystaldecisions.reports.basicdataengine.a.a(Unknown Source) at com.crystaldecisions.reports.datalayer.a.do(Unknown Source) at com.crystaldecisions.reports.datalayer.a.a(Unknown Source) at com.crystaldecisions.reports.dataengine.m.b(Unknown Source) at com.crystaldecisions.reports.dataengine.j.b(Unknown Source) at com.crystaldecisions.reports.dataengine.m.o(Unknown Source) at com.crystaldecisions.reports.dataengine.m.a(Unknown Source) at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source) at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source) at com.crystaldecisions.reports.dataengine.j.case(Unknown Source) at com.crystaldecisions.reports.dataengine.h.(Unknown Source) at com.crystaldecisions.reports.dataengine.DataContext.a(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.new(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.try(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.int(Unknown Source) at com.crystaldecisions.reports.dataengine.DataProcessor2.I(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.fl(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.if(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.X(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.moveToPageN(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.lightmodel.FCMPageFormatter.goToPage(Unknown Source) at com.businessobjects.crystalreports.designer.core.elements.formatted.MultiPageModel.B(Unknown Source) at com.businessobjects.crystalreports.designer.core.elements.formatted.MultiPageModel.A(Unknown Source) at com.businessobjects.crystalreports.designer.core.elements.formatted.FormattedPages$2.A(Unknown Source) at com.businessobjects.crystalreports.designer.core.elements.formatted.FormattedPages$2.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(Unknown Source) at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$_B.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595)".
But i removed any one column, it wont make any problem and able to preview. Whenever put more than 18 columns, its throwing issue. Can you please help me to identify the issue.
Regards, SibyHi,
Are you talking about the fields coming from the Data Source Explorer?.
If "Yes" then there is no such limits.
Are you able to run the report through the eclipse designer?
Thanks,
Neeraj -
Remove Blank Space from Crystal report
Hello,
i am new in crystal report work.
recently, i have created one crystal report which display item and remaining other detail like tax detail,item grand total, Some extra remark,etc.
But my scenario is that if i take three or more item then it take two page that's ok. on that case i have no problem,
but if i take only single item it will take two pages.
how can i remove unnecessary area.
i attached below image for better understanding.
i also provide crystal report if required.
if there is image not visible then i also attach below.
Plz... Help me ASAP.
Thanks,It seems like your tax detail section is another sub report please compact the subreport if attached.
Right click on the object and select Format Object > checkbox "Supress Embedded Field Blank Lines"
Right Click on the section and click "Fit Section" -
How do add column to a Crystal report 8.5
Post Author: Jsantos
CA Forum: Data Connectivity and SQL
Hi guys, I would like some help.
I have a VB Form in VB 6 that call a report made in Crystal report 8.5 and I want add a column of a SQL Server 2000's table
inside this report called reportSales
I already Add a table inside this report clicking in Main report,......."aDD database to report..." etc.
and drag this column called col_1 to report in group Footer
my Vb 6 code is below :
When I make a Debug the variable ls_Location received the new table that I added to link 1 field.
but tha happened when I load the report is that just appear 2 columns an not 16.
With reportSales
' Conect to SQL Call .Database.LogOnServer(DLL_CRYSTAL, ls_Dsn, ls_Database, ls_Username, ls_Password) '''' manage tables
For Indice = 1 To .Database.Tables.Count Call .Database.Tables(Indice).SetLogOnInfo(ls_Dsn, ls_Database, ls_Username, ls_Password) ls_Location = "dbo." & .Database.Tables(Indice).Name Call .Database.Tables(Indice).SetTableLocation(ls_Location, Empty, Empty) Next Indice Call .ParameterFields.Item(1).ClearCurrentValueAndRange Call .ParameterFields.Item(1).AddCurrentValue(m_cod_picking)
End With
CR.ReportSource = reportSales Call CR.ViewReport Screen.MousePointer = vbDefault
thanks!!!If you still have a working install you can use regedit to get the keycode from the Local Machine key. Other than that you'll have to find the original CD packaging where you'll find the keycode on the packaging. Or check with your accounting department, they may have received an invoice with the keycode on it, I don't think we did that but worth trying.
-
First page appears blank when viewing a Crystal Report in the web viewer
I have seen threads and KB articles regarding this issue but the suggested solutions do not correct the issue. (KB articles [1423482 and 1439109)
The issue only started after upgrading from CR 2008 runtime to CR 2008 SP4 runtime.
When the page containing the viewer control first loads, the report pane is completely blank.
The viewer toolbars appear as expected, and the report can be exported using the Export button on the viewer toolbar without issue.
Changing the zoom level causes the first page of the report to appear as expected, and reverting the zoom level does not cause the report pane to become blank again.
Navigating to the next page of the report works and the second page appears as expected. Returning to the first page shows the first page of the report as expected.
Our application is installed on dozens of servers but this issue only has occurred on a few installations at this time.
Steps attempted to resolve the issue:
1. Uninstall CR 2008 SP4 runtime, confirm the CrystalReportViewers12 folders were removed from the folders C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727 and C:\Program Files\Business Objects\Common\4.0, then reinstall CR 2008 SP4 runtime.
2. Ensure there are no underscores in the server name.
3. Change the crystalreportsviewers12 Virtual Directory to use the folder C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\CrystalReportViewers12
4. Remove and recreate the crystalrep[ortviewers12 Virtual Directory.
5. Replace the C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\CrystalReportViewers12 folder from a server that does not exhibit the issue.
Any new ideas or suggestions? ThanksMoving post to .NET SAP Crystal Reports forum
Hello Scott
What browser are you using and what is the version of the browser?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Adding the columns dynamically in crystal report
Hi,
I am developing a application using asp.net and crystal report. In a report the column is created dynamically( ie, the report gets input from a sp which returns N no. of columns). Since i dont know the column name and no. of columns at design time i am not able to create the report. If any of you have any idea on adding the columns dynamically please send me the code or the link.
Thanks
SankarHello Sankar,
please see CS code for VS 2005 below to add a database field to a report using inproc RAS.
This sampels retrieves the table column name from the database and adds it to the report.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.ReportAppServer.ClientDoc;
using CrystalDecisions.ReportAppServer.DataDefModel;
namespace CS_Add_Field_inproc
public partial class Form1 : Form
// CR Declarations
ReportDocument boReportDocument;
ISCDReportClientDocument boReportClientDocument;
CrystalDecisions.ReportAppServer.ReportDefModel.Section boSection;
CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject boFieldObject;
public Form1()
InitializeComponent();
//Create a new ReportDocument
boReportDocument = new ReportDocument();
// load the RPT file
boReportDocument.Load("..
AddField.rpt");
//Access the ReportClientDocument in the ReportDocument (EROM bridge)
boReportClientDocument = boReportDocument.ReportClientDocument;
//Get the first section in the details section
boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
//Create the field object that we will add to the report and set all of its properties
boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
//Set which field to use for the data to be displayed
boFieldObject.DataSourceName = "{Customer.City}";
boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
boFieldObject.Left = 4 * 1440; //1440 twips per inch
boFieldObject.Width = 3 * 1440;
boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
boFieldObject.FontColor.Font.Name = "Arial";
boFieldObject.FontColor.Font.Size = 10;
boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
//Add the object to the report
boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument;
private void button1_Click(object sender, EventArgs e)
//Get the first section in the details section
boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
//Create the field object that we will add to the report and set all of its properties
boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
//Set which field to use for the data to be displayed
boFieldObject.DataSourceName = "{Customer.City}";
boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
boFieldObject.Left = 4 * 1440; //1440 twips per inch
boFieldObject.Width = 3 * 1440;
boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
boFieldObject.FontColor.Font.Name = "Arial";
boFieldObject.FontColor.Font.Size = 10;
boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
//Add the object to the report
boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument; -
Crystal report weekly summaries
hello
i am using oracle 11g /crystal reports 10 version
i have the following tables
users
=======
user_id number
username varchar2
orders
========
order_id number
user_id number
order_date date
select u.username,o.order_id,o.order_date
from orders o,users u
where o.user_id=u.user_id and order_date between '11-MAY-2011' and '30-MAY-2011'
i have the three columns in my crystal report and users will be prompted to enter date range they need to generate the report
when they do
it has to calculte the following
username,week_1_orders,week_2 orders,rest_orders
week_1_orders=first 7 days orders(in the above example ,its 11,12,13,14,15,16,17 of may 2011 total orders)
week2_2_orders=8-14 days of orders (in the above example ,18,19,20,21,22,23,24 of may 2011)
week_3_orders=rest of the date range
how do i get these summaries
any help is appreciated
thanksHello,
You can compare date field against your date parameter. So, it is OrderDate.
Also you can get summaries for your amounts by following same formula which was suggested by Lan
Also you can follow below formula to calculate summary on amount .
@Week1_Amt
if {Sheet1_.OrderDate} >= {?Startdate} and {Sheet1_.OrderDate} <={?Startdate}+7 then
else 0
Now insert a summary on this formula.
Thanks,
Sastry -
Create Crystal Report Dynamically using XML based design metadata
Hi,
I have a CR Report Development environment. Please refer to workflow and requirement description below;
I have a Java application(Report Customization Tool), which allows users to dynamically select structure and content for a report.
The process goes as follows:
1. In Java Application, user first gets option to select Report Header, Page Orientation, Font etc for master report.
2. User can select a sub-report (pre-developed report frames. Not Sure about tool.) and apply the same format option (mentioned in step 1, except orientation) to it.
3. User can select individual row/data cell to be displayed on the report through reference to DB tables in sub-reports.
4. There can be N number of sub-reports each with independant formatting, data and data layout that could be integrated in single report.
5 Once all selection is done, Java code generates an XML with all this info.
Now, my requirement is dynamically write CR report based on this XML. I am not using BO enterprise, hence RAS SDK is out of scope. This report will be called thorough stand-alone .NET application in CITRIX environment.
Can we do it in CR XI/CR 2008?
Please feel free to comment in case you need more info. But I won't be able to post screenshots. NDA of course!
Thanks in advance.I moved your post to the NET - SAP Crystal Reports forum.
To start, you have a fair bit of work ahead of you. The Crystal reports SDK will not do the job. You will have to use the InProc RAS SDK which is included in both CR XI and CR 2008. I'd recommend going with CR 2008 as CR XI R1 (11.0) is out of support now and CR XI R2 (11.5) will be out of support come June of 2011. Next, make sure you have applied SP 3 for CR 2008:
https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
As an FYI, all files can be found on the downloads page:
http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm
Next, you want to read up on RAS. I suggest the following:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
Samples are here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
and here:
http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]
I also find this 3rd party link useful:
http://book.soundonair.ru/sams/
And as always, search these forums. Lots of info here. E.g.;
Programaticaly add Table in CR database fields
InProc RAS Issue
Adding the columns dynamically in crystal report
Also, see the search box at the top right of this page. It searches blogs, wikis, Kbases, articles and more - all in one go.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup -
Crystal Report multiple columns
I'm having trouble with Crystal Report's multiple columns in the detail section.
The details section, the multiple columns is checked then the printing direction is across - down. Since the form I am using is a pre-printed form, by estimation it can only allow at best 30 records in one page, that is 15 in the 1st half of the column and another 15 records on the next. For visual:
Invoice No Invoice Date invoice total Invoice No Invoice Date invoice total
1 16
2 17
3 .
. 28
14 29
15 30
For some reason there is this giant space after the last set of rows before it prints out the page footer. This giant blank section disrupts the layout of the page footer section.
Here are some info on the details section as configuration is involved:
Format with Multiple Columns - checked
In Paging: New Page after 30 visible Records
In Layout: Width: 3.5 in Height: 0.0 in
Horizontal: 0.0 in Vertical: 0.0 in
Printing Direction: Across-Down
Anyone knows how to suppress it or have the page footer move upwards?
P.S To see actual pre-printed form, please download this [http://www.mediafire.com/i/?csu0q75mjynys2k]
Edited by: Khristine Angelei Basilla on Mar 1, 2012 8:34 AMNow why didn't I try that out. Actually, initial plan was 2 subreports.
So when I added the second subreport in the group footer section, it only prints the details on the last page, which should not be the case as I need to be printed on all pages.
I'll test it out. I'll post an update soon.
Thanks. -
Crystal Report XI - Mulitple Columns Grouping
Hi,
I created a report in crystal report XI having the following structure:
Main Report Structure
Page Header (Report Title, Date and displayed Columns Title)
Group Header (Group header will be displayed)
Details - a (Records List will be populated)
Group Footer (Sub Report which displays the Notes in tabular format)
Page Footer (Page number will be displayed)
I kept 'keep together' for 'Group Footer' section.
Sub Report Structure
Group Header (No contents will be displayed here)
Details - a (Header)
Details - b (Content)
Group Footer (blank section)
In the sub report, the Details section was set for multi columns with across and then down property. The Details section width was set such that at max 3 columns will fit. Also 'keep together' property was set for the details sections so that both header and its content will always stay together. (Assume that the sub report data will be displayed like rows of data with each row having 3 cells.)
Both main and sub reports picks the required data from database stored procedure.
My Problem
As 'Group Footer' section in main report was kept 'keep together' some times more empty space was leaving at the bottom of the pages in the main report.
So i tried to remove 'keep together' option for 'Group Footer' section in the main report. By doing this the empty space was now reducing by splitting the subreport rows in multiple pages.
So far fine but the problem arises when the first row second cell or first row third cell data is large enough so that it can't fit at the bottom of the page in the available space. So because of this, the cells in a row are splitting between the pages.
Either i want to display the entire row with all the 3 cells at a time or blank in the pages' available space for 'Group Footer' section in main report.
(I don't want to split the cells in the rows. I want entire row with all the 3 cells to be displayed at once.)
Can any one suggest me how can i fix this?
I hope i clearly presented my problem. If not, let me know where you want more clear.
Thanks in advance.
Edited by: Syarnus2 on Jul 15, 2009 11:48 AMHi Sanjay,
Thanks for your advice.
But the thing you mentioned won't solves my problem.
If i choose your option then suppose there are 3 rows and 3 cells in each row in the sub report.
For all the 3 rows, beside the title(for each cell) contents may also present(which i already mentioned).
Now assume that content in each cell varies from 0 to 25 lines within in the row cell.
So by keeping all the rows in the group together, the page is leaving with much empty space whenever the entire section (even the last line in the last row of the group) can't fit in the remaining space in the page. Which i want to avoid by splitting the rows (rows only not the cells in the rows) between the pages.
Hope i make the point much clear... -
How to supress/Minimise space if no data is given in a crystal report
Dear members,
I have designed a report through crystal report and in that,i have a field namely remarks in group section.
during the generation of report if there is no remarks given there is a empty space shown in that place. which i need to avoid. please can anyone help me in this regard as how to minimize the space if no data is given to the field of remarks.
Thanks to all,
Venkatesh.RHi Venkatesh.R,
Right click on the section you want to supress and check on the box labelled Suppress blank section.
I highly suggest you search Crystal Reports Help before posting questions like this. Simply press the F1 key and the help menu will appear.
Thank you
Don -
Get blank report in Crystal Report Viewer when exporting to PDF
I have an application that creates reports in the CrystalReportViewer while at the same time exports a PDF of that report. I am having a problem in which
performing the export causes the report in the ReportViewer and the PDF report to be blank. They have the header and column labels but no data. If I
comment out the Me.Export(reportExportOptions) line at the end of the exportPDFReport method the report in the ReportViewer works fine, displaying
data on the report.
I have other forms that perfrom this same type of function on different reports and work fine. In fact they use the same exportPDFReport method. This leads
me to believe that a difference in the reports may be causing the problem. But I can't figure out why.
I am using .net 3.5 with Crystal Reports 2008 (CR2008) full edition in Visual Studio 2008. Although the reports that work were probably created using
VS 2005 and the VS 2005 edition of Crystal, and which have since been updated to CR2008.
Has anyone else experienced this problem? If so, how did you resolve it?
Thanks for any help!
Code is below
Public Class frmAgedReceivables
Inherits CustomWinControls.CustomForm
Implements ICustomForm
... other properties and methods
Public Sub CreateAgedPremiumsReport()
Dim billingType As String = "Direct"
Dim reportType As String = String.Empty
Dim frmDateProcess As New frmEnterProcessMonth()
frmDateProcess.pikMonthYear.Value = TurmsController.CodeEffectiveDate
frmDateProcess.lblMessage.Text = "Enter Processing Date"
If frmDateProcess.ShowDialog(Me) = Windows.Forms.DialogResult.Cancel Then
Return
End If
Me.InForceStripStatusLabel1.Text = "Creating Report"
Me.Refresh()
Dim report As New AgedReceivablesReport()
report.Load(report.ReportPathAndName)
Me.Refresh()
Dim reportParmsArrayList As ArrayList = New ArrayList()
reportParmsArrayList.Add(report.ParameterFields.Item(0).Name)
reportParmsArrayList.Add(frmDateProcess.pikMonthYear.Value)
reportParmsArrayList.Add(report.ParameterFields.Item(1).Name)
If AgencyBillRadioButton.Checked Then
billingType = "Agency"
End If
reportParmsArrayList.Add(billingType)
reportParmsArrayList.Add(report.ParameterFields.Item(2).Name)
reportParmsArrayList.Add(TurmsController.CurrentUser.UserName.Value)
reportParmsArrayList.Add(report.ParameterFields.Item(3).Name)
If NAICCheckBox.Checked Then
reportType = "NAIC"
End If
reportParmsArrayList.Add(reportType)
Dim parms As String() = {frmDateProcess.pikMonthYear.Value, billingType, reportType}
Me.InForceStripStatusLabel1.Text = "Loading Data"
Me.Refresh()
report.getData(parms)
Dim reportParms() = reportParmsArrayList.ToArray
report.loadParameters(reportParms)
report.ExportFileName = Microsoft.VisualBasic.Format(frmDateProcess.pikMonthYear.Value, "yyyyMM") + report.GetType.Name
report.ExportFormat = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
report.exportPDFReport()
Me.CrystalReportViewer1.ReportSource = report
End Sub
End Class
Public MustInherit Class TurmsReport
Inherits CrystalDecisions.CrystalReports.Engine.ReportDocument
Implements _ITurmsReport
... other properties and methods
Public Sub exportPDFReport() Implements _ITurmsReport.exportPDFReport
Dim reportExportOptions As New ExportOptions
Dim reportDiskFileDestinationOptions As New DiskFileDestinationOptions
Dim reportFormatTypeOptions As New PdfRtfWordFormatOptions
reportDiskFileDestinationOptions.DiskFileName = getExportPathAndName(ExportType.PDF)
If Me.UsePageRange _
AndAlso Me.FirstPageNumber > 0 _
AndAlso Me.LastPageNumber > 0 Then
reportFormatTypeOptions.UsePageRange = True
reportFormatTypeOptions.FirstPageNumber = Me.FirstPageNumber
reportFormatTypeOptions.LastPageNumber = Me.LastPageNumber
End If
With reportExportOptions
.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
.ExportDestinationOptions = reportDiskFileDestinationOptions
.ExportFormatOptions = reportFormatTypeOptions
End With
If Not System.IO.Directory.Exists(Me.ExportFilePath) Then
System.IO.Directory.CreateDirectory(Me.ExportFilePath)
End If
Me.Export(reportExportOptions)
End Sub
End ClassPretty much.
Seems I had at one time hard coded a record selection statement that I forgot to remove which caused the report to be blank. That solved my problem, but there still seems to be an issue in that the Crystal Report Viewer performed differently when I tried to export to PDF (no records displayed) then when I didn't (records displayed).
Chip -
Blank space in the report detail section
Hi ,
I have data for ten columns and after that i am getting a blank space, so my report is scrolling to right side without any data.How shall i remove the blank space.Any suggestions.For one more i am getting this only at the second page (Detail section)
Regards,
RajasekarThanks James for the reply,but i am not getting it correctly.
I have a year column which is the last column in my detail section.If i don't get any value for that year column then i am not getting these blank space at the right side of my report.If i have value for the year column then i am getting blank space double the times to my report detail section.
Any suggestions
Regards,
Rajasekar -
1st page is blank in crystal reports?
Post Author: bhappy
CA Forum: Formula
Hi All,
I am generating a report using crystal reports formula fields and parameter fields, i am getting 1st page as blank and remaining pages im getting data??Here i am not using any groups/subreports.
Any body have any idea plz..........
Thanks,Aswath.Post Author: bhappy
CA Forum: Formula
Hi,Thanks for ur replay,I had unchecked all check boxes in the details section except "Suppress Blank Section", Still i donot get any solution....In formula fields im giving space(chrw(13) ie newline character) between one record and another may be that is the problem.I dono what iam going to do now??? Iam displaying records like this,abc 100 200 .......xyz 200 300 ......Any idea plz................. Thanks,Aswath. -
Crystal Reports 10 - Export to TEXT with Delimited Space Format
Hello,
I am new to Crystal reports, sorry if this is a really basic question. I am trying to create a report which I can export to a TXT file. The TXT file format will be delimted space (size 500 characters). I would like to know how I can use Crystal reports to fix the size of the fields.
For example field 1 is 22 characters, field 2 starts directly after field 1 and is 9 characters (9 spaces), field 3 is then 7 characters so an example of the output I need is:
1111111111111111111111 2222222
I will need to use a mixture of TEXT fields and database fields to create the report. Thefore is it possible to specify the length of a text file i.e. TEXT1 = 22?
I am new to Crystal so I hope there is a simple solution without the use of coding
Thanks,
BrettYou will have to force the fields to the length that you are looking for, as Crystal treats strings as variable length strings. So to force a character field to 20 characters, you'd do something like:
left({db.charfield} + ReplicateString(" ", 20), 20)
For a number, you could use either
ToText({db.numfield}, "0000000000")
or
right(ReplicateString(" ", 10) + ToText({db.numfield}, "0"), 10)
(for a 10 digit integer; change the format string in ToText for other numeric data types)
I suggest that it may be clearer and more accurate to create one formula field with the entire line formatted as needed, then just display that one field on the report.
HTH,
Carl
Maybe you are looking for
-
I have an old imac running OSX 10.5.8 which for various reasons was never updated further Processor is 2.4GHz Intel Core 2 Duo memory 2 GB 667 MHz DDR2 SDRAM It has iphoto 08 7.1.5 (378) I also have a macbook Pro. Running OSX 10.7.5 Processor 2.4 GH
-
Is there anyone who can help me?
I am using the jdbc and to access mysql. Here is the part of the code: Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/e-trading"; Connection con = DriverManager.getConnection(url);
-
HDMI and Epson PowerLite X12 Projector
I use a an Epson PowerLite X12 Projector with my computer and Smart Board. (I want the projector to project my computer screen on the board). My new HP Envy doesn't have serial ports so I was told that I could use HDMI. Unfortunately I can't get one
-
Hi, When i am doing WBSE planning through CJR2 transaction, system is not generating any CO document, and i could not able to see the line items in PS standard reports of S_ALR_87013543. Regards, S Vasu
-
I can't use iBook through my iPod touch 4 ,even Wifi is turned on. It said that there was an confuguration problem.I have tried to reinstall iBooks , but it is still not ok. What can I do ??