Xdocreport slow open generated .odt document with big table - velocity

I genarate .odt file using xdocreport and velocity. The generated file(9 pages, 48kb) is opened for about two minutes.
If saved this file and open again, it opening for about 2 seconds.
I can not imagine why it takes so long to open a document after it was generated. Is the table too large? Bad structure of the document?
Table with problem look like that(
Set the property to show the bounds of the table, even if there are none)

Related

Table of content entries without heading

I'm working on auto generated word documents that consist of multiple test reports.
I want to automatically create a table of contents where one entry refers to one report.
But I can't simply use headings because each entry should contain info that is not on one line in the report.
Something like this:
No.
Test Id
Description
Result
Page number
1
ANZ-131QZXY
UV Light test
Passed
3
2
ANZ-132QYXX
Heat resistence test
Failed
8
I know how I can retrieve the information from the individual reports in VBA but I got stuck on how to generate the table. Is it even possible to add entries manually to a ToC without a heading existing?
PS: I use Word 365 and it's important that the ToC will work when saving the document as PDF.

load a csv file from a particular point onwards

I have the below code to read a particular csv file, my problem is that the csv file contains two sets of data, one underneath the other, with different headers.
The starting point of the second data set can vary daily. So I need something that lets me find the row in the CSV where the second dataset begins (it will always start with the number '302') and load the csv from there. The problem i have is that the code below starts from where i need it to start, but it always includes the headers from the first part of the data, which is wrong.
USE csvImpersonation
FILE 'c:\\myfile.TXT'
SKIP_AT_START 3
RETURN #myfile
#loaddata = SELECT * FROM #mylife
where c1 = '302'
The below is a sample of the text file (after the first 3 rows are skipped, which are just full of file settings, dates, etc).
Any help is much appreciated

Export multiple files with InDesign Data Merge

I am creating progress reports around 50 different companies in InDesign. The report is 10 pages long and has approximately 40 images and text fields that need to change based on the company.
I set up a data merge in InDesign and mapped all of the text and image fields. When I execute the data merge the text and images are mapping perfectly but it's creating one large 500 page report (10 pages x 50 companies). I.e. Report for Company A is on pages 1-10, report for Company B is on pages 11-20, and so on.
While I could break this up into individual reports in AcrobatPro, this step seems like it should be unnecessary. How can this be automated, preferably within InDesign? And how would I then be able to save each file based on a field in the merge csv?
I agree with Nicolai, I don't think default data merge option can create split documents.
Maybe you can use the following script to split your documents into the parts
https://creativepro.com/free-script-splits-long-indesign-files/

Displaying Images from a Folder in an Access Report is very slow [duplicate]

I have a VBScript that I use to read an XML file and populate a couple of tables in Access 2010. The VBScript also copies jpg files from a card reader to a location on the server. The VBScript creates a unique folder based on date/time...the folder location of each image name is written to the database as one of the fields in UNC path\filename.jpg notation.
I have a primary database and the transaction (images) are referenced in the second database. I have created a relationship as well...
I am able to build my report in Access from data from both the tables, however, I'd like to automate a print job that grabs the last entry to the primary database, it's associated images (up to 10...but not 10 in every case) and print them out. When I try to build the report I cannot figure out how to use a query result of the field with the filenames to display on the report.
You can do what you describe using an Image control and a line of VBA code. For a sample table named [ImageLocations]
ImageLocation
-----------------------------------
\\SERVER\Public\Pictures\image1.jpg
\\SERVER\Public\Pictures\image2.jpg
I created a report with that table as the Record Source, dropped the [ImageLocation] field onto the Detail band, and added an Image control. I used the following as the On Format event of the report's Detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.ImageControl.Picture = Me.ImageLocation.Value
End Sub
When I print the report I see the images associated with the filenames in the table.
Edit re: comment
Newer versions of Access (since at least Access 2010) do not need the On Format VBA code. We can simply place an Image control on the report and set its Control Source property to the (text) field containing the path to the image file. Thanks to Albert D. Kallal for the tip!

Word VBA - Matching large selecting of text based keys with data. Embedded resource/text?

I have a pretty complex VBA plugin for Word written that automatically creates a report for me, using XML input, cycling through the X objects within the report to create the output. It is currently embedded into a Word Template file .DOCM.
I need to insert into the report a static list of text, based on the name of the item within the XML. For example, within my XML I have entries with a name BLAH1, BLAH2, BLAH3. Every time I see BLAH1, I need to match it with the static INSERT1, and BLAH2 match it with INSERT2, etc.
This seems simple enough, but her lies the problem...
It appears there are no Hashmap's in VBA without requiring external libraries, which I can't really rely on, since I can't install items on the machines where this will be running. As a result I can't store this reference data in a Hashmap as far as I can tell.
I can't seem to concatenate more than about 20 lines of strings together without hitting a max within VBA, and just parsing the chunk of text for what I need since there are about 1500 "lines" in my reference data, which greatly exceeds 20.
I also haven't found a way to embed a text, or any other type of file to hold this information within the file, and then parse the data.
I really would like to have everything within the single template file, without requiring additional text or other files to be bundled with the document. If there is no other option, I will go that route, but I wanted to see what create ideas people at Stackoverflow might have first ;-)
Have you considered using Word's Document Variables? They are name/value pairs stored invisibly within the document. (ActiveDocument.Variables("BLAH1").Value = "INSERT1" to create one, debug.print ActiveDocument.Variables("BLAH1").Value to retrieve a value (you have to use an error handler to detect non-existent indices if you go that route). Word can store (at least) hundreds of thousands of these things).