amd1979
asked on
for madheeswar.
on the last reports that we have created the selection key there is only one that is based on the
date that a certain document was received not cosidering any field.
now we have to consider other 2 fields such as "The report name" field and the "Category Type" field
For example i want to select
Report Name : Nature of Documents Report
Category Type: General Document
Date : fromDate to ToDate
how can i make a report using this 3 search key?
thanks for your help..
date that a certain document was received not cosidering any field.
now we have to consider other 2 fields such as "The report name" field and the "Category Type" field
For example i want to select
Report Name : Nature of Documents Report
Category Type: General Document
Date : fromDate to ToDate
how can i make a report using this 3 search key?
thanks for your help..
Now I understood ur requirement.
u have view called general Documents\By nature of Documents.
In that view, if the category is XXXX, then in that category, based on from date and to date, need to generate report.
Am I correct?
if the above is correct, then it can be done with small workaround.
the same code which I have given will be reused for this also.
u have view called general Documents\By nature of Documents.
In that view, if the category is XXXX, then in that category, based on from date and to date, need to generate report.
Am I correct?
if the above is correct, then it can be done with small workaround.
the same code which I have given will be reused for this also.
And I will stay another 45 minutes and if you can respond quickly I can provide answer , else wait for tomorrow.
Thanks
Thanks
Mady, I will not feel bad at all if i get some points too ;-)
U have qwaletee Question which is opened till now. And I am not going to share points in this question.
Even amd will be giving more points if I solve this question.
what u will say AMD?
Anyway, Ranjeet how are you. Here I am busy with lots of projects and I am alone now also.
Even amd will be giving more points if I solve this question.
what u will say AMD?
Anyway, Ranjeet how are you. Here I am busy with lots of projects and I am alone now also.
Well, I'm ok too. Doing a bit of study. Trying to get some hands on Domino Workflow. Does IBM provide developers' evaluation download?
Good to be busy. How do you handle more than one projects alone? Ask your company to rectruit more people. I may just try my luck too ;-)
Good to be busy. How do you handle more than one projects alone? Ask your company to rectruit more people. I may just try my luck too ;-)
ASKER
sorry for my late reply, i got disconnected last night.. dont know what happenned to my provider.. any way.. yes you got what iam want to happenned on my search..
"U have qwaletee Question which is opened till now. And I am not going to share points in this question.
Even amd will be giving more points if I solve this question.
what u will say AMD?
I cant understand this..."
tnx
"U have qwaletee Question which is opened till now. And I am not going to share points in this question.
Even amd will be giving more points if I solve this question.
what u will say AMD?
I cant understand this..."
tnx
"U have qwaletee Question which is opened till now. And I am not going to share points in this question."
the above is for Ranjeet.
And the below is for u:
Even amd will be giving more points if I solve this question.
what u will say AMD?
the above is for Ranjeet.
And the below is for u:
Even amd will be giving more points if I solve this question.
what u will say AMD?
ASKER
this question is for you and the poist obcourse..
the point is opened until now because i dont how to refund tha point because as far as i know i solve the problem on my own..
the point is opened until now because i dont how to refund tha point because as far as i know i solve the problem on my own..
AMD, you can relax. Conversation progressed like this:
>> Mady, I will not feel bad at all if i get some points too ;-)
>>>> U have qwaletee Question which is opened till now. And I am not going to share points in this question.
Even amd will be giving more points if I solve this question. (https://www.experts-exchange.com/questions/20841369/Ranjeet-what's-the-most-interesting-bit-of-code-you-have-developed-lately.html)
That comment was meant for me. Sorry if that had you confused. Once in a while some "off the track" comments are a common place sight here. Pls ignore them.
>> Mady, I will not feel bad at all if i get some points too ;-)
>>>> U have qwaletee Question which is opened till now. And I am not going to share points in this question.
Even amd will be giving more points if I solve this question. (https://www.experts-exchange.com/questions/20841369/Ranjeet-what's-the-most-interesting-bit-of-code-you-have-developed-lately.html)
That comment was meant for me. Sorry if that had you confused. Once in a while some "off the track" comments are a common place sight here. Pls ignore them.
ASKER
mady,
iam waiting for your answer..
thanks..
amd
iam waiting for your answer..
thanks..
amd
If u found the answer for yourself, then close this question.
Just post a thread in commmunity support and retain the points.
if ur still looking for an answer I have to do it.
Best of luck.
Just post a thread in commmunity support and retain the points.
if ur still looking for an answer I have to do it.
Best of luck.
ASKER
i still need your answer..
create a new field on the form called category_k and make it a dialog list field.
And the formula for that is:
res:=@DbColumn("":"";"";"G NofDoc";1) ;
@If(@IsError(res);"";res)
And for a new search button the code is:
Sub Click(Source1 As Button)
Dim ws As New notesuiworkspace
Dim Source As notesuidocument
Dim curdoc As notesdocument
Set Source=ws.currentdocument
Set curdoc=Source.document
Dim ss As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim dc As notesdocumentcollection
Dim doc As notesdocument
Set db=ss.currentdatabase
'tmpkey=curdoc.urDateField IntheCurre ntdocument (0)
Set view=db.getview("GNofDoc") 'First column should be text and sorted.
Dim fromdate As NotesDatetime
Dim todate As notesdatetime
Set fromdate=New notesdatetime(curdoc.Fromd ate(0))
Set todate=New notesdatetime(curdoc.Todat e(0))
'========================= =======
Dim xlapp As Variant
Dim xlsheet As Variant
Set xlapp=createobject("Excel. Applicatio n")
xlapp.statusbar="Creating Worksheet. Please be patient ..."
xlapp.visible=True
'xlapp.visible=False
xlapp.workbooks.add
xlapp.referencestyle=2
Set xlsheet=xlapp.workbooks(1) .worksheet s(1)
xlsheet.name="Result"
Dim rows As Integer
Dim cols As Integer
Dim maxcols As Integer
'Header Formation;
xlapp.Rows("1:1").select
xlapp.selection.font.name= "Arial"
xlapp.selection.font.size= 11
xlapp.selection.font.bold= True
xlapp.selection.font.itali c=True
'Header Information(Titles):
xlapp.statusbar="Creating Cells and Creating Cell Headings. Please be patient ..."
xlsheet.application.active sheet.cell s(1,1).val ue="Refere nce Code"
xlsheet.application.active sheet.cell s(1,2).val ue="Subjec t"
xlsheet.application.active sheet.cell s(1,3).val ue="Sender "
xlsheet.application.active sheet.cell s(1,4).val ue="Action Requested"
xlsheet.application.active sheet.cell s(1,5).val ue="COS Remarks"
xlsheet.application.active sheet.cell s(1,6).val ue="Secret ary’ s Remarks"
i=2
Set dc=view.getalldocumentsbyk ey(curdoc. category_k (0),True)
Set doc=dc.getfirstdocument
While Not doc Is Nothing
'xlapp.visible=True
Do While fromdate.dateonly<=todate. dateonly
tmpkey=Cstr(fromdate.dateo nly)
Dim checkdate As notesdatetime
Set checkdate=New notesdatetime(doc.DTreceiv e(0))
If fromdate.dateonly=checkdat e.dateonly Then
xlsheet.range("A"&Trim(Str (i))).valu e=doc.Dtre ceive(0)
xlsheet.range("B"&Trim(Str (i))).valu e=doc.Send er(0)
xlsheet.range("C"&Trim(Str (i))).valu e=doc.Subj ect(0)
xlsheet.range("D"&Trim(Str (i))).valu e=doc.Areq uested(0)
xlsheet.range("E"&Trim(Str (i))).valu e=doc.CosR em(0)
xlsheet.range("F"&Trim(Str (i))).valu e=doc.SecR em(0)
i=i+1
Call xlsheet.Range("A1:F500").C olumns.Aut oFit
Call xlsheet.Range("A1:F500").R ows.AutoFi t
xlapp.statusbar="Processin g ..."
End If
Call fromdate.Adjustday(1)
Loop
Set doc=dc.getnextdocument(doc )
Wend
xlapp.statusbar="Completed ..."
End Sub
And the formula for that is:
res:=@DbColumn("":"";"";"G
@If(@IsError(res);"";res)
And for a new search button the code is:
Sub Click(Source1 As Button)
Dim ws As New notesuiworkspace
Dim Source As notesuidocument
Dim curdoc As notesdocument
Set Source=ws.currentdocument
Set curdoc=Source.document
Dim ss As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim dc As notesdocumentcollection
Dim doc As notesdocument
Set db=ss.currentdatabase
'tmpkey=curdoc.urDateField
Set view=db.getview("GNofDoc")
Dim fromdate As NotesDatetime
Dim todate As notesdatetime
Set fromdate=New notesdatetime(curdoc.Fromd
Set todate=New notesdatetime(curdoc.Todat
'=========================
Dim xlapp As Variant
Dim xlsheet As Variant
Set xlapp=createobject("Excel.
xlapp.statusbar="Creating Worksheet. Please be patient ..."
xlapp.visible=True
'xlapp.visible=False
xlapp.workbooks.add
xlapp.referencestyle=2
Set xlsheet=xlapp.workbooks(1)
xlsheet.name="Result"
Dim rows As Integer
Dim cols As Integer
Dim maxcols As Integer
'Header Formation;
xlapp.Rows("1:1").select
xlapp.selection.font.name=
xlapp.selection.font.size=
xlapp.selection.font.bold=
xlapp.selection.font.itali
'Header Information(Titles):
xlapp.statusbar="Creating Cells and Creating Cell Headings. Please be patient ..."
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
i=2
Set dc=view.getalldocumentsbyk
Set doc=dc.getfirstdocument
While Not doc Is Nothing
'xlapp.visible=True
Do While fromdate.dateonly<=todate.
tmpkey=Cstr(fromdate.dateo
Dim checkdate As notesdatetime
Set checkdate=New notesdatetime(doc.DTreceiv
If fromdate.dateonly=checkdat
xlsheet.range("A"&Trim(Str
xlsheet.range("B"&Trim(Str
xlsheet.range("C"&Trim(Str
xlsheet.range("D"&Trim(Str
xlsheet.range("E"&Trim(Str
xlsheet.range("F"&Trim(Str
i=i+1
Call xlsheet.Range("A1:F500").C
Call xlsheet.Range("A1:F500").R
xlapp.statusbar="Processin
End If
Call fromdate.Adjustday(1)
Loop
Set doc=dc.getnextdocument(doc
Wend
xlapp.statusbar="Completed
End Sub
ASKER
hello mady,
good day..
the code that you provide encountered a little problem..
i think array does not work well..
the data that im on get from the view is only the last document..
example:
Nature of document: Date:
Document1 03/25/2004
Document2 03/25/2004
Document3 03/25/2004
i only got document 3 on the reports
doc1 and doc2 are not included..
thanks
amd
good day..
the code that you provide encountered a little problem..
i think array does not work well..
the data that im on get from the view is only the last document..
example:
Nature of document: Date:
Document1 03/25/2004
Document2 03/25/2004
Document3 03/25/2004
i only got document 3 on the reports
doc1 and doc2 are not included..
thanks
amd
use the below code for exporting:
Sub Click(Source1 As Button)
Dim ws As New notesuiworkspace
Dim Source As notesuidocument
Dim curdoc As notesdocument
Set Source=ws.currentdocument
Set curdoc=Source.document
Dim ss As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim dc As notesdocumentcollection
Dim doc As notesdocument
Set db=ss.currentdatabase
'tmpkey=curdoc.urDateField IntheCurre ntdocument (0)
Set view=db.getview("GNofDoc") 'First column should be text and sorted.
'========================= =======
Dim xlapp As Variant
Dim xlsheet As Variant
Set xlapp=createobject("Excel. Applicatio n")
xlapp.statusbar="Creating Worksheet. Please be patient ..."
xlapp.visible=True
'xlapp.visible=False
xlapp.workbooks.add
xlapp.referencestyle=2
Set xlsheet=xlapp.workbooks(1) .worksheet s(1)
xlsheet.name="Result"
Dim rows As Integer
Dim cols As Integer
Dim maxcols As Integer
'Header Formation;
xlapp.Rows("1:1").select
xlapp.selection.font.name= "Arial"
xlapp.selection.font.size= 11
xlapp.selection.font.bold= True
xlapp.selection.font.itali c=True
'Header Information(Titles):
xlapp.statusbar="Creating Cells and Creating Cell Headings. Please be patient ..."
xlsheet.application.active sheet.cell s(1,1).val ue="Refere nce Code"
xlsheet.application.active sheet.cell s(1,2).val ue="Subjec t"
xlsheet.application.active sheet.cell s(1,3).val ue="Sender "
xlsheet.application.active sheet.cell s(1,4).val ue="Action Requested"
xlsheet.application.active sheet.cell s(1,5).val ue="COS Remarks"
xlsheet.application.active sheet.cell s(1,6).val ue="Secret ary’ s Remarks"
i=2
Set dc=view.getalldocumentsbyk ey(curdoc. category_k (0),True)
Set doc=dc.getfirstdocument
While Not doc Is Nothing
Dim fromdate As NotesDatetime
Dim todate As notesdatetime
Set fromdate=New notesdatetime(curdoc.Fromd ate(0))
Set todate=New notesdatetime(curdoc.Todat e(0))
Dim checkdate As notesdatetime
Set checkdate=New notesdatetime(doc.DTreceiv e(0))
'xlapp.visible=True
Do While fromdate.dateonly<=todate. dateonly
tmpkey=Cstr(fromdate.dateo nly)
If fromdate.dateonly=checkdat e.dateonly Then
xlsheet.range("A"&Trim(Str (i))).valu e=doc.Dtre ceive(0)
xlsheet.range("B"&Trim(Str (i))).valu e=doc.Send er(0)
xlsheet.range("C"&Trim(Str (i))).valu e=doc.Subj ect(0)
xlsheet.range("D"&Trim(Str (i))).valu e=doc.Areq uested(0)
xlsheet.range("E"&Trim(Str (i))).valu e=doc.CosR em(0)
xlsheet.range("F"&Trim(Str (i))).valu e=doc.SecR em(0)
i=i+1
Call xlsheet.Range("A1:F500").C olumns.Aut oFit
Call xlsheet.Range("A1:F500").R ows.AutoFi t
xlapp.statusbar="Processin g ..."
End If
Call fromdate.Adjustday(1)
Loop
Set doc=dc.getnextdocument(doc )
Wend
xlapp.statusbar="Completed ..."
End Sub
Sub Click(Source1 As Button)
Dim ws As New notesuiworkspace
Dim Source As notesuidocument
Dim curdoc As notesdocument
Set Source=ws.currentdocument
Set curdoc=Source.document
Dim ss As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim dc As notesdocumentcollection
Dim doc As notesdocument
Set db=ss.currentdatabase
'tmpkey=curdoc.urDateField
Set view=db.getview("GNofDoc")
'=========================
Dim xlapp As Variant
Dim xlsheet As Variant
Set xlapp=createobject("Excel.
xlapp.statusbar="Creating Worksheet. Please be patient ..."
xlapp.visible=True
'xlapp.visible=False
xlapp.workbooks.add
xlapp.referencestyle=2
Set xlsheet=xlapp.workbooks(1)
xlsheet.name="Result"
Dim rows As Integer
Dim cols As Integer
Dim maxcols As Integer
'Header Formation;
xlapp.Rows("1:1").select
xlapp.selection.font.name=
xlapp.selection.font.size=
xlapp.selection.font.bold=
xlapp.selection.font.itali
'Header Information(Titles):
xlapp.statusbar="Creating Cells and Creating Cell Headings. Please be patient ..."
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
xlsheet.application.active
i=2
Set dc=view.getalldocumentsbyk
Set doc=dc.getfirstdocument
While Not doc Is Nothing
Dim fromdate As NotesDatetime
Dim todate As notesdatetime
Set fromdate=New notesdatetime(curdoc.Fromd
Set todate=New notesdatetime(curdoc.Todat
Dim checkdate As notesdatetime
Set checkdate=New notesdatetime(doc.DTreceiv
'xlapp.visible=True
Do While fromdate.dateonly<=todate.
tmpkey=Cstr(fromdate.dateo
If fromdate.dateonly=checkdat
xlsheet.range("A"&Trim(Str
xlsheet.range("B"&Trim(Str
xlsheet.range("C"&Trim(Str
xlsheet.range("D"&Trim(Str
xlsheet.range("E"&Trim(Str
xlsheet.range("F"&Trim(Str
i=i+1
Call xlsheet.Range("A1:F500").C
Call xlsheet.Range("A1:F500").R
xlapp.statusbar="Processin
End If
Call fromdate.Adjustday(1)
Loop
Set doc=dc.getnextdocument(doc
Wend
xlapp.statusbar="Completed
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
no i didnt know that you sent me an email, ill check it first, ill back to later. thanks..
ASKER
is there any website that i can visit where i can get some code on how to format the excel cell using lotus script
thanks
thanks
notes.net
codestore.net
searchdomino.com
etc.,...
codestore.net
searchdomino.com
etc.,...
Well, you guys are rocking here without me Huh ? Give me some points and i will be participating too !
:-)
Long since i am here @EE...
:-)
Long since i am here @EE...
ASKER
thanks for the support mady...
You are welcome.
Arun,
Don't get disappointed. You have to spend a little bit of time in EE and you will achieve your position back.
Arun,
Don't get disappointed. You have to spend a little bit of time in EE and you will achieve your position back.
what is report name? is it a field or a view name?
what is category? is it based on a field where u will select the category and we need to display the report?
Pls be in detail what is Report name and what is Category Type?
If I am not wrong, it can be done.