Link to home
Start Free TrialLog in
Avatar of Jamiya
Jamiya

asked on

Custom label design with crystal reports

Hi guys,
How can i specify a custom label size during crystal report design.
I am using VB.net 2005 with CR, and I want to specify the exact label size, because
in the drop down list of paper size there is no custom size,
and if I choose e.g A4 , the printer prints labels until A4 size and pulls out other labels empty.

Any ideas??
CR-label.JPG
Avatar of Mike McCracken
Mike McCracken

You are limited to the paper sizes the printer supports.

mlmcc
Avatar of Jamiya

ASKER

Hi mlmcc,
Is there a way out??
How can I avoid the printer from printing extra empty labels
after filling the required labels??

Regards
What do you mean?

mlmcc
Avatar of Jamiya

ASKER

I mean when I choose for example A4 size and print a label list, it prints the labels fine until A4 size,
then pushes the labels out empty.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jamiya

ASKER

Hi guys,
i am using vb.net 2005 with CR, and if i store the images as path
they don't appear in the report, but only if they are stored as image field
and not varchar.
How is it possible to show the images in the crystal if they are stored as path?
Avatar of Jamiya

ASKER

I have in sql server 2000,  30 image fields, but the code i am using to store images only stores 10 images.
Any ideas???
OpenFileDialog.Multiselect = True
        Dim i As Integer
        Dim j As Integer = 1
        Dim sFilename As String
        If OpenFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
            j = 1
            For Each file As String In OpenFileDialog.FileNames
                Dim strSQL As String = " UPDATE ConstructionTbl  "
                i = InStrRev(file.Trim, "\")
                If i = 0 Then
                    'No path found, only filename
                    sFilename = file.Trim
                Else
                    'Assign filename only to variable
                    sFilename = Microsoft.VisualBasic.Right(file.Trim, Len(file.Trim) - i)
                End If
 
                Dim ExtensionPosition As Integer = sFilename.LastIndexOf(".")
                Dim filePathNoEx As String = sFilename.Substring(0, ExtensionPosition)
                file = filePathNoEx
 
                Dim UnderScorePosition As Integer = file.LastIndexOf("_")
                Dim filePathNoUnderScore As String = file.Substring(0, UnderScorePosition)
                file = filePathNoUnderScore
                'MsgBox(file)
                Select Case j
                    Case 1 : strSQL += " SET Photo1 = @Photo1 "
                    Case 2 : strSQL += " SET Photo2 = @Photo2 "
                    Case 3 : strSQL += " SET Photo3 = @Photo3 "
                    Case 4 : strSQL += " SET Photo4 = @Photo4 "
                    Case 5 : strSQL += " SET Photo5 = @Photo5 "
                    Case 6 : strSQL += " SET Photo6 = @Photo6 "
                    Case 7 : strSQL += " SET Photo7 = @Photo7 "
                    Case 8 : strSQL += " SET Photo8 = @Photo8 "
                    Case 9 : strSQL += " SET Photo9 = @Photo9 "
                    Case 10 : strSQL += " SET Photo10 = @Photo10 "
                    Case 11 : strSQL += " SET Photo11 = @Photo11 "
                    Case 12 : strSQL += " SET Photo12 = @Photo12 "
                    Case 13 : strSQL += " SET Photo13 = @Photo13 "
                    Case 14 : strSQL += " SET Photo14 = @Photo14 "
                    Case 15 : strSQL += " SET Photo15 = @Photo15 "
                    Case 16 : strSQL += " SET Photo16 = @Photo16 "
                    Case 17 : strSQL += " SET Photo17 = @Photo17 "
                    Case 18 : strSQL += " SET Photo18 = @Photo18 "
                    Case 19 : strSQL += " SET Photo19 = @Photo19 "
                    Case 20 : strSQL += " SET Photo20 = @Photo20 "
                    Case 21 : strSQL += " SET Photo10 = @Photo21 "
                    Case 22 : strSQL += " SET Photo11 = @Photo22 "
                    Case 23 : strSQL += " SET Photo12 = @Photo23 "
                    Case 24 : strSQL += " SET Photo13 = @Photo24 "
                    Case 25 : strSQL += " SET Photo14 = @Photo25 "
                    Case 26 : strSQL += " SET Photo15 = @Photo26 "
                    Case 27 : strSQL += " SET Photo16 = @Photo27 "
                    Case 28 : strSQL += " SET Photo17 = @Photo28 "
                    Case 29 : strSQL += " SET Photo18 = @Photo29 "
                    Case 30 : strSQL += " SET Photo19 = @Photo30 "
                End Select
                Dim cmd As New SqlCommand(strSQL & " WHERE F1 = '" & file & "'", MainConn)
 
                'Dim cmd As New SqlCommand("UPDATE ConstructionTbl SET Photo = @Picture WHERE F1 = '" & file & "'", MainConn)
                Dim strBLOBFilePath As String = sFilename
                Dim fsBLOBFile As New FileStream(strBLOBFilePath, FileMode.Open, FileAccess.Read)
                Dim bytBLOBData(fsBLOBFile.Length() - 1) As Byte
                fsBLOBFile.Read(bytBLOBData, 0, bytBLOBData.Length)
                fsBLOBFile.Close()
                Dim prm As New SqlParameter("@Photo" + CStr(j), SqlDbType.VarBinary, bytBLOBData.Length, ParameterDirection.Input, False, _
                    0, 0, Nothing, DataRowVersion.Current, bytBLOBData)
                cmd.Parameters.Add(prm)
                j = j + 1
                cmd.ExecuteNonQuery()
            Next
        End If

Open in new window