Solved

Suppress the BLOB Field

Posted on 2011-03-25
15
1,647 Views
Last Modified: 2012-05-11
Hi All.
   I'm using a BLOB field to insert .bmp images from Dataset in crystal reports 9.The problem is if a field doesn't have an image then I want to suppress the BLOB field.Can any one help me out with a formula to suppress the field or is there any way to suppress. Thank you.
0
Comment
Question by:V1n
  • 7
  • 5
  • 3
15 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 35219525
Are there other fields in the section?
If not you can suppress the section with
  IsNull({YourBLOBField})

You may also be able to suppress the field itself
Right click the field
Click FORMAT FIELD
Click the COMMON TAB
If there is a FORMULA BUTTON to the right of SUPPRESS click it
Enter the above formula
    IsNull({YourBLOBField})

mlmcc
0
 
LVL 14

Expert Comment

by:systan
ID: 35220432
try to decrease the size of the file when inserting it, then increase it again when using it.
http://www.eggheadcafe.com/community/aspnet/2/10011778/resizing-the-image.aspx
http://bytes.com/topic/net/answers/796115-c-net-resize-bitmap
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35220589
systan - How does that help suppress the field or section if the image doesn't exist?

mlmcc
0
 
LVL 14

Expert Comment

by:systan
ID: 35223669
Ok, I understood it wrong.  It can't be.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35223826
No problem.  Thought I was missing something in  the links.

mlmcc
0
 
LVL 14

Expert Comment

by:systan
ID: 35224538
What about assigning another existing real image, then compare if the image from the dataset is null of not,
if null, then replace it with the existing physical image.

like this; code snippet; pseudo code;
System.Drawing.Imaging.ImageCodecInfo[] arrayICI = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders();
            int x = 0;
            for (x = 0; x <= arrayICI.Length - 1; x++)
            {
              ////listBox1.Items.Add(arrayICI[x].FormatDescription.ToString()); ////get all image codecs

              ////compare here...
              ////if variable_image_from_dataset_equals_from_array_of_codecs_then...
              ////...
              else
              ////replace image_assigned_to_report_equals_from_existing_real_image_from_disk
              ////...  
            }

Open in new window

0
 

Author Comment

by:V1n
ID: 35262525
Hello mlmcc, systan
 Thanks for replying, I got a new issue with the BLOB field the issue goes like this
I am generating some Images dynamically and was storing that in the dataset (.xsd file) and inserting all the images in the report using the database expert and inserting them using BLOB field, as the dataset is generated dynamically sometimes only some files appears (ex: lets say a dataset have 5 Images which is maximum but sometimes it may have only 3 Images but i had created the report for maximum)then while running the report I'm getting an error stating that "The table 'Table Name ' Could not be found".Please help me to solve this issue.Thanks in advance.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 100

Expert Comment

by:mlmcc
ID: 35262642
Are you generating 5 images for a single record?
If so you will have to generate something so the field/column exists.

mlmcc
0
 

Author Comment

by:V1n
ID: 35262866
yes, generating them for single report. Can we suppress those BLOB fields which doesn't have images dynamically in the code itself? Thank you.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35264922
No, because the report is looking for them.

You could produce a BLANK image and put it in the data or perhaps you can use NULL

mlmcc
0
 

Author Comment

by:V1n
ID: 35265056
Thank you, So if we have 2 BLOB fields in a section and if the second one is null and suppressed using the IsNull formula then how to suppress the blank space in the section which is formed after suppressing the BLOB field?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35265187
Do you have the blob fields on top of each other or side by side?

If on top then you could put each blob in its own section and suppress the section if blank

If side by side then there is no way to reuse that blank area.

mlmcc
0
 

Author Comment

by:V1n
ID: 35265347
one followed by other
like
DetailSection1
Blob Field1
Blob Field2
Blob Field3
DetailSection2
Blob Field4
Blob Field5
these fields should be in the same section.Is there any way to suppress the blank space.
If Blob Field2 & Blob Field3 are null then the report should be like below

DetailSection1
Blob Field1
DetailSection2
Blob Field4
Blob Field5

but not like

DetailSection1
Blob Field1


DetailSection2
Blob Field4
Blob Field5

Thank you.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35265392
Yes, you have to put each in its own section then suppress the section with
1.  SUPPRESS BLANK SECTION
2 - Suppression formula IsNull({BlobField})

mlmcc
0
 

Author Comment

by:V1n
ID: 35265445
Thank you Very much for your solution.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum Column in GridView 3 41
Error on Add method 1 36
C# parent child form 5 13
WCF Service Application cannot connect from TCP terminal 1 11
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now