473,382 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Crystal Report: Format Horizontal Alignment

Hello,

Is there a way to format the data when it is passed into the Crystal
Report(CR).. for example.. In the original table, a number may be
left aligned, how to change it to right alignment?.. in other words I
want to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.

thanx

Nov 20 '05 #1
2 12438
Hi BlackDevil,

This is how i do it :

Dim crreportobject As
CrystalDecisions.CrystalReports.Engine.ReportObjec t

For Each crreportobject In
crReportDocument.ReportDefinition.ReportObjects
'' formats text object
If TypeOf (crreportobject) Is
CrystalDecisions.CrystalReports.Engine.TextObject Then
Dim crtextobject As
CrystalDecisions.CrystalReports.Engine.TextObject
If Trim(crreportobject.Name) = "Text2" Then
crtextobject = DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.TextObject)
crtextobject.Text = "Hi"
End If
End If
'' formats field object
If TypeOf (crreportobject) Is
CrystalDecisions.CrystalReports.Engine.FieldObject Then
Dim crtextobject As
CrystalDecisions.CrystalReports.Engine.FieldObject
If Trim(crreportobject.Name) = "Field73" Then
crtextobject = DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.FieldObject )

crtextobject.ObjectFormat.HorizontalAlignment =
Alignment.RightAlign
End If
End If
Next

Kind Regards
Jorge
-----Original Message-----
Hello,

Is there a way to format the data when it is passed into the CrystalReport(CR).. for example.. In the original table, a number may beleft aligned, how to change it to right alignment?.. in other words Iwant to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.

thanx

.

Nov 20 '05 #2
Hello Jorge,

Sorry, need to ask you something.

1. What crReportDocument? Is it the name of your Crystal Report or
something else?

a)........because when I change from
crReportDocument.ReportDefinition.ReportObjects()
to
[b:ba3448b144]report[/b:ba3448b144].ReportDefinition.ReportObjects()
(dim Public report As CrystalReport1 = New CrystalReport1) it there
are some incorrect syntax such as with
crreportobject.Name,
[i:ba3448b144]DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.TextObject) [/i:ba3448b144],
and [i:ba3448b144]crtextobject.Text[/i:ba3448b144],
[i:ba3448b144]crtextobject.ObjectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.RightAlign().[/i:ba3448b144]

b) if i dont change it, [b:ba3448b144]crReportDocument[/b:ba3448b144]
needs declaration..and
[i:ba3448b144]crtextobject.Text[/i:ba3448b144],
[i:ba3448b144]crtextobject.ObjectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.RightAlign().[/i:ba3448b144] and
[i:ba3448b144]DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.FieldObject )[/i:ba3448b144]
has syntax error.

c) If I change it to
[b:ba3448b144]OrrasReport.[/b:ba3448b144]ReportDefinition , it stated
that reference to non-shared member requires an object reference. and
the same other syntax error in b).

thanks

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raghu | last post by:
Hi, In my ASP.NET web application project we need to design crystal reports with Crystal Reports version 8.5 enterpraise edition(Please Note:It is not the Crystal Reports that comes with...
1
by: Stephanie Stowe | last post by:
I am doing a support rotation for our massive ASP app. We use Crystal Reports / Enterprise. By some magic which I am unfamiliar with Crystal Enterprise allows the creation of a report on the...
3
by: Colin Graham | last post by:
I have recently created a report in crystal(10) linking to a dataset as the datasource. I notice however that the fields available in the report all have STRING format and therefore i cannot change...
1
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box...
6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
7
by: Susan Bricker | last post by:
I would like to generate a report (I have the report working already) using MS/ACCESS 2000 and then have the ability to send the report as an email attachment to my colleagues. I have looked...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: Big George | last post by:
Hello Gurus, I'm developing with VS2003, ASP.NET with Crystal Report for VS.NET, and I need to change the paper orientation of a Crystal Report to Horizontal... How to do that? I tried to...
1
by: xUser | last post by:
Hi, We are developing a new application with .NET 2.0, Oracle and Crystal Reports. Our reports are deployed at Crystal Management Server and are accessed from .NET application using the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.