Monday, March 19, 2012
Bug on PDF output?
configuration problem or it's a bug. I hope it's not a bug. Please advice.
ThanksDon't fret, it is a feature. Ensure that the width of the body (the white
area) plus the sums of the width of the left and right margins are less than
or equal to the width in the PageSize property of the report (the camel?
color area).
"VNN" <VNN@.hotmail.com> wrote in message
news:%23ZRKyxXCFHA.3112@.TK2MSFTNGP14.phx.gbl...
> PDF report has every other page blank. I don't know if this is a
> configuration problem or it's a bug. I hope it's not a bug. Please advice.
> Thanks
>
Thursday, February 16, 2012
Breaks in Min and Max
ISBN DESC MIN -PKG MAX-PKG
Intentional break in PKG numbers
The output without suppression is in Output1.png file attached
The output with suppression is in Output2.png file attached
I am using crystal reports 9. How can I use the suppression and line up the min and max to be on the same row.
Any help is greatly appreciated.
Thanks
msimhaI have a report designed as follows:
ISBN DESC MIN -PKG MAX-PKG
Intentional break in PKG numbers
The output without suppression is in Output1.png file attached
The output with suppression is in Output2.png file attached
I am using crystal reports 9. How can I use the suppression and line up the min and max to be on the same row.
Any help is greatly appreciated.
Thanks
msimha
If you go into the section expert, go to the section above the area you want to align and click on 'Underlay Following Sections' This will bring things in line for you.
Brian
http://www.briankuipers.com
Sunday, February 12, 2012
bout union select....
can someone help me how can i access datas using union? or show my data in the gridview....pls....
coz i have 3 tables...
i need to output the datas of the 3 tables in 1 gridview.
tables are: TT0001,TM0011,TM0001
TT0001 has syain_id(PK),time_in,time_out,year(PK),month(PK),day(PK)
TM0011 has office_name,office_id(PK)
TM0001 has syain_id(PK) office_id(PK),empl_date
the scenario is:
i have a combo box for office_name, and a textbox for imputting the date( 2007/01/23).when i click the button OK.
the time_in,time_out and syain_name of the person who is present in the choosen date(ex. 2007/01/23) will be shown in my gridview_info.
i already have some codes but it still confuse me and has many errors...
my code:
GridView_info.Visible = True
'//for odbc
Dim StrConn As String = "Dsn=MS_PKG01;UID=emiline;APP=Microsoft? Visual Studio? 2005;WSID=MSHNP200603;DATABASE=MS_PKG01;Trusted_Connection=Yes"
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)
'Dim MyConn As New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("MS_PKG01ConnectionString").ConnectionString)
MyConn.Open()
'//parsing 2
Dim MyString As String = TextBox_date.Text
Dim MyDateTime As DateTime = DateTime.Parse(MyString)
Console.WriteLine(MyDateTime)
Dim stringQuery2 As String = "SELECT * from tempo_db"
Dim SQLcommand2 As New Odbc.OdbcCommand("Create table tempo_db ( syain_name char(40),year char(4), month char(2), day char(2), in_hh int, in_mi int, out_hh int, out_mi int )", MyConn)
SQLcommand2.ExecuteNonQuery()
Dim SQLcommand1 As New Odbc.OdbcCommand("Drop table tempo_db", MyConn)
SQLcommand1.ExecuteNonQuery()
Dim da As New Odbc.OdbcDataAdapter("Select TT0001.Year,TT0001.Month,TT0001.Day,TT0001.in_hh,TT0001.in_mi,TT0001.out_hh,TT0001.out_min where TT0001.Year =" + MyString + " and TT0001.Month =" + MyString + " and TT0001.Day =" + MyString + " and TT0001.syain_id =" + TM0001.syain_id + " Union Select TM0001.syain_name where TM0001.syain_id =" + TT0001.syain_id + " Union Select TM0011.office_name where TM0011.office_id =" + TM0001.office_id + "
Dim ds As New DataSet()
Dim foundrow As DataRow
Dim ds2 As New DataSet
'Dim temp_data_table As New DataTable
GridView_info.DataSource = ds
da.Fill(ds, "TT0001")
Dim sqldataadapter2 As New Odbc.OdbcDataAdapter(stringQuery2, MyConn)
sqldataadapter2.Fill(ds2, "tempo_db")
Dim date_ctr As Integer
date_ctr = 1
While date_ctr <= Date.DaysInMonth(Now.Year, Now.Month)
ds.Tables(0).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Year")}
'ds.Tables(1).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Month")}
'ds.Tables(2).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Day")}
foundrow = ds.Tables(0).Rows.Find(date_ctr)
'foundrow = ds.Tables(1).Rows.Find(date_ctr)
'foundrow = ds.Tables(2).Rows.Find(date_ctr)
Dim in_hh, in_mi, out_hh, out_mi As String
If foundrow IsNot Nothing Then
in_hh = foundrow.Item("in_hh")
in_mi = foundrow.Item("in_mi")
out_hh = foundrow.Item("out_hh")
out_mi = foundrow.Item("out_mi")
End If
End While
GridView_info.DataSource = ds2
GridView_info.DataBind()
MyConn.Close()
End Sub
/// ps: im having problem with my select statements....
can someone help me analyze what i had written... and what is my mistake...
any help is greatly appreciated...
thanks
nat!
Remember in union all select statement have to returns the same table structure, and you should use syntax like :
Select * from t1 where a=b
UNION
select * from t2 where b=c
instead of
Select * where a=b
UNION
select * where b=c
(you have it in da As New Odbc.OdbcDataAdapter)
If you select statements returns different number of columns just add dummy columns to where you need them
like
Select c1,c2,c3,c4 from t1 where a=b
UNION
select d1,d2,d3 ,'dummy value' from t2 where b=c
but remember that all columns have to have the same format like 1 select statement
Thanks
JPazgier