Thursday, March 29, 2012
Hoe to get Encrypted Password value varbinary field
My login table contains a password field that is a varbinary type. I
encrypted the value by using the encrypt('password') when inserting users
into this table.
How can I see the actual value of the password field. Is there a way to
decrypt?
For some reason, all the users passwords don't work. If I redo each one, it
works but there are too many to redo manually."yodakt" <dev1on11@.gmail.com> wrote in message
news:6E45D35E-970E-4656-AECF-B192BD1035D7@.microsoft.com...
>I just converted from SQL 7 to SQL 2000 but have one issue.
> My login table contains a password field that is a varbinary type. I
> encrypted the value by using the encrypt('password') when inserting users
> into this table.
> How can I see the actual value of the password field. Is there a way to
> decrypt?
> For some reason, all the users passwords don't work. If I redo each one,
> it
> works but there are too many to redo manually.
Try this:
SELECT CAST(myPassword AS NVARCHAR(100))
FROM myTable
Where myPassword is the VARBINARY column containing the passwords.
Tuesday, March 27, 2012
Hmm - unique id is in Binary data - how do I query against it?
I have a 'Select' ciolumn in my gridview that, when selected, will display more details from the selected record. The problem is, how do I pass the selected id back to sql server bearing in mind that it's binary data? Here's what I'm doing at the moment:
I have a function in my data accsess class that queries the database:
Public Function getDetailsById(ByVal Id As System.Byte) As DataSet
Dim con As New SqlConnection(conStr)
Dim cmd As New SqlCommand("SELECT * FROM tableName WHERE Id=@.Id", con)
cmd.Parameters.Add("@.Id", SqlDbType.Binary)
cmd.Parameters("@.Id").Value = Id
Dim ds As New DataSet
Dim adp As New SqlDataAdapter(cmd)
adp.Fill(ds)
Return ds
End Function
And then I call this function from my page with the gridview using:
Dim da As New myDataAccess
Dim ds As New DataSet
ds = da.getDetailsById(GridView1.SelectedDataKey.Value)
But I get the error:
Conversion from type 'Byte()' to type 'Byte' is not valid.
Any ideas where my data/code is going wrong? I'm not sure how to pass this sort of data around?
Thanks
loydall:
Hi - I've got a table in SQL server that has its unique ID field as binary data.
Not trying to be funny... but making your primary key a binary is where you are going wrong.
I know I've queried off of binary fields before, but I don't have any of that code infront of me now.
|||Thanks but it's not my db so I have no control over how the ID is stored...
I've fixed it anyway - I just need to use system.byte() rather than system.byte as a parameter in my function - it obviously needed to treat the data as an array...
|||Make sure you're getting the correct records back... I seem to remember that SQL will store a binary as 0x00000047 where .Net will see the same value as 0x47000000.
|||You are using the wrong ADO.NET command object, you should use ExecuteScalar. Try the link below for complete sample code from Jeff Prosise Programming .NET. The code is in C# but it shows you the correct way to use ExecuteScalar. Hope this helps.
http://kurinjikumaravel.tripod.com/Asp.Net/AspWintellect.txt
History/Data Change File Approach
Who, When, What Field and New Value of Fields
When changes occur to an existing record.
The purpose is for users to occassionally view the changes. They'll want to be able to see the history of the record - who changed what and when.
I figured I'd add the needed code to the stored procedure that's doing the update for the record.
When the stored procedure is called to do the update, the PK and parameters are sent.
The SP could first retain the current state of the record from the disk,
then do the update, then "spin" thru the fields comparing the record state prior to the update and after. Differences could be parsed to a "Changes string" and in the end, this string is saved in a history record along with a few other fields:
Name, DateTime, Changes
FK to Changed Record: some int value
Name: Joe Blow
Date: 1/1/05 12:02pm
Changes: Severity: 23 Project: Everest Assigned Lab: 204
How does the above approach sound?
Is there a better way you'd suggest?
Any sample code for a system that spins thru the fields comparing 1 temporary record with another looking for changes?
Thanks,
PeterHave you considered using a trigger? You can use the inserted and deleted tables to compare your data without having to save it manually. Then insert your data into the history table as you suggested.
We often just save the before image to the history table along with the type of operation performed, the id that was used to perform it and a time stamp. Inserted records are not recorded (because all their data is already recorded on the live table) but deleted ones are. The differences for updated records can be determined at any time by comparing the before image to the next or previous stored image or the current actual record. We rarely actually look at this sort of history however unless data disappears or the customer tells us that there is something else wrong with the data and we need to trace what happened to it.|||ejustuss - thanks for the thoughts.
Good idea about simply saving the before image prior to the actual save of the new one.
Our users are used to systems where they can click a button and see essentially the change history of the record. This particular system is a Work Order system. The status of the WO changes over time, etc.
In other non-SQL Server systems I've developed I have a routine that prior to actual save:
1. saves "before save" copy of record
2. updates the record with new values into the DB
3. peels off an "After save" copy of record
4. runs a routine that compares side by side each field. Any changes are noted in a text variable (field name, new value).
5. Once all the fields are spun thru (compared), if there is any information in the text variable, a "change table" record is created with FK to the parent record, Who Changed it, When changed, and a single text field describing all the changes.
Weeks later when a user is viewing the particular record, they can press a button and have a query run against the change table to bring up a simple list of what changed when.
One wrinkle is that a Work Order has a huge text area. Once a WO is accepted by a lab, this text are becomes "frozen". So if we simply peel off a before save copy each time a user specifies an update - I wouldn't want to needlessly include this particular field due to space considerations.
Bottom line - I was assuming someone might have a canned routine for spinning thru a record comparing all field values against an identical layed out record. I figured there might be a system function or 2 to:
1. Identify how many fields are in a table
2. identify the content of a field - something like @.@.Field(i)
where i=1 to number of fields in the table.
Peter|||I don't know of any function like that although I am sure you can write one.
In triggers you can use IF UPDATE(column) to test if a column is updated but you still have to use the column names which means writing a different trigger for each case . The data in text fields will probably not be accessible within the trigger.
You don't have to save all the fields if you do a before image either just the fields you want to compare in case they are updated.
History Tables
But, what kind of a history element is a date of birth? Everyone has only one date of birth and this information is always valid - 7 years ago, today, next year and in 500 years ...|||Perhaps i didn't explain it correctly.
i need to make a DOB field on an existing order form a required field so that this order may be pulled at a later date to record how many people over a certain age ordered the product. I thought it might be wise to create a history table so that running the query for the report would not cause a drain on the application. am I wrong?|||If you are building a data warehouse, then it would probably make sense. Otherwise, storing "date of birth" column along with "orders" would be an example of denormalized design. Unless there is a good reason to do so, I'd rather see "date of birth" along with customer data (name, address, ...); orders should contain a foreign key column to join "order" with a customer.
Monday, March 26, 2012
History Blocks?
Is it possiable to go through the history blocks and change field names?...ie
I want to change "PS001_Pump1.RT_Daily" to "PS001_Pump1.Runtime_Daily"
so i can access the historical data thru the new tagname.
If so , is this using an udpate query?
I'm not 100% sure I understand your question, but if you need to change a column from one value to another, an UPDATE is the way to go.Wednesday, March 7, 2012
Hiding/unhiding a report field by mouse click
Sunday, February 26, 2012
Hiding Tooltip text displayed when mouse is over a Crystal Report Field
which is displayed when mouse is over a
Crystal Report Field be it a parameter field
or database field in Crsytal Report with
VB.Net.
Thanks in adv.
RitamI am also facing the same problem is there any one available for help??|||I'm using CR 10. Under File -> Options -> Layout Tab there is a checkbox option for Tool tips both in design and preview. Hope that helps.|||You need to put a code in the tag fields... Sorry but thats the only way..
Put Chr(9) in every tag.
FredjeV|||Hi:
How can I put the tag fields with vb6 and crviewer?
Thanks
Hiding Rows in Matrix
Hi,
I have a report which has got 52 rows of Week1/Week52. Depending on a field Duration (no. of weeks), I want tot display only those rows. i.e. If duration is 3 then display Row of week1, week2 and week3.
I tried to look in the visibility properties of rows in matrix report. But there is no option. Am I doing something wrong?
any help will be appreciated.
regards
Josh
Edit your row group and go to Visibility tab and use whatever expression you want there.
Shyam
|||Thanks for your reply.
I tried that, but there is no option of visibility when I select the rows. any idea as to what might be wrong?
thanks
Josh
|||Right click on any of your row and click on Edit Group and then go to Visibility tab.
Shyam
|||But it shows the values as blank, does not hide the row.
regards
Josh
|||Try using the same in visibility expressions of all the textboxes in the row.
Shyam
|||It works then. But still it leaves the blank space. So in essence if there is data for week1 to week4, it is displayed and then for week5 to week52 there is a blank space.
Any idea how this could be avoided?
regards
Josh
Friday, February 24, 2012
Hiding Field if Data is Null
address information:
Name
Title
Company
Address
Address2
City, State Zip
Since not all customers have an address2 line, I want to suppress the
Address2 field if it is null. This way, I don't have a blank line:
Jason Sweet
3154 Alaca Drive
Altadena, CA 91001
Possible?
Thanks in advance.
Jason SweetHi Jason,
I guess you can use the IIF function to set the height of the two text
boxes. something like =IIF(Address2 = "",0,20)
"Jaosn S" wrote:
> I'm simulating a mailing label-type format that contains mailing
> address information:
> Name
> Title
> Company
> Address
> Address2
> City, State Zip
> Since not all customers have an address2 line, I want to suppress the
> Address2 field if it is null. This way, I don't have a blank line:
> Jason Sweet
> 3154 Alaca Drive
> Altadena, CA 91001
> Possible?
> Thanks in advance.
> Jason Sweet
>|||Have each field in a different text box, then in the properties, click the
advanced button and have the visiblity set to expression and use
=iif(Fields!yourfield.Value is Nothing, true, false)
This should then hide the text box if there is no data.
Hope that helps
"Jaosn S" wrote:
> I'm simulating a mailing label-type format that contains mailing
> address information:
> Name
> Title
> Company
> Address
> Address2
> City, State Zip
> Since not all customers have an address2 line, I want to suppress the
> Address2 field if it is null. This way, I don't have a blank line:
> Jason Sweet
> 3154 Alaca Drive
> Altadena, CA 91001
> Possible?
> Thanks in advance.
> Jason Sweet
>|||Shaun,
Did you ever find out how to supress the null lines in an address?
I've tried the following IFF in the Visiblity Hidden Property:
=iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false)
I've tried the following IFF in the Line Height Property:
=iif( Fields!D_ADDRESS_LINE_2.Value = "",0,2)
Neither accomplish the task. Write soon!
carla.thompson@.gwl.com
"Shaun Longhurst" wrote:
> Have each field in a different text box, then in the properties, click the
> advanced button and have the visiblity set to expression and use
> =iif(Fields!yourfield.Value is Nothing, true, false)
> This should then hide the text box if there is no data.
> Hope that helps
> "Jaosn S" wrote:
> > I'm simulating a mailing label-type format that contains mailing
> > address information:
> >
> > Name
> > Title
> > Company
> > Address
> > Address2
> > City, State Zip
> >
> > Since not all customers have an address2 line, I want to suppress the
> > Address2 field if it is null. This way, I don't have a blank line:
> >
> > Jason Sweet
> > 3154 Alaca Drive
> >
> > Altadena, CA 91001
> >
> > Possible?
> >
> > Thanks in advance.
> >
> > Jason Sweet
> >|||Jason,
Did you ever get the correct answer to this question?
Carla
"Jaosn S" wrote:
> I'm simulating a mailing label-type format that contains mailing
> address information:
> Name
> Title
> Company
> Address
> Address2
> City, State Zip
> Since not all customers have an address2 line, I want to suppress the
> Address2 field if it is null. This way, I don't have a blank line:
> Jason Sweet
> 3154 Alaca Drive
> Altadena, CA 91001
> Possible?
> Thanks in advance.
> Jason Sweet
>|||Checking for null (Nothing in VB) can be done two ways:
=(Fields!A.Value is Nothing)
=IsNothing(Fields!A.Value)
When using these expressions for the Visibility.Hidden property you should
get the desired effect.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"C. Lynn" <CLynn@.discussions.microsoft.com> wrote in message
news:787DAFAB-22B6-4BBC-9C13-EA6ADEDBB289@.microsoft.com...
> Shaun,
> Did you ever find out how to supress the null lines in an address?
> I've tried the following IFF in the Visiblity Hidden Property:
> =iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false)
> I've tried the following IFF in the Line Height Property:
> =iif( Fields!D_ADDRESS_LINE_2.Value = "",0,2)
> Neither accomplish the task. Write soon!
> carla.thompson@.gwl.com
>
> "Shaun Longhurst" wrote:
>> Have each field in a different text box, then in the properties, click
>> the
>> advanced button and have the visiblity set to expression and use
>> =iif(Fields!yourfield.Value is Nothing, true, false)
>> This should then hide the text box if there is no data.
>> Hope that helps
>> "Jaosn S" wrote:
>> > I'm simulating a mailing label-type format that contains mailing
>> > address information:
>> >
>> > Name
>> > Title
>> > Company
>> > Address
>> > Address2
>> > City, State Zip
>> >
>> > Since not all customers have an address2 line, I want to suppress the
>> > Address2 field if it is null. This way, I don't have a blank line:
>> >
>> > Jason Sweet
>> > 3154 Alaca Drive
>> >
>> > Altadena, CA 91001
>> >
>> > Possible?
>> >
>> > Thanks in advance.
>> >
>> > Jason Sweet
>> >|||My solution included the following:
1. I used the IFF to set the condition of the Hidden Property of the
Visibility element.
2. If you want just the field to be "Hidden" or blanked out while
maintaining the vertical spacing by not suppressing the entire line, click
the *field*...
3. If you want the entire line to be supressed, click the line tab off to
the left of the table.
4. To set the property, go to the Visibility element and expand it to find
the Hidden Property. Click <expression> and enter the following IFF
statement:
=iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false) <-- substitute your
field name. This till set the Hidden property to True if the field is Null
or False if the field contains a value.
This should work to either suppress or blank either the field or the entire
line.
~~ C. Lynn
"Jaosn S" wrote:
> I'm simulating a mailing label-type format that contains mailing
> address information:
> Name
> Title
> Company
> Address
> Address2
> City, State Zip
> Since not all customers have an address2 line, I want to suppress the
> Address2 field if it is null. This way, I don't have a blank line:
> Jason Sweet
> 3154 Alaca Drive
> Altadena, CA 91001
> Possible?
> Thanks in advance.
> Jason Sweet
>|||I use this setup for doing address labels. It works preety well.
What I do is check if address 2 exists and if it does then print it.
If not then I substitute Address 2 with the city state and zip.
Same with the CSZ line.
I hope this works for you.
=Fields!PayeeName.Value & VBCRLF &
Fields!PayeeAddressLine1.Value & VBCRLF &
IIF(IsNothing(Fields!PayeeAddressLine2.Value), Fields!PayeeCity.Value & ", "
& Fields!PayeeState.Value & " " & Fields!PayeeZipCode.Value,
Fields!PayeeAddressLine2.Value) & VBCRLF &
IIF(IsNothing(Fields!PayeeAddressLine2.Value), "",
Fields!PayeeCity.Value & ", " & Fields!PayeeState.Value & " " &
Fields!PayeeZipCode.Value)
"C. Lynn" wrote:
> My solution included the following:
> 1. I used the IFF to set the condition of the Hidden Property of the
> Visibility element.
> 2. If you want just the field to be "Hidden" or blanked out while
> maintaining the vertical spacing by not suppressing the entire line, click
> the *field*...
> 3. If you want the entire line to be supressed, click the line tab off to
> the left of the table.
> 4. To set the property, go to the Visibility element and expand it to find
> the Hidden Property. Click <expression> and enter the following IFF
> statement:
> =iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false) <-- substitute your
> field name. This till set the Hidden property to True if the field is Null
> or False if the field contains a value.
> This should work to either suppress or blank either the field or the entire
> line.
> ~~ C. Lynn
>
> "Jaosn S" wrote:
> > I'm simulating a mailing label-type format that contains mailing
> > address information:
> >
> > Name
> > Title
> > Company
> > Address
> > Address2
> > City, State Zip
> >
> > Since not all customers have an address2 line, I want to suppress the
> > Address2 field if it is null. This way, I don't have a blank line:
> >
> > Jason Sweet
> > 3154 Alaca Drive
> >
> > Altadena, CA 91001
> >
> > Possible?
> >
> > Thanks in advance.
> >
> > Jason Sweet
> >|||If you use the =iff(IsNothing(field.value),true,false) in the visabillity
expression it will work.
"Fez" wrote:
> I use this setup for doing address labels. It works preety well.
> What I do is check if address 2 exists and if it does then print it.
> If not then I substitute Address 2 with the city state and zip.
> Same with the CSZ line.
> I hope this works for you.
> =Fields!PayeeName.Value & VBCRLF &
> Fields!PayeeAddressLine1.Value & VBCRLF &
> IIF(IsNothing(Fields!PayeeAddressLine2.Value), Fields!PayeeCity.Value & ", "
> & Fields!PayeeState.Value & " " & Fields!PayeeZipCode.Value,
> Fields!PayeeAddressLine2.Value) & VBCRLF &
> IIF(IsNothing(Fields!PayeeAddressLine2.Value), "",
> Fields!PayeeCity.Value & ", " & Fields!PayeeState.Value & " " &
> Fields!PayeeZipCode.Value)
> "C. Lynn" wrote:
> > My solution included the following:
> >
> > 1. I used the IFF to set the condition of the Hidden Property of the
> > Visibility element.
> > 2. If you want just the field to be "Hidden" or blanked out while
> > maintaining the vertical spacing by not suppressing the entire line, click
> > the *field*...
> > 3. If you want the entire line to be supressed, click the line tab off to
> > the left of the table.
> > 4. To set the property, go to the Visibility element and expand it to find
> > the Hidden Property. Click <expression> and enter the following IFF
> > statement:
> > =iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false) <-- substitute your
> > field name. This till set the Hidden property to True if the field is Null
> > or False if the field contains a value.
> >
> > This should work to either suppress or blank either the field or the entire
> > line.
> >
> > ~~ C. Lynn
> >
> >
> > "Jaosn S" wrote:
> >
> > > I'm simulating a mailing label-type format that contains mailing
> > > address information:
> > >
> > > Name
> > > Title
> > > Company
> > > Address
> > > Address2
> > > City, State Zip
> > >
> > > Since not all customers have an address2 line, I want to suppress the
> > > Address2 field if it is null. This way, I don't have a blank line:
> > >
> > > Jason Sweet
> > > 3154 Alaca Drive
> > >
> > > Altadena, CA 91001
> > >
> > > Possible?
> > >
> > > Thanks in advance.
> > >
> > > Jason Sweet
> > >|||Good morning!
I am trying to setup mailing labels and is unable to do so.
I have no idea what I am doing wrong.
Could you please provide me with a solution that you may have.
It would be greatly appreciated.
However, I will pay for the cost of the solution provided if necessary.
Thank you very much for your assistance.
"Fez" wrote:
> I use this setup for doing address labels. It works preety well.
> What I do is check if address 2 exists and if it does then print it.
> If not then I substitute Address 2 with the city state and zip.
> Same with the CSZ line.
> I hope this works for you.
> =Fields!PayeeName.Value & VBCRLF &
> Fields!PayeeAddressLine1.Value & VBCRLF &
> IIF(IsNothing(Fields!PayeeAddressLine2.Value), Fields!PayeeCity.Value & ", "
> & Fields!PayeeState.Value & " " & Fields!PayeeZipCode.Value,
> Fields!PayeeAddressLine2.Value) & VBCRLF &
> IIF(IsNothing(Fields!PayeeAddressLine2.Value), "",
> Fields!PayeeCity.Value & ", " & Fields!PayeeState.Value & " " &
> Fields!PayeeZipCode.Value)
> "C. Lynn" wrote:
> > My solution included the following:
> >
> > 1. I used the IFF to set the condition of the Hidden Property of the
> > Visibility element.
> > 2. If you want just the field to be "Hidden" or blanked out while
> > maintaining the vertical spacing by not suppressing the entire line, click
> > the *field*...
> > 3. If you want the entire line to be supressed, click the line tab off to
> > the left of the table.
> > 4. To set the property, go to the Visibility element and expand it to find
> > the Hidden Property. Click <expression> and enter the following IFF
> > statement:
> > =iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false) <-- substitute your
> > field name. This till set the Hidden property to True if the field is Null
> > or False if the field contains a value.
> >
> > This should work to either suppress or blank either the field or the entire
> > line.
> >
> > ~~ C. Lynn
> >
> >
> > "Jaosn S" wrote:
> >
> > > I'm simulating a mailing label-type format that contains mailing
> > > address information:
> > >
> > > Name
> > > Title
> > > Company
> > > Address
> > > Address2
> > > City, State Zip
> > >
> > > Since not all customers have an address2 line, I want to suppress the
> > > Address2 field if it is null. This way, I don't have a blank line:
> > >
> > > Jason Sweet
> > > 3154 Alaca Drive
> > >
> > > Altadena, CA 91001
> > >
> > > Possible?
> > >
> > > Thanks in advance.
> > >
> > > Jason Sweet
> > >|||Good morning!
I am trying to setup mailing labels and is unable to do so.
I have no idea what I am doing wrong.
Could you please provide me with a solution that you may have.
It would be greatly appreciated.
However, I will pay for the cost of the solution provided if necessary.
Thank you very much for your assistance.
"Shaun Longhurst" wrote:
> Have each field in a different text box, then in the properties, click the
> advanced button and have the visiblity set to expression and use
> =iif(Fields!yourfield.Value is Nothing, true, false)
> This should then hide the text box if there is no data.
> Hope that helps
> "Jaosn S" wrote:
> > I'm simulating a mailing label-type format that contains mailing
> > address information:
> >
> > Name
> > Title
> > Company
> > Address
> > Address2
> > City, State Zip
> >
> > Since not all customers have an address2 line, I want to suppress the
> > Address2 field if it is null. This way, I don't have a blank line:
> >
> > Jason Sweet
> > 3154 Alaca Drive
> >
> > Altadena, CA 91001
> >
> > Possible?
> >
> > Thanks in advance.
> >
> > Jason Sweet
> >|||Good morning!
I am trying to setup mailing labels and is unable to do so.
I have no idea what I am doing wrong.
Could you please provide me with a solution that you may have.
It would be greatly appreciated.
However, I will pay for the cost of the solution provided if necessary.
Thank you very much for your assistance.
"C. Lynn" wrote:
> Jason,
> Did you ever get the correct answer to this question?
> Carla
> "Jaosn S" wrote:
> > I'm simulating a mailing label-type format that contains mailing
> > address information:
> >
> > Name
> > Title
> > Company
> > Address
> > Address2
> > City, State Zip
> >
> > Since not all customers have an address2 line, I want to suppress the
> > Address2 field if it is null. This way, I don't have a blank line:
> >
> > Jason Sweet
> > 3154 Alaca Drive
> >
> > Altadena, CA 91001
> >
> > Possible?
> >
> > Thanks in advance.
> >
> > Jason Sweet
> >|||Good morning!
I am trying to setup mailing labels and is unable to do so.
I have no idea what I am doing wrong.
Could you please provide me with a solution that you may have.
It would be greatly appreciated.
However, I will pay for the cost of the solution provided if necessary.
Thank you very much for your assistance.
"Jaosn S" wrote:
> I'm simulating a mailing label-type format that contains mailing
> address information:
> Name
> Title
> Company
> Address
> Address2
> City, State Zip
> Since not all customers have an address2 line, I want to suppress the
> Address2 field if it is null. This way, I don't have a blank line:
> Jason Sweet
> 3154 Alaca Drive
> Altadena, CA 91001
> Possible?
> Thanks in advance.
> Jason Sweet
>|||I type your suggestion (below) into the visible property of one of my label
lines and it still is not hiding the line. Do you have any other
suggestions? Thanks for your help.
"Linda Anton" wrote:
> If you use the =iff(IsNothing(field.value),true,false) in the visabillity
> expression it will work.
> "Fez" wrote:
> > I use this setup for doing address labels. It works preety well.
> > What I do is check if address 2 exists and if it does then print it.
> > If not then I substitute Address 2 with the city state and zip.
> > Same with the CSZ line.
> > I hope this works for you.
> >
> > =Fields!PayeeName.Value & VBCRLF &
> > Fields!PayeeAddressLine1.Value & VBCRLF &
> > IIF(IsNothing(Fields!PayeeAddressLine2.Value), Fields!PayeeCity.Value & ", "
> > & Fields!PayeeState.Value & " " & Fields!PayeeZipCode.Value,
> > Fields!PayeeAddressLine2.Value) & VBCRLF &
> > IIF(IsNothing(Fields!PayeeAddressLine2.Value), "",
> > Fields!PayeeCity.Value & ", " & Fields!PayeeState.Value & " " &
> > Fields!PayeeZipCode.Value)
> >
> > "C. Lynn" wrote:
> >
> > > My solution included the following:
> > >
> > > 1. I used the IFF to set the condition of the Hidden Property of the
> > > Visibility element.
> > > 2. If you want just the field to be "Hidden" or blanked out while
> > > maintaining the vertical spacing by not suppressing the entire line, click
> > > the *field*...
> > > 3. If you want the entire line to be supressed, click the line tab off to
> > > the left of the table.
> > > 4. To set the property, go to the Visibility element and expand it to find
> > > the Hidden Property. Click <expression> and enter the following IFF
> > > statement:
> > > =iif( Fields!D_ADDRESS_LINE_2.Value = "", true, false) <-- substitute your
> > > field name. This till set the Hidden property to True if the field is Null
> > > or False if the field contains a value.
> > >
> > > This should work to either suppress or blank either the field or the entire
> > > line.
> > >
> > > ~~ C. Lynn
> > >
> > >
> > > "Jaosn S" wrote:
> > >
> > > > I'm simulating a mailing label-type format that contains mailing
> > > > address information:
> > > >
> > > > Name
> > > > Title
> > > > Company
> > > > Address
> > > > Address2
> > > > City, State Zip
> > > >
> > > > Since not all customers have an address2 line, I want to suppress the
> > > > Address2 field if it is null. This way, I don't have a blank line:
> > > >
> > > > Jason Sweet
> > > > 3154 Alaca Drive
> > > >
> > > > Altadena, CA 91001
> > > >
> > > > Possible?
> > > >
> > > > Thanks in advance.
> > > >
> > > > Jason Sweet
> > > >
Hiding field by asking if another field is empty
I need to hide a field (or retangle) by asking if another field in the
report, like text field (or some other entity i can create on the fly,
that is not a Data field)
for eg:
I create a text field in a retangle.
The text field include expression that determine what data to display,
if any.
I want to hide the retangle if the text field if empty.
So, can i use in an expression somthing other then a Data field or a
Parameter?
Thanks in advance,
Eitan perryYou can use ReportItems("itemname").Value
But I'm not sure if it would work to hide the parent (rectangle) if the
child (text box) is empty. You'll just have to try, but I'd rather just use
the expression used in your text box on the visibility property of the
rectangle. If the textbox value = fields!Field1.Value & fields!Field2.Value,
you should be able to do something like
=IIF(IsNothing(fields!Field1.Value & fields!Field2.Value), true, false)
in the visibility parameter.
Kaisa M. Lindahl Lervik
"Perry.Eitan" <perry.eitan@.gmail.com> wrote in message
news:1165295155.869671.109210@.j44g2000cwa.googlegroups.com...
> Hello,
> I need to hide a field (or retangle) by asking if another field in the
> report, like text field (or some other entity i can create on the fly,
> that is not a Data field)
>
> for eg:
> I create a text field in a retangle.
> The text field include expression that determine what data to display,
> if any.
> I want to hide the retangle if the text field if empty.
>
> So, can i use in an expression somthing other then a Data field or a
> Parameter?
>
> Thanks in advance,
> Eitan perry
>|||Hey,
I need that the text that follows the textbox with visibility=false to
shift up. How can one go about it?
Regards,
Ankur
Kaisa M. Lindahl Lervik wrote:
> You can use ReportItems("itemname").Value
> But I'm not sure if it would work to hide the parent (rectangle) if the
> child (text box) is empty. You'll just have to try, but I'd rather just use
> the expression used in your text box on the visibility property of the
> rectangle. If the textbox value = fields!Field1.Value & fields!Field2.Value,
> you should be able to do something like
> =IIF(IsNothing(fields!Field1.Value & fields!Field2.Value), true, false)
> in the visibility parameter.
> Kaisa M. Lindahl Lervik
>
> "Perry.Eitan" <perry.eitan@.gmail.com> wrote in message
> news:1165295155.869671.109210@.j44g2000cwa.googlegroups.com...
> > Hello,
> >
> > I need to hide a field (or retangle) by asking if another field in the
> > report, like text field (or some other entity i can create on the fly,
> > that is not a Data field)
> >
> >
> > for eg:
> > I create a text field in a retangle.
> > The text field include expression that determine what data to display,
> > if any.
> > I want to hide the retangle if the text field if empty.
> >
> >
> > So, can i use in an expression somthing other then a Data field or a
> > Parameter?
> >
> >
> > Thanks in advance,
> > Eitan perry
> >|||Sorry for replying a bit late, I've been offline for some days.
What do you mean by "shift up"?
Kaisa M. Lindahl Lervik
<hellbent4u@.gmail.com> wrote in message
news:1166009076.861211.266620@.l12g2000cwl.googlegroups.com...
> Hey,
> I need that the text that follows the textbox with visibility=false to
> shift up. How can one go about it?
> Regards,
> Ankur
>
> Kaisa M. Lindahl Lervik wrote:
>> You can use ReportItems("itemname").Value
>> But I'm not sure if it would work to hide the parent (rectangle) if the
>> child (text box) is empty. You'll just have to try, but I'd rather just
>> use
>> the expression used in your text box on the visibility property of the
>> rectangle. If the textbox value = fields!Field1.Value &
>> fields!Field2.Value,
>> you should be able to do something like
>> =IIF(IsNothing(fields!Field1.Value & fields!Field2.Value), true, false)
>> in the visibility parameter.
>> Kaisa M. Lindahl Lervik
>>
>> "Perry.Eitan" <perry.eitan@.gmail.com> wrote in message
>> news:1165295155.869671.109210@.j44g2000cwa.googlegroups.com...
>> > Hello,
>> >
>> > I need to hide a field (or retangle) by asking if another field in the
>> > report, like text field (or some other entity i can create on the fly,
>> > that is not a Data field)
>> >
>> >
>> > for eg:
>> > I create a text field in a retangle.
>> > The text field include expression that determine what data to display,
>> > if any.
>> > I want to hide the retangle if the text field if empty.
>> >
>> >
>> > So, can i use in an expression somthing other then a Data field or a
>> > Parameter?
>> >
>> >
>> > Thanks in advance,
>> > Eitan perry
>> >
>
Hiding duplicates in a details row and hiding the row when it's em
rows. The first row is field labels for the 2nd details row. What i would
like to do is only show the first details row once. I know i can set the
properties for each field to hide duplicates but then i'm still stuck with it
showing the blank row. So if i could find a way to suppress the first row
when it's blank that would be good or find a way to only print the first
details row once.well i answered my own question. i moved the field labels to the bottom of
the last grouping before the details, made sure all of the textbox fields
were marked hide duplicates, set the row height to 0, set visibility for the
row to true, and set the toggle setting to be the same as the detail toggle
setting.
"deniseamat" wrote:
> I have a report that is using the drill down feature. So i have 2 detail
> rows. The first row is field labels for the 2nd details row. What i would
> like to do is only show the first details row once. I know i can set the
> properties for each field to hide duplicates but then i'm still stuck with it
> showing the blank row. So if i could find a way to suppress the first row
> when it's blank that would be good or find a way to only print the first
> details row once.
Sunday, February 19, 2012
Hiding A Field
On a label generated using Crystal, I have added a use by date based on todays date. However if the product id field is blank, then I wish the use by date to also be blank. At the moment I am using an If...Then...Else statement.
I.e.
If ProductID <> "" Then
CurrentDate + 730
Else
CDate(0);
But, this yields the date 30/12/1899 if the productid is blank. Any ideas?
ps I'm using CrystalReports8.5right click on the field and goto suppress ,there write down
is null(Product_ID)
pracalus.