How To Display The Content Of Text File In The Data Report?
Hey dude,
I want to to show the content of the text file in the data report. Can you please let me know that how can show the text file stuff in the data report.
code snippets will be prefered.
Thanks I am eagerly waiting for your reply.
please. help me.
Thanks
Kamlesh Gujarathi kamlesh@itshastra.com
Fly always to the SKY. You can do anything if you TRY. ;)
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Can VB Data Report Display Rich Text?
I need to display rich text in a VB data report. Can the data report display rich text? I can only get it to display the rich text with all the formatiing that goes along with it.
Thanks in advance,
Shannan
Text Field Does Not Display For Crystal Report After Saving It To A File
In my VB 6 code I do the following to a text field on my report.
VB Code:
CigUnitRpt.Text2.SetText "From " & Trim(Main.DTPicker1.Value) & " to " & Trim(Main.DTPicker2.Value)
After the report is created in vb, I save the report to a file like this.
VB Code:
Report.SaveAs "C:CigUnits.rpt", cr80FileFormat
When I open the file I created, this text field shows nothing in it even though I know there is data placed in the field.
Anyone know why this is happening and how to get around this problem?
Thanks
Read Text File And Display In Listview Report Style
I run a command netstat -a > text.txt
and get the result as below:
Active Connections
Proto Local Address Foreign Address State
TCP p2:1030 P2:0 LISTENING
TCP p2:80 P2:0 LISTENING
TCP p2:135 P2:0 LISTENING
TCP p2:6543 P2:0 LISTENING
TCP p2:443 P2:0 LISTENING
TCP p2:1032 P2:0 LISTENING
TCP p2:1032 APIITNT:nbsession ESTABLISHED
TCP p2:137 P2:0 LISTENING
TCP p2:138 P2:0 LISTENING
TCP p2:nbsession P2:0 LISTENING
TCP p2:1028 P2:0 LISTENING
TCP p2:1029 P2:0 LISTENING
TCP p2:1031 P2:0 LISTENING
UDP p2:6543 *:*
UDP p2:nbname *:*
UDP p2:nbdatagram *:*
Now I want write a porgram to read the test.txt and
display in a listview with four column, which is same with above.
How can I display the result?
Can anyone help me???
thanks
Display The Content Of A Doc File
I want some more tools in the toolbox menu..For example I added a "TabStrip" but next time I noticed that it is not there..There are 21 tools in my tool box..How can I have more tools and keep them there ?
**** my other question is how can I display the content of doc.file..on my form..(using textbox..listbox or other...)
thanks
Display File With Content...
Hi Friends,
in my application i want to display all files(.bat file) from folder..i need to display in the listbox , all the files inside the folder is .bat file..
how to i select all the files from the folder and display in the displaybox??
waiting for your valuable information..
with regards,
Mk..
Display Differences In File Content
Has anyone ever written or seen VB source code for showing contents of 2 files side by side and highlighting their differences like WinDiff?
Specifically, the tasks I'm interested in are:
1) highlighting what is different in each file when they are displayed side by side - somehow color coding differences and inserting blank line in file two display if file one contains a line that file two does not have
2) getting the two displays to scroll together
Create A Graph To Display Data From A Text File
Hiya all,
I'm very new to vb and have already come across a number of problems. I have a text file with lots of data and need to graph it in vb. Whats the easiest way to do this? I've tried Mschart but i'm finding it difficult to get any help on this. Would it be easier to import the file to excel and work from there???
Any help would be greatly appreciated. Thanx
Retrieve Data From A Text File And Display In A Textbox.
Hi! I hope someone could help me with this.
I want to retrieve data saved in .pnp file and display it in the same txtboxes and same order as it was saved.
My current code is:
VB Code:
(globalvar.bas)Option Explicit Public pn1 As New partnamelist (frm_field)Private Sub fieldupload() With pn1 'I made a class named partnamelist having these 4 properties: part, description, quantity, and version .part = txt_part.text .description = txt_desc.Text .quantity = txt_qty.Text .version = txt_version.Text End WithEnd Sub Private Sub cmd_apply_Click()dim filename as string If Len(txt_part.text) = 0 And _ Len(txt_desc.Text) = 0 And _ Len(txt_qty.Text) = 0 And _ Len(txt_version.Text) = 0 Then MsgBox "please enter the necessary values." txt_part.setfocus Else fieldupload filename = txt_filename.text 'Specified filename of the user MsgBox ("Creating profile... Please choose what directory to save your profile.") frm_dir.Show vbModal End IfEnd Sub '(frm_dir) Private Sub Form_Load() txt_pnprofile.Text = frm_field.filename + ".pnp" '--> "pnp" here in my example is my chosen extension.End Sub Private Sub cmd_ok_Click() txt_profilepath.Text = file1.Path & file1.FileName & "" & txt_plprofile.Text 'file1 is a file listbox btw MsgBox "Saving " & txt_profilepath & " as new profile." SaveProfile txt_profilepath.Text, pn1 profilepath = txt_profilepath.TextEnd Sub Private Sub SaveProfile(WhatFile As String, TheProfile As namelist)Dim FreeFileHandle As Integer FreeFileHandle = FreeFile Open WhatFile For Output As FreeFileHandle With TheProfile Print #FreeFileHandle, "[Part] " & .part Print #FreeFileHandle, "[Description] " & .description Print #FreeFileHandle, "[Quantity] " & .quantity Print #FreeFileHandle, "[Version] " & .version End With Close FreeFileHandleEnd Sub
Output of egfile.pnp:
[Description] b42
[MakerCode] c65
[PartnameCode] x32
[Quantity] x75
[SymbolicCode] q21
After clicking RETRIEVE button, I want that b42 will be displayed in txt_description.text and so on and so forth.
How do I do this? I don't know how to use Line Input # Statement as well.
Anybody, pls. help.
Display Content Of Folder In Combo Box And Call The Content.
Hi Ya'll, I new in the VB community and just now learning how to usecombo boxes and list boxes. At work we have a reporting software calledReport Runner and is being replaced by Crystal Report. RR can exportreports into HTML file format and I wrote a simple page that the usersuse to view and print thier report. Now with Crystal Reports, exportingto html is no longer a feature but pdf file format is a new option andit is a much smaller file format after comparing the reports. I wouldlike to design a VB application that will have combo boxes per reporttype.
I would like to show the *.pdf files from a folder in a shared networkdrive in the combo box and call the *.pdf file when chosen or even use abutton to call the file in its own native window, in this case acrobatwindow.
One big problem, I do not know how to populate the combo box with thefilder information nor do I know how to call a file and make it show ina different window.
Any ideas are greatly appreciated,
Thank,
Steve Cantoria
Aspect Communications
Nashville, TN
email@removed
Display A Form Control's Text/caption To A Data Report Control
Hi to all!!!
Any idea on how to display a form control's text property/caption to a data report control?
Say, I have a form(frmProcessCustomer) that accepts a customer name in a textbox.Then I would like to display the customer name from the textbox(.text property) to my data report using rpttextbox/rptlabel when I view the report...
Print Content Of Text Boxes Within A Report (CR 8.5)
Hallo together,
How is it possible, to print the content of different text boxes to a report I created with the Report generator using an MS-Acces Database table with the defined field objects (the first step I did)
In the second step, I created a form using VB 6 and placed the same number of text boxes like the field objekts in the database table. I used the Crystal Report Controll and VB's Data Control to connect the text boxes with the field objects of the database.
But in reality i don't need any database or the Data Controll to walk through the Database because I just want to print the current recordset (content of the text boxes i gave in) to my generated report without storing them to the database and preview it in the preview window. Further there should appear only one recordset in the Report.
Thanks for any help
Mattes
Data Extract From Text File Report
Hi All,
I have a very interesting task. I have a report that gets sent to us every month from the main office in text fromat and it looks something like the attached file and what I need to do is to create something to extract the data and place it in a table which would have the subscriber number, house number, serial or serials (one next to the other) and address.
I have searched everywhere for a data extract application or help but I haven't had any luck. I am hoping that you may have the solution to my very pressing problem.
Thanks a million for any help you might provide.
Manny
http://www.webmanny.com
Displaying Text File Content In A Datagrid Then Open That Text File...
I have a form named frmTest and contains a datagrid called dgData and two buttons. One is button 'Read text file' and the other one is 'open text file'. I also have a class module named CReadFile. and a textfile named test.txt
The code for button Read text file is:
Code:
Private Sub cmdReadTXT_Click()
Dim obj As CReadFile
Set obj = New CReadFile
Set dgData.DataSource = obj.Read_Text_File
Set obj = Nothing
End Sub
and the code for the open text file button is:
Code:
Open "test.txt" For Input As 1
MsgBox "file opened."
Close
The code inside the class module is:
Code:
Option Explicit
Public Function Read_Text_File() As ADODB.Recordset
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "DRIVER={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ=" & App.Path & ";", "", ""
rs.Open "select * from [test#txt]", conn, adOpenStatic, _
adLockReadOnly, adCmdText
Set Read_Text_File = rs
Set rs = Nothing
Set conn = Nothing
End Function
_____________
This is what happens, if you click the button 'Read text file', the contents of the text file will be displayed in the data grid. After clicking the button 'Read text file', I now want to click the button 'Open text file' to open the text file, but an error appears saying: Run time error '70': Permission Denied.
Why is that so? What should I do to solve this problem? I need to open that file again for validation after displaying the contents.
Thank you.
Export Landscape Data Report To Text File
I can display and print a data report in landscape mode, but cannot get the report written to a text file without receiving the dreaded "Report Width is Larger than the Paper Width" error.
I've tried: filename1.ExportReport rptKeyText, with and without setting the paper orientation to landscape for the printer, but I still get the above error message. Any other suggestions?
Data Report To TEXT FILE With Comma Delemeted
Hi,
need some help on exporting a data report to a text file with a comma or quotation mark delemeted. sample of text file:
LastName, FirstName, MIName or
"LastName" "FirstName" "MIName or
"LastName", "FirstName", "MIName
Thanks in advance.
Converting The Content Of The Text File To The Original File
Hi,
Here's the situation
-Let say I have a file called "Test.zip"
-then I change the extension name to .txt to convert it to text file
-of course when you open it you'll see symbols and other unknown characters
- here's the question:
Is it possible to read that uncommon content of the text file to retain or convert it back to it's original form ( in this case to .zip file)
can someone show me how it's done?
Transfer Text File Content
Hi everyone, can someone show me a code how to transfer content of a text file to another text file?
one text file named A.text i want to open using "For Open" and another one (B.text) using "For Append"..so i want everything in A.text transfer to B.text
Modifying Content In Text File
Hi,
I have a text file "orig.txt" with the content:
0:NV0067:8:BV1:Normal:66.103.203.35
0:NV0067:9:BV2:Normal:66.103.203.36
0:NV0067:10:BV3:Normal:66.103.203.37
0:NV0067:11:BV4:Normal:66.103.203.38
0:NV0067:12:BV5:Normal:66.103.203.39
0:NV0067:13:BV6:Normal:66.103.203.40
I need help in making a vb program that will modify the content in "orig.txt" to this format and save it as modified.txt:
66.103.203.35 X-NV0067-BV1
66.103.203.36 X-NV0067-BV2
66.103.203.37 X-NV0067-BV3
66.103.203.38 X-NV0067-BV4
66.103.203.39 X-NV0067-BV5
66.103.203.40 X-NV0067-BV6
at the end, delete "orig.txt" file.
Any help would be appreciated. thanks!
Filtering Out Content From A Text File
I am using the following code to open a text file that contains URLs, I want to "filter" out only the lines/words that start with http https cookie etc and show only the relevant text
how would i modify my dode to do this?
Dim strInput As String
Private Sub Command1_Click()
Open "C: ext.dat" For Input As #1
Do Until EOF(1)
Input #1, strInput
RichTextBox1.Text = RichTextBox1.Text & strInput
Loop
Close #1
End Sub
Getting Content From Text File To Listbot
Like the title stated, I would like to know how I can save the items in a list box to a text file, then retrieve it when needed. I'm going to have names that are going to be added to the listbox and I didn't want to add the items manually everytime i ran the program. Thanks.
Copy Content Of A Text File To Another
How can i copy the content of a text file to another already existing textfile? This copy must first delete the content of the file it writes to.
i.e.
content of file1:
1234567890
content of file2:
aaaaaaaaa
result must be:
erase content of file 2 (aaaaaaaaa) and replace by content of file 1=1234567890
file2=
1234567890
Saving The Content Of A Text Box Into A File
i want to have it so when you press a button it saves whatever is in the text box to a file and then if there is a file existing when you open the program again it will load the text from the file into the text box
Edited by - Split on 12/10/2005 1:12:17 PM
Data Report Doesnt Display Data .....................why
i create a datareport with dataenvironment with criteria. This is my command in data environment1
SELECT d .receivedt, h.invs_no, h.supplier, SUM(d .subtotal), h.received, h.po_no, d .brand, d .rcvdqty, d .package, d .batchno, d .expdate, d .subtotal FROM receiveddel d, receivedhdr h WHERE (h.invs_no = ?) GROUP BY h.supplier, d .receivedt, h.invs_no, d .subtotal, h.received, h.po_no, d .brand, d .rcvdqty, d .package, d .batchno, d .expdate ORDER BY h.supplier
and i have another form for me to pass the invs_no to the command
If txtCustomer.Text <> "" Then
DataEnvironment1.rssql Trim(txtCustomer.Text)
DataReport1.Show
Else
MsgBox "Please enter a valid customer ID", vbInformation
End If
actually everything works well no error come out but the data report doesnt display anything..........is a blank report but my database does contain data what can i do please help me
Data Report/Data Environment Won't Display Last Row.
Hi, I have had this problem before and another vbcity user has also asked this question, but I can't find their question and mine wasn't answered so here it is.
If my table has 2 rows, only 1 is displayed. If the table only has 1 row, nothing is displayed. ie my last row is never displayed. Any ideas? It works fine in access. Every row shows up.
Thanks in advance.
thanks
leadfinger
http://www3.nbnet.nb.ca/gspil
Display In Data Report
Hi,
I want to build a report using datareport in VB which should look something like this:
Name E-mail Phone
Person1 some1@someplace.com 12453
Person2 some2@someplace.com 12545
Person3 some3@someplace.com 12453
Person4 some4@someplace.com 12154
Person5 some5@someplace.com 12453
Person6 some6@someplace.com 12557
I have a set of id's that I have to pass to the report. The report should display the details depending on the id (silly isn't it). But I want to get all the display continuous and not on different pages.
Can anyone help me out with this
How To Display Data In Report If.....
Hi everyone
I am getting records in crystal reports but it is arabic so,it doesnt display. so is there anything in crystal report to enable languages.
Please help me
waiting for reply.
Thanx in advance.
Sort Text File Content. Ideas Please :D
Hi ppl.
i have a text file look like this:
Code:
t155.4 ;B277i ;t.3918 ; ; ;
t155.4 ;B277i ;t.3917 ; ; ;
t371.102019 ;M672v ;t.3945 ; ; ;
t371.102019 ;M672v ;t.3946 ; ; ;
m347.952 ;A511e ;t.19409 ; ; ;
m331.88(81) ;P436c ;t.19396 ; ; ;
m347.955 ;P436r ;t.19362 ; ; ;
m34:502.7 ;V855r ;t.19338 ; ; ;
m347.77 ;A779p ;t.19358 ; ; ;
m347.919.3 ;O48j ;t.19373 ; ; ;
and i need to sort him in ALPHABETICAL order, using 2nd column (separated by ; ) to make a sort. i have to 'transform' my text file in something exactly like this:
Code:
m347.77 ;A779p ;t.19358 ; ; ;
m347.952 ;A511e ;t.19409 ; ; ;
t155.4 ;B277i ;t.3917 ; ; ;
t155.4 ;B277i ;t.3918 ; ; ;
t371.102019 ;M672v ;t.3945 ; ; ;
t371.102019 ;M672v ;t.3946 ; ; ;
m347.919.3 ;O48j ;t.19373 ; ; ;
m331.88(81) ;P436c ;t.19396 ; ; ;
m347.955 ;P436r ;t.19362 ; ; ;
m34:502.7 ;V855r ;t.19338 ; ; ;
ps: i already open, read and works with file contents normally. i just want sort content of file using 2nd column.
anybody can help me ?
How To Save Listbox Content To A Text File
Hi,
I need to write the data in a list box to a text file by creating the text file.
whenever the list box receives a data it should save the data to the text file.
Next time when the data comes to the list box it should get appended with the existing text present in the file.
how can i do that in VB?
I am new to VB...
Expecting reply
thanks in advance
How To Put A Text File Content In A Public String???!!!!
Hi
I have a text file (nearly 3.6 MB)..
I must use it at anytime in my project (all forms..)
So I must read it to one string (public for all at any time).. not to read it every time I want it..
So how to do it with VB6??
It is an urgent problem please!!!
Thanks alot..
Reading A Text File And Overwriting The Content
greetings vb experts. i just want to ask, what's the code for opening a text file, and overwriting its content. as i remem it has commands such as,
open file #.... (and so on)
can you pls help me... thank you so much
How To Put A Text File Content In A Public String???!!!!
Hi
I have a text file (nearly 3.6 MB)..
I must use it at anytime in my project (all forms..)
So I must read it to one string (public for all at any time).. not to read it every time I want it..
So how to do it with VB6??
It is an urgent problem please!!!
Thanks alot..
How To Display No. Of Record In The Data Report?
Hi,
I've create data report and it works fine. My problem is to display no. of record like this,
No. ProjectName StartProject End Project
1 Project1 5/8/2000 6/8/2004
2 .... .... ........
3 ..... ..... .......
do you know how to display the no of record(1, 2, 3..)?
any idea? thanx in advance..
How To Display Flexgrid Data In Report
Hi Everyone
I want to be displayed data of flexgrid row in datareport without storing in data base
i tried it with textbox it is ok
i tried like given below
private sub command1_click()
but with fleWith DataReport1.Sections(1)
.Controls("txtitemcode").Text = Form1!msflexgrid1.TextMatrix(newrow, 1)
End With
DataReport1.Refresh
DataReport1.Showxgrid
end sub
it gives error likw subscript is out of range
Please help me
Waiting for reply
Data Display In Crystal Report ???
Hey I`m sorry for asking again and again, but I have not worked on Crystal Repots before this.
What is basic concept of showing data in Crystal Report. When I select tables and fields in a report. Then all available data is displayed in that report OR can it be changed as per requirements. If yes then how ?
e.g. I am having data of attendance (date / time) of Employees. And I want to display data only for specific month. In short how can I customize display in Cryst. Repo. ?
One more que. : Format of a field is Date/Time and I stored time in it. (e.g. 14:00:00) but report is showing Date value at random (e.g. 99/12/30)
Please Guide !
What Control To Display Data As A Report ?
I need to display data from database like a report but I don't know what control is the most useful ? If I use MSFlexGrid, how to insert data after select from database ? Thanks for help.
Data Report Fields Display
Anybody know how to display two fields on a data report and get rid of trailing spaces?
for example, I need to display "lastname, firstname"
How do I get rid of the trailing spaces after the last name so it doesn't look like this:
NAME: Smith ,John
any ideas? Is it something I have to fix on the report itself or the query behind it?
thanks
kristin
Crystal Report Data Display
Hi all
I have made Report by using recordselectionformula but when i am previewing the report that is coming correct and suppose i have closed the preview and without unloading the project i want to see the report for some another record i have to click on the refresh button without this i am not getting data display
and if i stop the execution and execute the s/w then again once it is working o.k. for once and again the same procedure if anybody of u can suggest me sol.
Dinesh
How To Display No. Of Record In The Data Report?
Hi,
I've create data report and it works fine. My problem is to display no. of record like this,
No. ProjectName StartProject End Project
1 Project1 5/8/2000 6/8/2004
2 .... .... ........
3 ..... ..... .......
do you know how to display the no of record(1, 2, 3..)?
any idea? thanx in advance..
2 Table Display In One Data Report
Hai i have problem in display 2 table information into one data report.
For Example
Table 1 = Customer
Table 2 = Order
In DataReport.DataMember only can set table1 or table 2.
But i need both table to be displayed.
So If any one know how to do it pls give help.
Regard
mcchua
How To Display Record(data) In Report If......
Hi everyone
I am getting records in crystal reports but it is arabic so,it doesnt display. so is there anything in crystal report to enable languages.
Please help me
waiting for reply.
Thanx in advance.
How To Display Data(records) In Report If.....
Hi everyone
I am getting records in crystal reports but it is arabic so,it doesnt display. so is there anything in crystal report to enable languages.
Please help me
waiting for reply.
Thanx in advance.
|